/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #14181c;
    color: #9ab;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

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

/* Header */
.header {
    background: rgba(20, 24, 28, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #2c3440;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-btn {
    background: transparent;
    color: #678;
    border: none;
    padding: 10px 16px;
    border-radius: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.2s ease;
    text-transform: none;
    letter-spacing: 0;
}

.nav-btn:hover {
    color: #fff;
    background: transparent;
}

.nav-btn.active {
    color: #fff;
    background: transparent;
    border-bottom: 2px solid #fff;
}

/* Main content */
.main {
    min-height: calc(100vh - 72px);
    padding: 32px 0;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 90;
    background: #14181c;
    padding: 16px 0;
    margin-top: -16px;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2c3440;
    border: 1px solid #456;
    color: #def;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background 0.2s;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #3c4a58;
    border-color: #F5A623;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: #2c3440;
    border: 1px solid #456;
    border-radius: 4px;
    color: #def;
    font-size: 13px;
}
.search-box input::placeholder {
    color: #789;
    outline: none;
    transition: all 0.2s ease;
}

.search-box input:focus {
    border-color: #F5A623;
    background: #2c3440;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-48%);
    font-size: 14px;
    opacity: 0.6;
    line-height: 0;
}

.filters {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filters select {
    background: #2c3440;
    color: #def;
    border: 1px solid #456;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    min-width: 130px;
}

.view-toggle,
.comparison-toggle {
    background: #2c3440;
    color: #9ab;
    border: 1px solid #456;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle:hover,
.comparison-toggle:hover {
    background: #3c4450;
    color: #fff;
}

.comparison-toggle {
    background: #F5A623;
    color: #14181c;
    border: none;
    font-weight: 600;
}

.comparison-toggle:hover {
    background: #e0951e;
    transform: translateY(-1px);
}

.select-all-btn {
    background: #2c3440;
    color: #9ab;
    border: 1px solid #456;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.select-all-btn:hover {
    background: #3c4450;
    color: #fff;
}

/* Comparison Overlay */
.comparison-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
}
.comparison-overlay-content {
    background: #1a1e24;
    border: 1px solid #2c3440;
    border-radius: 8px;
    padding: 32px;
    max-width: 1000px;
    width: 100%;
    position: relative;
    animation: modalIn 0.25s ease both;
}

/* Results info */
.results-info {
    margin-bottom: 24px;
    font-size: 14px;
    color: #789;
    display: none;
    align-items: center;
    gap: 8px;
}
.results-info.visible {
    display: flex;
}

.separator {
    opacity: 0.5;
}

/* Films grid */
.films-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    transition: all 0.3s ease;
}

.films-grid.list-view {
    grid-template-columns: 1fr;
    gap: 16px;
}

.film-card {
    background: #1b2228;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 24px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.15s ease;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.film-card:hover {
    border-color: #456;
    background: #232e35;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2);
    z-index: 2;
}
.film-card .film-poster {
    overflow: hidden;
    position: relative;
    transition: transform 0.15s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}
.film-card .film-poster::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255,255,255,0.15) 45%,
        rgba(255,255,255,0.25) 50%,
        rgba(255,255,255,0.15) 55%,
        transparent 80%
    );
    z-index: 2;
    pointer-events: none;
    transition: none;
}
.film-card:hover .film-poster::before {
    animation: posterSheen 0.6s ease-out forwards;
}
@keyframes posterSheen {
    0% { left: -100%; }
    100% { left: 150%; }
}
.film-card .film-poster img {
    transition: transform 0.15s ease-out;
}

.film-card.list-view {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px;
}

.film-number {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 11px;
    font-weight: 400;
    color: #4a6a80;
}

.film-poster {
    width: 100%;
    aspect-ratio: 2/3;
    background: #2c3440;
    border-radius: 4px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #456;
}

.film-card.list-view .film-poster {
    width: 80px;
    height: 120px;
    margin: 0;
    flex-shrink: 0;
    font-size: 32px;
}

.film-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.film-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    line-height: 1.3;
}

.film-meta {
    font-size: 13px;
    color: #678;
    margin-bottom: 12px;
}

