/* Jeopardy Game Styles - Google Material Design Inspired */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: white;
    color: #333;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

header {
    text-align: center;
    margin-bottom: 24px;
    background: transparent;
    border-radius: 0;
    padding: 24px 0;
    box-shadow: none;
    backdrop-filter: none;
    border: none;
}

.logo-container {
    margin-bottom: 0;
}

.jeopardy-logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.subtitle {
    display: none;
}

/* Game Controls */
.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 16px;
}

.gear-btn {
    background: #1654A0;
    color: #FFD700;
    border: 2px solid #FFD700;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0;
}

.gear-btn:hover {
    background: #1A5BA8;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.gear-btn svg {
    color: #FFD700;
}

.round-indicator {
    text-align: center;
}

.round-indicator h2 {
    color: #1654A0;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: none;
}

.next-round-btn {
    padding: 12px 24px;
    background: #FFD700;
    color: #1654A0;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.next-round-btn:hover {
    background: #FFC107;
    transform: translateY(-1px);
}

.players-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.players-controls input {
    padding: 12px 16px;
    border: 2px solid #FFD700;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s ease;
    min-width: 200px;
}

.players-controls input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.players-controls input::placeholder {
    color: rgba(255, 215, 0, 0.7);
}

.players-controls button {
    padding: 12px 24px;
    background: #FFD700;
    color: #060CE9;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.players-controls button:hover {
    background: #FFC107;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.players-controls button:active {
    transform: translateY(0);
}

.players-container {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.player-card {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #FFD700;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    min-width: 160px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.player-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.2);
}

.player-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #FFD700;
}

.player-score {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: white;
}

.score-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}

.score-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    font-weight: 600;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-btn.add {
    background: #4CAF50;
    color: white;
}

.score-btn.add:hover {
    background: #45a049;
    transform: scale(1.1);
}

.score-btn.subtract {
    background: #F44336;
    color: white;
}

.score-btn.subtract:hover {
    background: #da190b;
    transform: scale(1.1);
}

.remove-player {
    background: #FF5722;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.remove-player:hover {
    background: #E64A19;
    transform: translateY(-1px);
}

/* Game Board */
.game-board-container {
    margin-bottom: 24px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    border: none;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    max-width: 1200px;
    margin: 0 auto;
    background: #000;
    padding: 2px;
    border-radius: 0;
    box-shadow: none;
}

.board-cell {
    aspect-ratio: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
    border: 1px solid #000;
}

.category-cell {
    background: #1654A0;
    color: white;
    font-size: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 8px;
    font-weight: 400;
    font-family: 'Roboto', sans-serif;
    line-height: 1.2;
    border: 1px solid #000;
}

