/**
 * CineCritic Enhancer Styles
 */

/* ============================================
   MOVIE GRID
   ============================================ */
.cce-movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.cce-movie-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cce-movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cce-movie-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.cce-movie-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: #1a1a1a;
}

.cce-movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cce-movie-card:hover .cce-movie-poster img {
    transform: scale(1.05);
}

.cce-movie-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e9a800;
    color: #1a1a1a;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.cce-movie-rating-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(26, 26, 26, 0.9);
    color: #e9a800;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cce-movie-rating-badge span {
    color: #e9a800;
}

.cce-movie-info {
    padding: 1.5rem;
}

.cce-movie-info h3 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
    color: #1a1a1a;
    line-height: 1.3;
}

.cce-movie-year {
    color: #e9a800;
    font-weight: 600;
    font-size: 0.9rem;
}

.cce-movie-info p {
    color: #666;
    font-size: 0.9rem;
    margin: 0.75rem 0 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   STAR RATING
   ============================================ */
.cce-star-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.cce-star-rating .cce-star {
    font-size: 18px;
    line-height: 1;
}

.cce-star-rating .cce-star.filled {
    color: #e9a800;
}

.cce-star-rating .cce-star.half {
    background: linear-gradient(90deg, #e9a800 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cce-star-rating .cce-star.empty {
    color: #ddd;
}

.cce-star-rating .cce-rating-value {
    margin-left: 8px;
    font-weight: 600;
    color: #1a1a1a;
}

.cce-star-rating.cce-stars-large .cce-star {
    font-size: 28px;
}

.cce-star-rating.cce-stars-large .cce-rating-value {
    font-size: 1.5rem;
    margin-left: 12px;
}

/* ============================================
   USER RATING
   ============================================ */
.cce-user-rating {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.cce-user-rating h4 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.cce-rating-stars-interactive {
    display: flex;
    gap: 8px;
    font-size: 32px;
    cursor: pointer;
}

.cce-rating-stars-interactive .star {
    color: #ddd;
    transition: color 0.2s;
}

.cce-rating-stars-interactive .star:hover,
.cce-rating-stars-interactive .star.active {
    color: #e9a800;
}

.cce-rating-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
}

.cce-rating-message.success {
    background: #d4edda;
    color: #155724;
}

.cce-rating-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* ============================================
   CATEGORIES SLIDER
   ============================================ */
.cce-categories-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.cce-categories-slider::-webkit-scrollbar {
    height: 8px;
}

.cce-categories-slider::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cce-categories-slider::-webkit-scrollbar-thumb {
    background: #e9a800;
    border-radius: 4px;
}

.cce-category-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    text-decoration: none;
}

.cce-category-image {
    height: 320px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.cce-category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: #fff;
}

.cce-category-overlay h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.cce-category-overlay span {
    color: #e9a800;
    font-size: 0.9rem;
}

/* ============================================
   SIMILAR MOVIES
   ============================================ */
.cce-similar-movies {
    margin: 3rem 0;
}

.cce-similar-movies h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

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

.cce-similar-item {
    text-decoration: none;
    color: inherit;
    display: block;
}

.cce-similar-item img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.cce-similar-info h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: #1a1a1a;
}

/* ============================================
   MOVIE HEADER
   ============================================ */
.cce-movie-header {
    background: #1a1a1a;
    padding: 2rem;
    margin: -2rem -2rem 2rem;
    border-radius: 12px 12px 0 0;
}

.cce-movie-header .cce-star-rating {
    justify-content: center;
}

.cce-movie-header .cce-star {
    color: rgba(255, 255, 255, 0.3);
}

.cce-movie-header .cce-star.filled,
.cce-movie-header .cce-star.half {
    color: #e9a800;
}

.cce-movie-header .cce-rating-value {
    color: #fff;
}

/* ============================================
   MOVIE META INFO
   ============================================ */
.cce-movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8f8f8;
    border-radius: 12px;
    margin: 2rem 0;
}

.cce-movie-meta-item {
    display: flex;
    flex-direction: column;
}

.cce-movie-meta-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.cce-movie-meta-value {
    font-weight: 600;
    color: #1a1a1a;
}

/* ============================================
   CAST LIST
   ============================================ */
.cce-cast-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.cce-cast-item {
    background: #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .cce-movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .cce-movie-info h3 {
        font-size: 1rem;
    }
    
    .cce-category-card {
        flex: 0 0 240px;
    }
    
    .cce-category-image {
        height: 280px;
    }
    
    .cce-similar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .cce-movie-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes cce-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cce-movie-card {
    animation: cce-fadeIn 0.5s ease forwards;
}

.cce-movie-card:nth-child(1) { animation-delay: 0.1s; }
.cce-movie-card:nth-child(2) { animation-delay: 0.2s; }
.cce-movie-card:nth-child(3) { animation-delay: 0.3s; }
.cce-movie-card:nth-child(4) { animation-delay: 0.4s; }
.cce-movie-card:nth-child(5) { animation-delay: 0.5s; }
.cce-movie-card:nth-child(6) { animation-delay: 0.6s; }
