* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #14213d;
    min-height: 100vh;
    color: #ffffff;
    overflow-x: hidden;
}

/* Game Screen Layout */
#game-screen {
    display: none;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    background: #000000;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}

#game-screen.active {
    display: flex;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.game-content {
    background: #000000;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.hidden {
    display: none !important;
}

/* Setup Screen */
#setup-screen {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
    z-index: 1000;
}

#setup-screen.active {
    display: flex;
}

.setup-content {
    background: #02020a;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.setup-content h2 {
    margin-bottom: 30px;
    color: #198754;
    font-size: 2rem;
}

.game-info {
    margin-bottom: 30px;
    text-align: center;
}

.game-info p {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #cccccc;
}

.info-note {
    font-size: 0.9rem;
    color: #888888;
    font-style: italic;
}

#team-setup h3 {
    color: #198754;
    margin: 30px 0 20px 0;
    font-size: 1.3rem;
}

.team-input {
    margin-bottom: 20px;
}

.team-input label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #cccccc;
}

.team-input input {
    width: 100%;
    padding: 12px;
    border: 2px solid #333333;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: #111111;
    color: #ffffff;
}

.team-input input:focus {
    outline: none;
    border-color: #198754;
}

.team-input select {
    width: 100%;
    padding: 12px;
    border: 2px solid #333333;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: #111111;
    color: #ffffff;
    cursor: pointer;
}

.team-input select:focus {
    outline: none;
    border-color: #198754;
}

.team-input select option {
    background: #111111;
    color: #ffffff;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.mode-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #111111;
    border: 2px solid #333333;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-option:has(input:checked) {
    background: #198754;
    border-color: #198754;
}

.mode-option input[type="radio"] {
    display: none;
}

.mode-option span {
    font-weight: bold;
    font-size: 1rem;
    color: #ffffff;
}

.mode-content {
    margin-bottom: 20px;
}

/* Year Slider Styling */
.year-slider-container {
    margin-bottom: 20px;
}

.year-slider-container label {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
    color: #cccccc;
    text-align: center;
}

.year-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.year-label {
    font-size: 1.5rem;
    font-weight: bold;
    color: #198754;
    background: #111111;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid #198754;
    min-width: 80px;
    text-align: center;
}

.year-song-count {
    font-size: 1.2rem;
    font-weight: bold;
    color: #cccccc;
    padding: 8px 16px;
    text-align: center;
    flex: 1;
    margin: 0 10px;
}

.year-slider-wrapper {
    position: relative;
    padding: 20px 0;
}

.year-slider-track {
    position: relative;
    height: 8px;
    background: #333333;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 15px;
}

.year-slider-range {
    position: absolute;
    height: 100%;
    background: #198754;
    border-radius: 4px;
    pointer-events: none;
}

.year-slider-handle {
    position: absolute;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border: 3px solid #198754;
    border-radius: 50%;
    cursor: grab;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: background-color 0.2s, transform 0.1s;
}

.year-slider-handle:hover {
    background: #198754;
    transform: translate(-50%, -50%) scale(1.15);
}

.year-slider-handle:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.1);
}

.year-handle-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    background: #198754;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.year-slider-handle:hover .year-handle-tooltip,
.year-slider-handle:active .year-handle-tooltip {
    opacity: 1;
}

/* Buttons */
.btn {
    padding: 14px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background: #198754;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Current Team Indicator (Header) */
.current-team-indicator {
    text-align: center;
    padding: 20px 30px;
    width: 100%;
    transition: background-color 0.3s;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.current-team-indicator.team1 {
    background: #7209b7;
}

.current-team-indicator.team2 {
    background: #fb8500;
}

.modal-team-scores {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.modal-team-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
}

.modal-team-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
}

.modal-score {
    font-size: 1rem;
    color: white;
    opacity: 0.9;
}

.team-indicator-content {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    flex: 1;
    text-align: center;
}

.team-indicator-content #modal-team-name {
    font-size: 1.8rem;
}

/* Video Container - Center of Screen */
.video-container {
    position: fixed;
    top: -10px;
    left: 0;
    right: 0;
    bottom: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
}

#youtube-player {
    width: 95vw;
    height: calc(100vh - 190px);
    max-width: none;
    border-radius: 0;
    margin: 0;
    display: block;
}

/* Guess Section - Footer with Timeline Cards */
.guess-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 20px;
    background: #02020a;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.8);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