.question-cell {
    background: #1654A0;
    color: #FFD700;
    font-size: 2.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
    border: 1px solid #000;
    font-family: 'Roboto', sans-serif;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.question-cell:hover {
    transform: none;
    box-shadow: inset 0 0 0 3px #FFD700;
    z-index: 1;
    background: #1A5BA8;
}

.question-cell.answered {
    background: #1654A0;
    color: #1654A0;
    cursor: not-allowed;
    box-shadow: none;
    border: 1px solid #000;
}

.question-cell.answered:hover {
    transform: none;
    box-shadow: none;
    background: #1654A0;
}

/* Players Display (when visible) */
.players-display {
    margin-top: 24px;
    padding: 16px;
    background: rgba(22, 84, 160, 0.1);
    border-radius: 8px;
    border: 1px solid #1654A0;
}

.players-display .players-container {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.players-display .player-card {
    background: #1654A0;
    border: 2px solid #FFD700;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    min-width: 120px;
}

.players-display .player-name {
    color: #FFD700;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.players-display .player-score {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Modal Styles */
/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: linear-gradient(135deg, #060CE9, #1B1F7C);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    border: 3px solid #FFD700;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from { 
        transform: translateY(-50px) scale(0.9); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

.modal-header {
    background: #FFD700;
    color: #060CE9;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}

.close,
.close-management {
    color: #060CE9;
    font-size: 32px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover,
.close-management:hover {
    background: rgba(6, 12, 233, 0.1);
    border-radius: 50%;
}

.modal-body {
    padding: 32px;
    color: white;
    overflow-y: auto;
    flex: 1;
    max-height: calc(85vh - 120px);
}

.question-text {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.4;
    font-weight: 500;
    color: white;
}

.question-value {
    font-size: 3rem;
    text-align: center;
    color: #FFD700;
    font-weight: 700;
    margin-bottom: 32px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.answer-text {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.4;
    color: #2E7D32;
    font-weight: 600;
    background: rgba(76, 175, 80, 0.1);
    border: 2px solid #4CAF50;
    border-radius: 12px;
    padding: 20px;
}

.question-controls {
    text-align: center;
    margin-bottom: 24px;
}

.show-answer-btn {
    padding: 16px 32px;
    background: linear-gradient(45deg, #FFD700, #FFC107);
    color: #060CE9;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
}

.show-answer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.6);
}

.player-actions h4 {
    text-align: center;
    margin-bottom: 24px;
    color: #FFD700;
    font-weight: 700;
    font-size: 1.2rem;
}

.player-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.player-response-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 8px;
    padding: 16px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 12px;
    border: 2px solid #FFD700;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.player-response-group:hover {
    border-color: #FFC107;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.player-response-name {
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 12px;
    font-size: 16px;
}

.player-response-buttons {
    display: flex;
    gap: 8px;
}

.player-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 80px;
}

.player-btn.correct {
    background: #4CAF50;
    color: white;
}

.player-btn.correct:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.player-btn.incorrect {
    background: #F44336;
    color: white;
}

.player-btn.incorrect:hover {
    background: #da190b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.player-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.player-btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.final-actions {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #FFD700;
}

.no-one-btn {
    padding: 12px 24px;
    background: #666;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.no-one-btn:hover {
    background: #555;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 102, 102, 0.3);
}

/* Question Management Modal */
/* Question Management Modal */
.management-section {
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.management-section h3 {
    color: #FFD700;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 1.2rem;
}

.management-section input,
.management-section select,
.management-section textarea {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s ease;
}

.management-section input:focus,
.management-section select:focus,
.management-section textarea:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.management-section input::placeholder,
.management-section textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.management-section textarea {
    height: 80px;
    resize: vertical;
}

.management-section button {
    padding: 12px 24px;
    background: #FFD700;
    color: #060CE9;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    margin-right: 12px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.management-section button:hover {
    background: #FFC107;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

#clearAllDataBtn {
    background: #F44336;
    color: white;
}

#clearAllDataBtn:hover {
    background: #D32F2F;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .jeopardy-logo {
        max-width: 280px;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .game-board {
        gap: 1px;
        padding: 1px;
    }
    
    .question-cell {
        font-size: 1.4rem;
    }
    
    .category-cell {
        font-size: 0.8rem;
        padding: 12px 4px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header {
        padding: 20px 24px;
    }
    
    .modal-body {
        padding: 24px 20px;
    }
    
    .question-text {
        font-size: 1.4rem;
    }
    
    .question-value {
        font-size: 2.2rem;
    }
    
    .players-container {
        justify-content: center;
    }
    
    .player-card {
        min-width: 140px;
    }
    
    .players-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .players-controls input {
        min-width: auto;
        margin-bottom: 8px;
    }
    
    .player-buttons {
        gap: 12px;
    }
    
    .player-response-group {
        margin: 4px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .jeopardy-logo {
        max-width: 220px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .round-indicator h2 {
        font-size: 2rem;
    }
    
    .question-cell {
        font-size: 1.1rem;
    }
    
    .category-cell {
        font-size: 0.7rem;
        padding: 8px 2px;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
    
    .question-value {
        font-size: 1.8rem;
    }
    
    .player-response-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .player-btn {
        min-width: 60px;
        padding: 8px 12px;
        font-size: 12px;
    }
}