:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-yellow: #ffeaa7;
    --dark-blue: #2d3436;
    --text-color: #2d3436;
    --bg-color: #f7f9fc;
    --font-heading: 'Playfair Display', serif;
    --font-main: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    font-family: var(--font-main);
}

.game-container {
    padding-top: 100px;
    padding-bottom: 50px;
    min-height: 100vh;
}

/* Header & Stats */
.game-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 20px;
}

.game-title {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
    color: var(--dark-blue);
}

.highlight {
    color: var(--primary-color);
}

.tagline {
    color: #636e72;
    font-size: 1.1rem;
}

.player-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 1.5rem;
}

.stat-badge {
    background: #fff;
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.xp-badge i {
    color: #f1c40f;
}

.streak-badge i {
    color: #e17055;
}

/* Dashboard Levels */
.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.level-card {
    background: #fff;
    border-radius: 30px;
    padding: 25px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    overflow: hidden;
}

.level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.level-card.unlocked {
    border-color: var(--secondary-color);
}

.level-card.locked {
    opacity: 0.7;
    filter: grayscale(0.8);
    cursor: not-allowed;
}

.level-icon {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: rgba(78, 205, 196, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.level-card.locked .level-icon {
    background: #eee;
    color: #aaa;
}

.level-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
    color: var(--dark-blue);
}

.level-info p {
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    color: #636e72;
    line-height: 1.5;
}

.status-text {
    font-size: 0.8rem;
    color: #aaa;
    font-weight: 600;
}

.play-btn {
    position: absolute;
    bottom: 25px;
    right: 25px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    transition: 0.2s;
}

.level-card:hover .play-btn {
    transform: scale(1.1);
}

/* Game Screen */
.screen {
    display: none;
    animation: fadeIn 0.4s ease;
}

.screen.active {
    display: block;
}

.btn-back {
    background: none;
    border: none;
    font-size: 1rem;
    color: #636e72;
    cursor: pointer;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mission-card {
    background: #fff;
    border-radius: 40px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.mission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.mission-label {
    background: rgba(78, 205, 196, 0.1);
    color: var(--secondary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.lives {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.ai-avatar {
    margin: 0 auto 2rem;
    position: relative;
    width: 100px;
    height: 100px;
}

.avatar-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    position: relative;
    z-index: 2;
}

.pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(108, 92, 231, 0.4);
    animation: pulse 2s infinite;
    z-index: 1;
    display: none;
}

.ai-avatar.listening .pulse-ring {
    display: block;
}

.instruction-box h2 {
    font-size: 1.4rem;
    color: #636e72;
    font-weight: 500;
    margin-bottom: 1rem;
}

.challenge-box {
    margin: 2rem 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 20px;
    border: 2px dashed #e1e1e1;
}

.challenge-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark-blue);
    line-height: 1.4;
}

.controls {
    margin-top: 3rem;
}

.mic-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
    transition: transform 0.2s, background 0.3s;
    outline: none;
}

.mic-btn:active {
    transform: scale(0.95);
    background: #e15f5f;
}

.mic-btn.listening {
    background: var(--secondary-color);
    box-shadow: 0 10px 25px rgba(78, 205, 196, 0.4);
    animation: bounce 1s infinite;
}

.mic-status {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #aaa;
    font-weight: 500;
}

.feedback-area {
    min-height: 20px;
    margin-top: 20px;
    font-weight: 600;
    font-size: 1rem;
}

.feedback-success {
    color: var(--secondary-color);
}

.feedback-error {
    color: var(--primary-color);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.trophy-icon {
    font-size: 5rem;
    color: #f1c40f;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 1.5rem;
    width: 100%;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .game-title {
        font-size: 2rem;
    }

    .challenge-text {
        font-size: 1.3rem;
    }

    .mission-card {
        padding: 20px;
    }
}