.guess-options {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar styling for better visibility */
.guess-options::-webkit-scrollbar {
    height: 10px;
}

.guess-options::-webkit-scrollbar-track {
    background: #02020a;
    border-radius: 5px;
}

.guess-options::-webkit-scrollbar-thumb {
    background: #198754;
    border-radius: 5px;
}

.guess-options::-webkit-scrollbar-thumb:hover {
    background: #146c43;
}

.guess-btn {
    padding: 15px 25px;
    font-size: 1rem;
    background: #111111;
    border: 3px solid #198754;
    color: #198754;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    flex-shrink: 0;
    min-width: 120px;
    white-space: nowrap;
}

.guess-btn:hover {
    background: #198754;
    color: white;
    transform: scale(1.05);
}

.guess-year-card {
    background: linear-gradient(135deg, #198754 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 150px;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.guess-year-card .year {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.guess-year-card .song-title {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 3px;
}

.guess-year-card .song-artist {
    font-size: 0.8rem;
    opacity: 0.85;
    font-style: italic;
}

/* Result Section */
.result-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.result-content {
    background: #02020a;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.result-content h3 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.result-content h3.correct {
    color: #28a745;
}

.result-content h3.incorrect {
    color: #dc3545;
}

.song-reveal {
    margin: 30px 0;
    padding: 20px;
    background: #0a0a0f;
    border-radius: 10px;
}

.reveal-song {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.reveal-artist {
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 15px;
}

.reveal-year {
    font-size: 1.8rem;
    color: #198754;
    font-weight: bold;
}

/* Winner Screen */
.winner-content {
    background: #02020a;
    border-radius: 20px;
    padding: 50px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.winner-content h2 {
    font-size: 3rem;
    color: #198754;
    margin-bottom: 20px;
}

.winner-content h3 {
    font-size: 2.5rem;
    color: #28a745;
    margin-bottom: 15px;
}

.winner-message {
    font-size: 1.5rem;
    color: #cccccc;
    margin-bottom: 40px;
}

.final-scores {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 40px;
}

.final-score {
    padding: 20px;
    background: #0a0a0f;
    border-radius: 10px;
    min-width: 150px;
}

.final-score h4 {
    color: #198754;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.final-score p {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
}

/* Responsive - Mobile Styles */
@media (max-width: 768px) {
    /* Setup Screen Mobile */
    .setup-content {
        padding: 20px;
        margin: 10px;
    }
    
    .setup-content h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .game-info p {
        font-size: 1rem;
    }
    
    #team-setup h3 {
        font-size: 1.1rem;
        margin: 20px 0 15px 0;
    }
    
    .team-input input,
    .team-input select {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    /* Game Screen Mobile */
    .current-team-indicator {
        padding: 10px 15px;
    }
    
    .modal-team-scores {
        flex-direction: row;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .modal-team-score {
        flex: 0 1 auto;
        min-width: 80px;
    }
    
    .modal-team-name {
        font-size: 0.9rem;
    }
    
    .modal-score {
        font-size: 0.8rem;
    }
    
    .team-indicator-content {
        font-size: 1rem;
        flex: 1 1 100%;
        order: -1;
        margin-bottom: 5px;
    }
    
    .team-indicator-content #modal-team-name {
        font-size: 1.2rem;
    }
    
    /* Video Container Mobile */
    .video-container {
        bottom: 180px;
        top: 0;
    }
    
    #youtube-player {
        width: 100vw;
        height: calc(100vh - 180px);
    }
    
    /* Guess Section Mobile */
    .guess-section {
        padding: 10px;
        max-height: 180px;
    }
    
    .guess-options {
        gap: 8px;
        padding: 5px;
    }
    
    .guess-btn {
        padding: 12px 18px;
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .guess-year-card {
        padding: 12px 15px;
        min-width: 120px;
    }
    
    .guess-year-card .year {
        font-size: 1.5rem;
    }
    
    .guess-year-card .song-title {
        font-size: 0.8rem;
    }
    
    .guess-year-card .song-artist {
        font-size: 0.7rem;
    }
    
    /* Result Section Mobile */
    .result-content {
        padding: 30px 20px;
        margin: 10px;
        max-width: 90%;
    }
    
    .result-content h3 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .song-reveal {
        margin: 20px 0;
        padding: 15px;
    }
    
    .reveal-song {
        font-size: 1.2rem;
    }
    
    .reveal-artist {
        font-size: 1rem;
    }
    
    .reveal-year {
        font-size: 1.4rem;
    }
    
    /* Winner Screen Mobile */
    .winner-content {
        padding: 30px 20px;
        margin: 10px;
        max-width: 90%;
    }
    
    .winner-content h2 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .winner-content h3 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .winner-message {
        font-size: 1.2rem;
        margin-bottom: 30px;
    }
    
    .final-scores {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .final-score {
        padding: 15px;
        min-width: 120px;
    }
    
    .final-score h4 {
        font-size: 1.2rem;
    }
    
    .final-score p {
        font-size: 1rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .setup-content {
        padding: 15px;
    }
    
    .setup-content h2 {
        font-size: 1.3rem;
    }
    
    .modal-team-name {
        font-size: 0.8rem;
    }
    
    .modal-score {
        font-size: 0.75rem;
    }
    
    .team-indicator-content {
        font-size: 0.9rem;
    }
    
    .team-indicator-content #modal-team-name {
        font-size: 1.1rem;
    }
    
    .guess-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
        min-width: 90px;
    }
    
    .guess-year-card {
        padding: 10px 12px;
        min-width: 100px;
    }
    
    .guess-year-card .year {
        font-size: 1.3rem;
    }
    
    .result-content h3 {
        font-size: 1.5rem;
    }
    
    .winner-content h2 {
        font-size: 1.6rem;
    }
    
    .winner-content h3 {
        font-size: 1.5rem;
    }
}
