/**
 * Display CSS for Big Screen (TV/Projector)
 * Optimized for 1920x1080 and larger displays
 */

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

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #eee;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Connection Screen */
.connection-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.connection-screen.active {
    display: flex;
}

.connection-container {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.connection-container h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.5rem;
    color: #aaa;
    margin-bottom: 2rem;
}

.connection-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-field {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

.input-field:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.1);
}

.btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.status-text {
    font-size: 1rem;
    color: #aaa;
    margin-top: 1rem;
}

/* Display Screen */
.display-screen {
    width: 100vw;
    height: 100vh;
    display: flex;
    position: relative;
}

/* Main Area (Question) */
.main-area {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
    transition: background 0.5s ease;
}

.main-area.answers-enabled {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #43a047 100%);
}

/* Sidebar */
.sidebar {
    width: 350px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
}

.sidebar-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-panel h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #667eea;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-panel.hidden {
    display: none;
}

/* Game Board */
.game-board {
    display: none;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    width: 100%;
    height: 100%;
    animation: fadeIn 0.5s ease;
}

.game-board.active {
    display: flex;
}

.board-title {
    font-size: 5rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.board-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.board-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.board-cell {
    background: #0f3460;
    border: 3px solid #16213e;
    border-radius: 12px;
    padding: 3rem 1.5rem;
    position: relative;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.board-cell.answered {
    background: #1a3a1a;
    border-color: #2e7d32;
    opacity: 0.6;
}

.cell-points {
    font-size: 3rem;
    font-weight: 700;
    color: #ffd700;
}

.board-cell.answered .cell-points {
    color: #4caf50;
}

.cell-check {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: #4caf50;
}

/* Question Display */
.question-display {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 90%;
    max-width: 1400px;
    max-height: 95vh;
    overflow-y: auto;
    animation: slideIn 0.5s ease;
}

.question-display.active {
    display: flex;
}

.hidden {
    display: none !important;
}

.question-header {
    width: 100%;
    text-align: center;
    margin-bottom: 3rem;
}

.category {
    font-size: 3rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.points {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.answer-lock-status {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
    display: inline-block;
    opacity: 0.7;
}

.answer-lock-status.locked {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #aaa;
}

.answer-lock-status.unlocked {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #66bb6a;
}

.answer-lock-status.hidden {
    display: none;
}

.question-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
    padding: 1rem 0;
}

/* Text Content */
.text-content {
    width: 100%;
    text-align: center;
}

.question-text {
    font-size: 3.5rem;
    font-weight: 500;
    line-height: 1.5;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 2rem;
}

/* Image Content */
.image-content {
    max-width: 90vw;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Video Content */
.video-content {
    max-width: 90vw;
    max-height: 70vh;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Audio Content */
.audio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

#audioPlayer {
    width: 80%;
    max-width: 600px;
    height: 80px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.audio-text {
    font-size: 2.5rem;
    font-weight: 500;
    color: #fff;
    text-align: center;
    padding: 0 2rem;
}

/* Answer Display */
.answer-display {
    margin-top: 3rem;
    padding: 2rem 3rem;
    background: rgba(102, 187, 106, 0.15);
    border: 3px solid #66bb6a;
    border-radius: 16px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.5s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.answer-label {
    font-size: 1.8rem;
    color: #66bb6a;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.answer-text {
    font-size: 3rem;
    color: white;
    line-height: 1.4;
    font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* First Press Info */
.first-press-info {
    text-align: center;
}

.first-press-name {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.first-press-time {
    font-size: 1.5rem;
    color: #aaa;
}

/* All Presses List */
.all-presses-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.press-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.press-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.press-rank {
    font-size: 1rem;
    font-weight: 700;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.3);
    color: #667eea;
    flex-shrink: 0;
}

.press-item.rank-1 .press-rank {
    background: rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

.press-item.rank-2 .press-rank {
    background: rgba(192, 192, 192, 0.3);
    color: #c0c0c0;
}

.press-item.rank-3 .press-rank {
    background: rgba(205, 127, 50, 0.3);
    color: #cd7f32;
}

.press-name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.press-time {
    font-size: 0.85rem;
    color: #aaa;
    font-weight: 500;
    flex-shrink: 0;
}

/* Scoreboard */
.scoreboard {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.scoreboard-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.scoreboard-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.scoreboard-position {
    font-size: 1.2rem;
    font-weight: 700;
    width: 30px;
    text-align: center;
    color: #667eea;
}

.scoreboard-row.position-1 .scoreboard-position {
    color: #ffd700;
}

.scoreboard-row.position-2 .scoreboard-position {
    color: #c0c0c0;
}

.scoreboard-row.position-3 .scoreboard-position {
    color: #cd7f32;
}

.scoreboard-name {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 500;
}

.scoreboard-score {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
}

.no-data {
    text-align: center;
    color: #666;
    padding: 1rem;
    font-style: italic;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1200px) {
    .sidebar {
        width: 300px;
        padding: 1.5rem 1rem;
    }

    .logo {
        font-size: 4rem;
    }

    .category {
        font-size: 2.5rem;
    }

    .points {
        font-size: 2rem;
    }

    .question-text {
        font-size: 2.5rem;
    }

    .audio-text {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .display-screen {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 40vh;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .logo {
        font-size: 3rem;
    }

    .category {
        font-size: 2rem;
    }

    .points {
        font-size: 1.5rem;
    }

    .question-text {
        font-size: 1.8rem;
    }

    .audio-text {
        font-size: 1.5rem;
    }
}

/* Final Round Styles */
.final-themes-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
}

.final-theme-item {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 24px rgba(255, 152, 0, 0.3);
}

.final-theme-item.eliminated {
    background: linear-gradient(135deg, #666 0%, #555 100%);
    opacity: 0.4;
    text-decoration: line-through;
}

.final-theme-item .eliminated-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    opacity: 0.9;
}

.final-selected-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    text-align: center;
}

.final-title {
    font-size: 3rem;
    color: #ffa726;
    margin-bottom: 2rem;
}

.final-theme-big {
    font-size: 5rem;
    font-weight: 800;
    color: #fff;
    padding: 3rem 4rem;
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    border-radius: 24px;
    box-shadow: 0 16px 48px rgba(255, 152, 0, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.final-timer {
    background: linear-gradient(135deg, #ffa726, #ff9800);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 2.5rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.5);
    margin-top: 1rem;
}

.final-timer.hidden {
    display: none;
}

/* Winners Page */
.winners-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 100%;
    height: 100%;
    animation: fadeIn 0.5s ease-in;
}

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

.winners-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.winners-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 2.5rem;
    border-radius: 20px;
    min-width: 250px;
    position: relative;
    animation: slideUp 0.6s ease-out;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.podium-place.first {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    min-height: 400px;
    animation-delay: 0.2s;
    transform: scale(1.1);
    z-index: 3;
}

.podium-place.second {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    min-height: 350px;
    animation-delay: 0s;
    z-index: 2;
}

.podium-place.third {
    background: linear-gradient(135deg, #cd7f32 0%, #e8a87c 100%);
    min-height: 320px;
    animation-delay: 0.4s;
    z-index: 1;
}

.podium-medal {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.podium-name {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
    text-align: center;
}

.podium-score {
    font-size: 3rem;
    font-weight: 800;
    color: #0f3460;
    margin-bottom: 0.5rem;
}

.podium-rank {
    font-size: 1.3rem;
    font-weight: 600;
    color: #16213e;
    opacity: 0.8;
}

.other-players {
    width: 100%;
    max-width: 900px;
    margin-top: 2rem;
}

.other-players h3 {
    font-size: 2rem;
    color: #ffa726;
    margin-bottom: 1.5rem;
    text-align: center;
}

.other-players-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.other-player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.other-player:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.other-rank {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffa726;
    min-width: 50px;
}

.other-name {
    flex: 1;
    font-size: 1.8rem;
    font-weight: 600;
    color: #eee;
    margin-left: 1rem;
}

.other-score {
    font-size: 2rem;
    font-weight: 700;
    color: #4caf50;
}