.film-ratings {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.rating-badge {
    background: #2a2a2a;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-badge .member {
    font-weight: 500;
    color: #bcd;
}

.rating-badge .rating {
    color: #ffd700;
}

.film-avg-rating {
    font-size: 14px;
    font-weight: 600;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.film-notes {
    margin-top: 12px;
    font-size: 13px;
    color: #8a9;
    font-style: italic;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #444;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.stat-card {
    background: #1b2228;
    border: 1px solid #2c3440;
    border-radius: 4px;
    padding: 24px;
    text-align: center;
}

.stat-card h3 {
    font-size: 12px;
    font-weight: 500;
    color: #678;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #F5A623;
}

.stats-section {
    margin-bottom: 28px;
}

.stats-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}

.member-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.member-stat {
    background: #1b2228;
    border: 1px solid #2c3440;
    border-radius: 4px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.member-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.member-rating {
    font-size: 18px;
    font-weight: 700;
    color: #ffd700;
}

.top-films, .controversial-films {
    display: grid;
    gap: 4px;
}

.top-film {
    background: #1b2228;
    border: 1px solid #2c3440;
    border-radius: 4px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.top-film[data-film-number]:hover {
    background: #232e35;
    border-color: #456;
}

.top-film-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.top-film-meta {
    font-size: 12px;
    color: #789;
}

.top-film-rating {
    font-size: 16px;
    font-weight: 700;
    color: #ffd700;
}

/* To Watch */
.subtitle {
    color: #789;
    margin-bottom: 32px;
    font-size: 16px;
}

.to-watch-controls {
    margin-bottom: 32px;
}

.to-watch-controls input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #e5e5e5;
    font-size: 14px;
    outline: none;
}

.to-watch-list {
    display: grid;
    gap: 16px;
}

.to-watch-item {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.2s ease;
}

.to-watch-item:hover {
    border-color: #444;
    background: #1f1f1f;
}

.to-watch-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.to-watch-meta {
    font-size: 14px;
    color: #789;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: backdropIn 0.2s ease;
}

.modal-content {
    background: #1b2228;
    border: 1px solid #2c3440;
    border-radius: 6px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.25s ease both;
}

.modal.closing {
    animation: backdropIn 0.15s ease reverse forwards;
}

.modal.closing .modal-content {
    animation: scaleOut 0.15s ease forwards;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 24px;
    background: none;
    border: none;
    font-size: 32px;
    color: #789;
    cursor: pointer;
    z-index: 10;
    padding: 8px;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-direction: column;
        height: auto;
        gap: 16px;
        padding: 16px 0;
    }
    
    .main {
        padding: 24px 0;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .filters {
        justify-content: stretch;
        gap: 8px;
    }
    
    .filters select,
    .view-toggle {
        flex: 1;
        min-width: auto;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }

    .films-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .film-card.list-view {
        text-align: left;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .member-stats {
        grid-template-columns: 1fr;
    }
    
    .detailed-member-stats {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .films-grid {
        grid-template-columns: 1fr !important;
    }
    
    .film-card.list-view {
        flex-direction: row !important;
    }
    
    .film-card.list-view .film-poster {
        width: 80px;
        min-width: 80px;
    }
    
    .film-card:not(.list-view) .film-poster {
        width: 100%;
    }
    
    .wheel-wrapper {
        width: 90%;
        min-width: unset;
    }
    
    .nav-btn {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .top-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .member-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

/* Loading states and animations */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

@keyframes landIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.92); }
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes backdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Universal land-in for page content */
.film-card,
.member-detail-card,
.stat-card,
.stats-section,
.wheel-container,
.wheel-stats,
.wheel-result,
.suggestion-card,
.top-stats {
    animation: landIn 0.3s ease both;
}

/* Stagger children for a cascading feel */
.film-card:nth-child(1), .member-detail-card:nth-child(1), .stat-card:nth-child(1) { animation-delay: 0s; }
.film-card:nth-child(2), .member-detail-card:nth-child(2), .stat-card:nth-child(2) { animation-delay: 0.03s; }
.film-card:nth-child(3), .member-detail-card:nth-child(3), .stat-card:nth-child(3) { animation-delay: 0.06s; }
.film-card:nth-child(4), .member-detail-card:nth-child(4), .stat-card:nth-child(4) { animation-delay: 0.09s; }
.film-card:nth-child(5), .member-detail-card:nth-child(5), .stat-card:nth-child(5) { animation-delay: 0.12s; }
.film-card:nth-child(6), .member-detail-card:nth-child(6), .stat-card:nth-child(6) { animation-delay: 0.15s; }
.film-card:nth-child(7), .stat-card:nth-child(7) { animation-delay: 0.18s; }
.film-card:nth-child(8), .stat-card:nth-child(8) { animation-delay: 0.21s; }
.film-card:nth-child(9) { animation-delay: 0.24s; }
.film-card:nth-child(10) { animation-delay: 0.27s; }
.film-card:nth-child(n+11) { animation-delay: 0.3s; }

/* Star ratings */
.stars {
    color: #ffd700;
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #567;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #789;
}

/* Film Card Checkboxes */
.film-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 14px;
    height: 14px;
    accent-color: #333;
    opacity: 0.3;
    z-index: 2;
    cursor: pointer;
}
.film-checkbox:checked {
    opacity: 1;
    accent-color: #F5A623;
}

.film-card.selected {
    border-color: #F5A623;
    background: rgba(245, 166, 35, 0.05);
}

/* Wheel Styles */
.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    margin: 48px 0;
}

#wheel-canvas {
    border-radius: 50%;
    box-shadow: none;
    cursor: default;
}

@keyframes wheelLandSpin {
    from { transform: rotate(-80deg); opacity: 0.7; }
    to { transform: rotate(0deg); opacity: 1; }
}

#wheel-canvas.land-spin {
    animation: wheelLandSpin 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wheel-center-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #1b2228;
    border: 1px solid hsla(212, 28%, 55%, 0.3);
    color: #9ab;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: none;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.wheel-center-btn:hover {
    background: #232e35;
    color: #fff;
    border-color: #678;
}
.wheel-center-btn:active {
    transform: translate(-50%, -50%) scale(0.82);
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
    background: #14181c;
    transition: transform 0.08s ease-in, box-shadow 0.08s ease;
}
.wheel-center-btn:disabled {
    color: #456;
    cursor: default;
}
#wheel-canvas:hover {
    transform: none;
}

