:root {
    --primary-color: #4a90e2;
    --secondary-color: #50c878;
    --accent-color: #ff6b6b;
    --text-color: #2c3e50;
    --card-color: #ffffff;
    --background-color: #f0f7ff;
    --modal-background: #ffffff;
}

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #e0f7fa, #bbdefb);
    color: var(--text-color);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

h1 {
    text-align: center;
    color: #4a5568;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 2em;
}

.setup-screen {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-board {
    display: none;
    margin-top: 20px;
}

.categories-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.category-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.category {
    text-align: center;
    font-weight: bold;
    padding: 15px;
    background: var(--primary-color);
    border-radius: 15px;
    margin-bottom: 10px;
    font-size: 1em;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.category:hover {
    transform: translateY(-2px);
}

.card {
    aspect-ratio: 1;
    background: var(--card-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.8em;
    transition: all 0.3s;
    position: relative;
    color: var(--primary-color);
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.card.answered {
    opacity: 0.7;
    cursor: not-allowed;
    transform: scale(0.95);
}

.card.answered::after {
    content: 'X';
    position: absolute;
    font-size: 2.5em;
    color: var(--accent-color);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--modal-background);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.player-info {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.player-input {
    flex: 1;
}

input, button {
    padding: 12px 20px;
    margin: 8px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1.1em;
    transition: all 0.3s;
}

input {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

button {
    background: var(--secondary-color);
    color: white;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.player-turn {
    margin: 25px 0;
    padding: 20px;
    background: var(--secondary-color);
    border-radius: 15px;
    text-align: center;
    color: white;
    font-weight: bold;
    font-size: 1.3em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    animation: pulse 2s infinite;
}

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

.score-board {
    display: flex;
    justify-content: space-around;
    margin: 25px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.player-score {
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    transition: transform 0.3s;
}

.player-score:hover {
    transform: translateY(-3px);
}

.option-button {
    width: 100%;
    margin: 12px 0;
    padding: 20px;
    text-align: left;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.4em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
}

.option-button:hover:not(:disabled) {
    background: #357abd;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.option-button:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

.option-button.selected {
    background: #ffd700;
    color: var(--text-color);
    transform: scale(1.02);
}

.option-button.correct {
    background: #50c878;
    color: white;
    animation: correctAnswer 0.5s ease;
}

.option-button.incorrect {
    background: #ff6b6b;
    color: white;
    animation: incorrectAnswer 0.5s ease;
}

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

@keyframes incorrectAnswer {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    display: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.close-button:hover {
    background: #ff5252;
    transform: scale(1.1) rotate(90deg);
}

#modalQuestion {
    font-size: 1.6em;
    margin-bottom: 30px;
    line-height: 1.4;
    color: var(--text-color);
}

#modalFeedback {
    font-size: 1.4em;
    margin-top: 25px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease;
}

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

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .categories-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }

    .option-button {
        font-size: 1.2em;
        padding: 15px;
    }

    #modalQuestion {
        font-size: 1.3em;
    }

    .score-board {
        flex-direction: column;
        gap: 10px;
    }
}

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

    .player-info {
        flex-direction: column;
    }

    .player-input {
        width: 100%;
    }
}

.subtitle {
    text-align: center;
    color: #718096;
    font-size: 1.2em;
    margin-bottom: 30px;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 30px;
    color: white;
    font-weight: bold;
    font-size: 1.1em;
}

.question-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-left: 5px solid #48bb78;
    transition: transform 0.3s ease;
}

.question-card:hover {
    transform: translateY(-2px);
}

.question-number {
    background: #48bb78;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 15px;
    font-weight: bold;
}

.question {
    font-size: 1.2em;
    margin-bottom: 20px;
    line-height: 1.4;
    color: #2d3748;
}

.options {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.option {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
}

.option:hover {
    background: #e6fffa;
    border-color: #38b2ac;
    transform: translateX(5px);
}

.option.selected {
    background: #bee3f8;
    border-color: #3182ce;
}

.option.correct {
    background: #c6f6d5;
    border-color: #48bb78;
    color: #22543d;
}

.option.incorrect {
    background: #fed7d7;
    border-color: #e53e3e;
    color: #742a2a;
}

.check-btn {
    background: linear-gradient(45deg, #4299e1, #3182ce);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 153, 225, 0.4);
}

.next-btn {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    display: none;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

.feedback {
    margin-top: 15px;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
    display: none;
}

.feedback.correct {
    background: #c6f6d5;
    color: #22543d;
    border: 2px solid #48bb78;
}

.feedback.incorrect {
    background: #fed7d7;
    color: #742a2a;
    border: 2px solid #e53e3e;
}

.final-score {
    text-align: center;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    border-radius: 20px;
    margin-top: 30px;
    display: none;
}

.restart-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    width: 0%;
    transition: width 0.5s ease;
}

.game-setup {
    text-align: center;
    padding: 20px;
}

.setup-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.setup-card h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 2em;
}

.setup-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.setup-option {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.setup-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #4299e1;
}

.setup-option.selected {
    background: #ebf8ff;
    border-color: #4299e1;
    box-shadow: 0 5px 15px rgba(66, 153, 225, 0.2);
}

.setup-option h3 {
    color: #4a5568;
    margin: 10px 0;
}

.setup-option p {
    color: #718096;
    font-size: 0.9em;
}

.start-game-btn {
    background: linear-gradient(45deg, #4299e1, #3182ce);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.start-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 153, 225, 0.4);
}

.start-game-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-dialog {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: modalFadeIn 0.3s ease;
}

.modal-dialog h3 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.modal-dialog p {
    color: #718096;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-btn {
    padding: 12px 25px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
}

.modal-btn.cancel {
    background: #e2e8f0;
    color: #4a5568;
}

.modal-btn.confirm {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.header {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
}

.home-link {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.2em;
    padding: 10px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.home-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.05);
} 