/* src/css/details.css */

/* Movie Hero Section */
.movie-hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    margin-top: 80px;
}

.movie-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.3) blur(5px);
    transform: scale(1.1);
}

.movie-hero-content {
    position: relative;
    display: flex;
    gap: 50px;
    padding: 50px;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 1;
}

.movie-poster-container {
    flex-shrink: 0;
    position: relative;
}

.movie-poster-container img {
    width: 300px;
    height: 450px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.rating-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(20, 20, 20, 0.9);
    padding: 10px 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(10px);
}

.rating-value {
    font-size: 24px;
    font-weight: bold;
}

.movie-info {
    flex: 1;
    color: white;
    padding-top: 50px;
}

.movie-info h1 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: #ccc;
    margin-bottom: 30px;
}

.separator {
    color: var(--primary);
}

.movie-overview {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 600px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-btn.primary {
    background: var(--primary);
    color: white;
    font-weight: bold;
    font-size: 18px;
    padding: 18px 35px;
}

.action-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.4);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Trailer Modal */
.trailer-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.trailer-content {
    position: relative;
    margin: 5% auto;
    width: 80%;
    max-width: 1000px;
    height: 80%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    animation: slideInModal 0.3s ease;
}

.close-trailer {
    position: absolute;
    right: -40px;
    top: -40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    transition: color 0.3s ease;
}

.close-trailer:hover {
    color: var(--primary);
}

#trailerContainer {
    width: 100%;
    height: 100%;
}

#trailerContainer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Streaming Section */
.streaming-section {
    background: var(--card-bg);
    padding: 60px 0;
    margin-top: -50px;
    position: relative;
    z-index: 2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.streaming-section h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--primary);
}

.streaming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.streaming-item {
    background: var(--secondary);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.streaming-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.streaming-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.streaming-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.streaming-type {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

.streaming-price {
    font-size: 20px;
    color: var(--primary);
    font-weight: bold;
}

.watch-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.watch-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Cast Section */
.cast-section {
    padding: 60px 0;
    background: var(--secondary);
}

.cast-section h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--primary);
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.cast-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.cast-item:hover {
    transform: translateY(-5px);
}

.cast-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.cast-name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

.cast-character {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Similar Movies Section */
.similar-section {
    padding: 60px 0;
    background: var(--card-bg);
}

.similar-section h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--primary);
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.similar-item {
    background: var(--secondary);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.similar-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.similar-poster {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.similar-info {
    padding: 15px;
}

.similar-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.similar-rating {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Reviews Section */
.reviews-section {
    padding: 60px 0;
    background: var(--secondary);
}

.reviews-section h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--primary);
}

.review-item {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.review-author {
    font-weight: bold;
    font-size: 18px;
}

.review-rating {
    color: var(--primary);
}

.review-content {
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Loading States */
.loading-message {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 18px;
}

/* Rating Modal Styles */
.rating-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.rating-modal-content {
    background: var(--card-bg);
    margin: 10% auto;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    animation: slideInModal 0.3s ease;
}

.close-rating {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.close-rating:hover {
    color: var(--text);
}

.rating-modal h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--primary);
}

.rating-modal p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 40px;
}

.star {
    cursor: pointer;
    color: #444;
    transition: all 0.2s ease;
}

.star:hover,
.star.active {
    color: #FFD700;
    transform: scale(1.2);
}

.star.active {
    animation: starPulse 0.3s ease;
}

@keyframes starPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1.2); }
}

.rating-display {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary);
    font-weight: bold;
}

.rating-review {
    width: 100%;
    padding: 15px;
    background: var(--secondary);
    border: 1px solid #333;
    border-radius: 10px;
    color: var(--text);
    font-size: 16px;
    resize: vertical;
    margin-bottom: 20px;
}

.rating-review:focus {
    outline: none;
    border-color: var(--primary);
}

.rating-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.rating-submit,
.rating-cancel {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rating-submit {
    background: var(--primary);
    color: white;
}

.rating-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.rating-cancel {
    background: transparent;
    color: var(--text);
    border: 2px solid #444;
}

.rating-cancel:hover {
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .movie-hero-content {
        flex-direction: column;
        padding: 30px 20px;
        text-align: center;
    }
    
    .movie-poster-container img {
        width: 200px;
        height: 300px;
    }
    
    .movie-info h1 {
        font-size: 32px;
    }
    
    .movie-info {
        padding-top: 20px;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .streaming-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .trailer-content {
        width: 95%;
        height: 50%;
        margin: 25% auto;
    }
    
    .close-trailer {
        right: 10px;
        top: -50px;
    }
}