.spin-button {
    display: none;
    background: linear-gradient(135deg, #e8842a, #c46a1a);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(232, 132, 42, 0.3);
}

.spin-button:hover {
    background: linear-gradient(135deg, #d4751e, #b05a10);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(232, 132, 42, 0.4);
}

.spin-button:active {
    transform: translateY(0);
}

.spin-button:disabled {
    background: #333;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wheel-result {
    text-align: center;
    padding: 32px;
    background: #1b2228;
    border-radius: 6px;
    border: 2px solid #3a4a5a;
    margin: 32px 0;
    animation: resultReveal 0.8s ease;
}

.result-label {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #9ab;
    margin-bottom: 8px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.result-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.result-suggestor {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #678;
    font-weight: 400;
    margin-bottom: 4px;
}

.result-meta {
    font-size: 16px;
    color: #bcd;
    font-weight: 500;
}

.lock-in-btn {
    margin-top: 20px;
    background: #2c3440;
    color: #fff;
    border: 1px solid #4a5a6a;
    border-radius: 50px;
    padding: 12px 28px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}
.lock-in-btn:hover {
    background: #3c4a58;
    transform: translateY(-1px);
}
.lock-in-btn:disabled {
    background: #333;
    color: #567;
    cursor: not-allowed;
    transform: none;
}
.lock-in-btn.locked {
    background: #2a6e3f;
    color: #fff;
    pointer-events: none;
}

.wheel-stats {
    text-align: center;
    margin-top: 32px;
    font-size: 16px;
    color: #789;
}

/* Comparison Styles */
.comparison-instructions {
    text-align: center;
    padding: 60px 20px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px dashed #444;
}

.comparison-grid {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}

.comparison-film {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 24px;
}

.comparison-film h3 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.comparison-meta {
    font-size: 14px;
    color: #789;
    margin-bottom: 20px;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-label {
    font-size: 14px;
    color: #bcd;
    min-width: 80px;
    font-weight: 500;
}

.bar-container {
    flex: 1;
    height: 20px;
    background: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 10px;
    transition: width 0.8s ease;
    position: relative;
}

.bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

.rating-value {
    font-size: 14px;
    color: #F5A623;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

/* Detailed Member Stats */
.detailed-member-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    max-width: 100%;
}

.member-detail-card {
    background: #1b2228;
    border: 1px solid #2c3440;
    border-radius: 6px;
    padding: 16px;
    transition: all 0.2s ease;
    min-width: 0;
    overflow: hidden;
}

.member-detail-card:hover {
    border-color: #456;
    transform: translateY(-1px);
}

.member-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a2a2a;
}

.member-name-large {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    font-family: 'Poppins', sans-serif;
}

.member-avg-large {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.member-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.member-stat-item {
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #F5A623;
}

.stat-label {
    font-size: 12px;
    color: #789;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.rating-distribution {
    margin-top: 20px;
}

.distribution-title {
    font-size: 14px;
    color: #789;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.distribution-bars {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.distribution-bar {
    background: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
    min-height: 60px;
    position: relative;
    display: flex;
    align-items: end;
}

.distribution-fill {
    width: 100%;
    background: linear-gradient(180deg, #ff6b35, #f7931e);
    border-radius: 4px;
    transition: height 0.8s ease;
    min-height: 2px;
}

.distribution-labels {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    text-align: center;
    font-size: 12px;
    color: #567;
}

/* Rating Visualization in Modals */
.modal-rating-chart {
    margin: 24px 0;
}

.modal-rating-title {
    font-size: 16px;
    color: #789;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-rating-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-rating-bar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-member-label {
    font-size: 14px;
    color: #bcd;
    min-width: 100px;
    font-weight: 600;
}

.modal-bar-container {
    flex: 1;
    height: 24px;
    background: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.modal-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 12px;
    transition: width 0.8s ease;
    position: relative;
}

.modal-rating-value {
    font-size: 14px;
    color: #ff6b35;
    font-weight: 700;
    min-width: 50px;
    text-align: right;
}

/* Enhanced Film Cards */
.film-card {
    position: relative;
    overflow: hidden;
}

/* Enhanced Animations */
@keyframes resultReveal {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    50% {
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes wheel-bounce {
    0% { transform: scale(0.88); }
    30% { transform: scale(1.06); }
    50% { transform: scale(0.97); }
    70% { transform: scale(1.02); }
    85% { transform: scale(0.995); }
    100% { transform: scale(1); }
}

.wheel-bounce {
    animation: wheel-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes confetti {
    0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
    position: fixed;
    top: -10px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: #F5A623;
    animation: confetti 3s ease-in forwards;
    pointer-events: none;
    z-index: 10000;
}

/* Gold accent colors for ratings */
.stars,
.rating,
.film-avg-rating,
.member-rating,
.top-film-rating {
    color: #F5A623;
}
.stat-number {
    color: #fff;
}

.rating-badge .rating,
.modal-rating-value {
    color: #F5A623;
}

.modal-bar-fill,
.bar-fill,
.distribution-fill {
    background: linear-gradient(135deg, #F5A623, #f39c12);
}

/* Smooth page transitions */
.view {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.view.active {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced hover effects */
.film-card,
.stat-card,
.member-stat,
.top-film,
.to-watch-item,
.member-detail-card {
    transition: all 0.2s ease;
}

/* film-card:hover defined above — removed duplicate */

/* Rating System Styles */
.rate-film-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 24px;
    margin: 24px 0;
    border: 1px solid #2c3440;
}

.rate-film-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rate-film-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.member-select {
    background: #2c3440;
    color: #def;
    border: 1px solid #456;
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.star-rating {
    display: flex;
    gap: 4px;
    user-select: none;
}

.submit-rating-btn {
    background: #F5A623;
    color: #14181c;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-rating-btn:hover:not(:disabled) {
    background: #e0951e;
    transform: translateY(-1px);
}

.submit-rating-btn:disabled {
    background: #333;
    color: #567;
    cursor: not-allowed;
    transform: none;
}

.rating-feedback {
    font-size: 14px;
    margin-top: 8px;
    min-height: 20px;
}

.user-rated-indicator {
    position: absolute;
    top: 12px;
    left: 40px;
    background: rgba(76, 175, 80, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    z-index: 3;
}

.rating-row.user-rating .member-name {
    color: #F5A623;
    font-weight: 600;
}

.rating-row.user-rating .star-bar {
    color: #F5A623;
    text-shadow: 0 0 4px rgba(253, 203, 110, 0.3);
}

/* Enhanced Stats Styles */
.chart-container {
    background: #1b2228;
    border: 1px solid #2c3440;
    border-radius: 6px;
    padding: 24px;
    margin-top: 16px;
}

.bar-chart-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    margin: 0 8px;
}

#decades-chart {
    display: flex;
    justify-content: space-around;
    align-items: end;
    min-height: 200px;
    padding: 20px 0;
}

.bar-chart-label {
    font-size: 12px;
    color: #789;
    margin-bottom: 8px;
    font-weight: 600;
}

.bar-chart-bars {
    display: flex;
    gap: 4px;
    height: 120px;
    align-items: end;
    margin-bottom: 8px;
}

.bar-chart-bar {
    width: 16px;
    border-radius: 2px;
    transition: height 0.8s ease;
}

.rating-bar {
    background: linear-gradient(180deg, #F5A623, #f39c12);
}

.count-bar {
    background: linear-gradient(180deg, #ff8c00, #ff6a00);
}

.bar-chart-values {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.bar-value {
    font-size: 11px;
    color: #F5A623;
    font-weight: 600;
}

.bar-count {
    font-size: 10px;
    color: #ff8c00;
}

/* Horizontal bar charts for genres */
#genres-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.horizontal-bar-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.horizontal-bar-label {
    min-width: 120px;
    font-size: 13px;
    color: #bcd;
    font-weight: 500;
}

.horizontal-bar-container {
    flex: 1;
    height: 20px;
    background: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
}

.horizontal-bar {
    height: 100%;
    background: linear-gradient(135deg, #F5A623, #f39c12);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.horizontal-bar-value {
    min-width: 80px;
    font-size: 13px;
    color: #F5A623;
    font-weight: 600;
    text-align: right;
}

/* Directors chart */
#directors-chart {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.director-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.director-rank {
    font-size: 18px;
    font-weight: 700;
    color: #F5A623;
    min-width: 40px;
}

.director-info {
    flex: 1;
}

.director-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.director-meta {
    font-size: 12px;
    color: #789;
}

.director-rating {
    font-size: 16px;
    font-weight: 700;
    color: #F5A623;
}

/* Rating distribution chart */
#rating-distribution-chart {
    display: flex;
    justify-content: space-around;
    align-items: end;
    min-height: 150px;
    padding: 20px 0;
}

.distribution-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.distribution-bar-container {
    height: 100px;
    width: 24px;
    background: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: end;
    margin-bottom: 8px;
}

.distribution-bar-fill {
    width: 100%;
    background: linear-gradient(180deg, #F5A623, #f39c12);
    border-radius: 4px;
    transition: height 0.8s ease;
}

.distribution-bar-label {
    font-size: 12px;
    color: #F5A623;
    margin-bottom: 4px;
}

.distribution-bar-count {
    font-size: 11px;
    color: #789;
    font-weight: 600;
}

/* Timeline chart */
.timeline-container {
    background: #1b2228;
    border: 1px solid #2c3440;
    border-radius: 6px;
    padding: 24px;
    margin-top: 16px;
    position: relative;
}

.timeline-svg {
    width: 100%;
    height: 400px;
}

.timeline-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 12px;
    color: #789;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .star-rating {
        justify-content: center;
        gap: 8px;
    }
    
    .star-container {
        font-size: 28px;
        width: 36px;
        height: 36px;
    }
    
    #decades-chart {
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }
    
    .bar-chart-item {
        min-width: 60px;
        margin: 8px;
    }
    
    .horizontal-bar-label {
        min-width: 80px;
        font-size: 12px;
    }
    
    .horizontal-bar-value {
        min-width: 60px;
        font-size: 12px;
    }
    
    .director-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    #rating-distribution-chart {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.hidden { display: none; }
/* Wheel pointer - static arrow on the right */
.wheel-wrapper {
    position: relative;
    width: 60%;
    max-width: 600px;
    min-width: 300px;
    margin: 0 auto;
}
#wheel-canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
}
.wheel-pointer {
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    transform-origin: right center;
    font-size: 36px;
    color: #fff;
    z-index: 10;
    line-height: 1;
    transition: transform 0.06s ease-out;
}
.wheel-pointer svg {
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/* Film poster images */
.film-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
.rewatch-tag {
    font-family: 'Poppins', sans-serif;
    color: #4a6a80;
    font-weight: 400;
}

.film-poster {
    position: relative;
}
.film-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    pointer-events: none;
    z-index: 1;
}
.film-poster {
    min-width: 80px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2c3440;
    border-radius: 4px;
    overflow: hidden;
    font-size: 2em;
}

/* Grid view poster: full width, no side padding */
.films-grid:not(.list-view) .film-card {
    padding: 0;
    overflow: hidden;
}
.films-grid:not(.list-view) .film-poster {
    width: 100%;
    max-width: none;
    min-width: 0;
    aspect-ratio: 2/3;
    border-radius: 6px 6px 0 0;
    margin: 0;
}
.films-grid:not(.list-view) .film-info {
    padding: 12px 16px 16px;
}
.films-grid:not(.list-view) .inline-quote {
    display: none;
}

/* Stacked star ratings */
.film-ratings {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
}
.rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.2;
    overflow: hidden;
    padding-right: 80px;
}
.member-name {
    min-width: 60px;
    color: #8a9;
    font-size: 11px;
    text-align: right;
}
.star-bar {
    color: #F5A623;
    letter-spacing: 1px;
    font-size: 14px;
    min-width: 5.5em;
    text-shadow: none;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
}

/* Half star - clip a full star to show left half only */
.half-star {
    display: inline-block;
    width: 0.5em;
    overflow: hidden;
    vertical-align: top;
}

/* Interactive star rating - rebuilt */
.star-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    font-size: 32px;
    width: 36px;
    height: 36px;
}
.star-glyph {
    pointer-events: none;
    user-select: none;
    transition: color 0.1s;
    position: relative;
    display: inline-block;
}
.star-glyph.star-empty {
    color: #444 !important;
    -webkit-text-fill-color: #444;
    background: none !important;
}
.star-glyph.star-full {
    color: #F5A623 !important;
    -webkit-text-fill-color: #F5A623;
    background: none !important;
}
.star-glyph .star-back {
    color: #444;
    -webkit-text-fill-color: #444;
}
.star-glyph .star-half-clip {
    position: absolute;
    left: 0;
    top: 0;
    color: #F5A623;
    -webkit-text-fill-color: #F5A623;
    width: 0.5em;
    overflow: hidden;
    display: inline-block;
}
.star-zone {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    z-index: 2;
}
.star-zone-left {
    left: 0;
}
.star-zone-right {
    right: 0;
}

.guest-name-input {
    width: 100%;
    padding: 10px 14px;
    background: #2c3440;
    border: 1px solid #456;
    border-radius: 4px;
    color: #def;
    font-size: 13px;
    margin-top: 8px;
    box-sizing: border-box;
}
.guest-name-input:focus {
    outline: none;
    border-color: #F5A623;
}

/* Film quotes with attribution */
.film-quote {
    font-style: italic;
    color: #9ab;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
}
.quote-attr {
    color: #F5A623;
    font-style: normal;
    font-size: 11px;
}

.rating-comment {
    width: 100%;
    padding: 10px 14px;
    background: #2c3440;
    border: 1px solid #456;
    border-radius: 4px;
    color: #def;
    font-size: 13px;
    margin-top: 8px;
    box-sizing: border-box;
}
.rating-comment:focus {
    outline: none;
    border-color: #F5A623;
}

/* Queue Management */
.queue-management {
    margin-top: 40px;
    padding: 24px;
    background: #1b2228;
    border-radius: 6px;
    border: 1px solid #2c3440;
}
.queue-management h3 {
    margin-bottom: 16px;
    color: #fff;
}
.add-film-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.queue-input, .queue-select {
    padding: 10px 14px;
    background: #2c3440;
    border: 1px solid #456;
    border-radius: 4px;
    color: #def;
    font-size: 13px;
}
.queue-input { flex: 1; min-width: 200px; }
.queue-select { min-width: 150px; }
.queue-input::placeholder { color: #789; }
.queue-select { color: #789; }
.queue-select option { color: #def; }
.queue-input:focus, .queue-select:focus { outline: none; border-color: #5a7a9a; }
.queue-btn {
    padding: 10px 20px;
    background: #2c3440;
    color: #fff;
    border: 1px solid #4a5a6a;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.queue-btn:hover { background: #3c4a58; }
.queue-list { display: flex; flex-direction: column; gap: 6px; }
.queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}
.queue-item.queue-skipped {
    opacity: 0.4;
    text-decoration: line-through;
}
.queue-film-info { flex: 1; }
.queue-title { color: #eee; margin-right: 12px; }
.queue-suggestor { color: #789; font-size: 12px; }
.queue-actions { display: flex; gap: 4px; }
.queue-skip-btn, .queue-remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    color: #678;
    transition: color 0.15s ease, background 0.15s ease;
}
.queue-skip-btn:hover, .queue-remove-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* Film card overhaul — list view poster */
.films-grid.list-view .film-poster {
    min-width: 100px;
    min-height: 150px;
    max-width: 100px;
    margin: 0;
    padding: 0;
}
.films-grid.list-view .film-card {
    padding: 12px;
    gap: 20px;
}
.films-grid.list-view .film-title {
    font-size: 21px;
}
.films-grid.list-view .film-meta {
    font-size: 16px;
}
.films-grid.list-view .rating-row {
    font-size: 15px;
}
.films-grid.list-view .member-name,
.films-grid.list-view .rating-num {
    font-size: 13px;
}
.films-grid.list-view .star-bar {
    font-size: 16px;
}
.film-card {
    position: relative;
}
.film-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    accent-color: #333;
    opacity: 0.3;
    width: 14px;
    height: 14px;
}
.film-checkbox:checked {
    opacity: 1;
    accent-color: #F5A623;
}
.film-number {
    position: absolute;
    bottom: 8px;
    right: 8px;
    color: #4a6a80;
    font-size: 11px;
}
.film-title {
    font-weight: 700;
    font-size: 18px;
}
.film-ratings {
    margin-left: 0;
    padding-left: 0;
}
.member-name {
    min-width: 60px;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #678;
}
.rating-num {
    color: #678;
    font-size: 11px;
    min-width: 22px;
    text-align: right;
}
.inline-quote {
    color: #678;
    font-style: italic;
    font-size: 12px;
    margin-left: 16px;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
    flex: 1;
    display: inline-block;
    vertical-align: middle;
}

/* Page titles — Playfair Display */
h1, h2, .logo {
    font-family: 'Playfair Display', serif;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}
.logo-img {
    height: 37px;
    width: auto;
    display: block;
}
.logo-icon {
    margin-right: 8px;
    flex-shrink: 0;
}

/* Suggestion Slots */
.suggestion-section {
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 16px;
}
.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.suggestion-round {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #F5A623;
}
.suggestion-count {
    font-size: 10px;
    color: #567;
    font-family: 'Poppins', sans-serif;
}
.suggestion-slots {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.suggestion-slot {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-family: 'Poppins', sans-serif;
    height: 28px;
    transition: background 0.15s;
    max-width: 100%;
    overflow: hidden;
    min-width: 0;
}
.suggestion-active {
    background: rgba(245, 166, 35, 0.06);
    border: 1px solid rgba(245, 166, 35, 0.15);
}
.suggestion-watched {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    opacity: 0.6;
}
.suggestion-empty {
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.1);
    cursor: pointer;
}
.suggestion-empty:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(245, 166, 35, 0.3);
}
.suggestion-icon {
    flex-shrink: 0;
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #567;
}
.suggestion-icon svg {
    width: 11px;
    height: 11px;
}
.suggestion-active .suggestion-icon {
    color: #F5A623;
}
.suggestion-watched .suggestion-icon {
    color: #4a6a80;
}
.suggestion-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ccc;
}
.suggestion-watched .suggestion-title {
    color: #789;
}
.suggestion-swap-btn, .suggestion-remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s;
    color: #567;
    display: flex;
    align-items: center;
}
.suggestion-slot:hover .suggestion-swap-btn,
.suggestion-slot:hover .suggestion-remove-btn {
    opacity: 0.6;
}
.suggestion-swap-btn:hover, .suggestion-remove-btn:hover {
    opacity: 1 !important;
    background: rgba(255,255,255,0.1);
}

/* Guest toggle switch — Apple-style */
.guest-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.guest-toggle input { display: none; }
.toggle-slider {
    width: 36px;
    height: 20px;
    background: #2c3440;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s ease;
}
.toggle-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.guest-toggle input:checked + .toggle-slider {
    background: #F5A623;
}
.guest-toggle input:checked + .toggle-slider::after {
    transform: translateX(16px);
}
