:root {
    --primary: #ff007a;
    --primary-hover: #d60066;
    --secondary: #00e5ff;
    --secondary-hover: #00b8cc;
    --accent: #ffd700;
    --success: #00ff88;
    --danger: #ff3366;
    --bg-dark: #1e3a8a;
    --bg-mid: #60a5fa;
    --card-bg: rgba(15, 23, 42, 0.90);
    --text-main: #ffffff;
    --text-muted: #b3a0e5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: radial-gradient(circle at center, var(--bg-mid) 0%, var(--bg-dark) 100%);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.stage-lights {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 180deg at 50% 0%, transparent 40%, rgba(255, 0, 122, 0.1) 45%, rgba(0, 229, 255, 0.1) 50%, rgba(255, 0, 122, 0.1) 55%, transparent 60%);
    animation: sweep 10s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes sweep {
    0% { transform: rotate(-20deg); }
    50% { transform: rotate(20deg); }
    100% { transform: rotate(-20deg); }
}

#app {
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 5px 15px;
    position: relative;
    z-index: 1;
}

#main-menu {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: opacity 0.5s ease;
}

.main-menu-title {
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary), 0 0 40px var(--primary);
    margin-bottom: 10px;
    font-style: italic;
    line-height: 1.1;
}

.main-menu-subtitle {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 50px;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 400px;
}

.menu-btn {
    background: linear-gradient(45deg, #1e3a8a, #3b82f6);
    color: white;
    border: 2px solid var(--secondary);
    border-radius: 50px;
    padding: 20px 30px;
    font-size: 1.3rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.menu-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0, 229, 255, 0.6);
}

.menu-btn:active {
    transform: translateY(2px);
}

.higher-level-btn {
    background: linear-gradient(45deg, #7c3aed, #db2777);
    border-color: #f472b6;
    box-shadow: 0 0 15px rgba(244, 114, 182, 0.4);
}

.higher-level-btn:hover {
    box-shadow: 0 5px 25px rgba(244, 114, 182, 0.6);
}

#game-header {
    margin-bottom: 5px;
    text-align: center;
    flex: 0 0 auto;
}

.show-title {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary), 0 0 40px var(--primary);
    margin-bottom: 5px;
    font-style: italic;
}

.scoreboard {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--secondary);
    border-radius: 10px;
    padding: 5px 15px;
    margin-bottom: 8px;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.3), inset 0 0 10px rgba(0, 229, 255, 0.2);
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 800;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

.progress-container {
    width: 100%;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--secondary);
}

main {
    flex-grow: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    position: relative;
    perspective: 1000px;
    width: 100%;
}

.card {
    background: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: 20px;
    padding: 15px 20px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 10px;
    box-shadow: 0 0 20px rgba(255, 0, 122, 0.3), inset 0 0 20px rgba(255, 0, 122, 0.1);
    text-align: center;
    position: absolute;
    top: 0;
    bottom: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: scale(0.8) rotateY(-10deg);
    pointer-events: none;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.card.active {
    opacity: 1;
    transform: scale(1) rotateY(0);
    pointer-events: auto;
    z-index: 10;
}

.card.slide-out {
    transform: translateX(-150%) rotate(-10deg);
    opacity: 0;
}

.card-image {
    width: 100%;
    flex: 0 1 auto;
    min-height: 0;
    max-height: 45vh;
    object-fit: contain;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    margin-bottom: 0;
    border: 2px solid var(--secondary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.category-badge {
    background: linear-gradient(45deg, var(--accent), #ff9900);
    color: #000;
    padding: 4px 15px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    align-self: center;
    margin-bottom: 0;
    box-shadow: 0 0 10px var(--accent);
    flex: 0 0 auto;
}

.situation-text {
    flex: 0 0 auto;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.5;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    color: var(--text-muted);
}

.options-container {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
}

.suffix-options {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
}

.higher-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.suffix-btn {
    font-size: 1.6rem;
    padding: 15px 25px;
    text-align: center;
    flex: 1;
}

.higher-btn {
    font-size: 1.2rem;
    padding: 15px 10px;
    text-align: center;
}

@media (max-width: 600px) {
    .higher-options {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .higher-btn {
        padding: 10px 5px;
        font-size: 0.95rem;
    }
    .suffix-btn {
        padding: 10px;
        font-size: 1.2rem;
    }
    .situation-text {
        font-size: 1.1rem;
    }
    .card {
        padding: 10px;
    }
    .card-image {
        max-height: 30vh;
    }
}

.suffix-blank {
    display: inline-block;
    min-width: 40px;
    border-bottom: 2px solid var(--accent);
    color: var(--accent);
    font-weight: 800;
    text-align: center;
    margin: 0 2px;
}

.correct-text {
    color: var(--success);
    border-bottom-color: var(--success);
}

.incorrect-text {
    color: var(--danger);
    border-bottom-color: var(--danger);
}

.option-btn {
    width: 100%;
    background: linear-gradient(180deg, #2a0845 0%, #150024 100%);
    border: 2px solid var(--secondary);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 0 rgba(0, 229, 255, 0.4);
    text-align: center;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.option-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 transparent;
}

.option-btn:disabled {
    cursor: default;
    opacity: 0.6;
}

.option-btn.correct-choice {
    background: linear-gradient(180deg, #00b35e 0%, #008043 100%);
    border-color: var(--success);
    color: white;
    box-shadow: 0 0 20px var(--success);
    opacity: 1;
}

.option-btn.incorrect-choice {
    background: linear-gradient(180deg, #b30024 0%, #80001a 100%);
    border-color: var(--danger);
    color: white;
    box-shadow: 0 0 20px var(--danger);
    opacity: 1;
}

/* Results Screen */
#results-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 0, 21, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
    z-index: 20;
    transition: opacity 0.5s ease;
}

#results-screen h2 {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent);
    font-style: italic;
    text-transform: uppercase;
}

#results-screen p#final-score {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
    text-shadow: 0 0 10px var(--secondary);
    margin-bottom: 10px;
}

#results-screen p#feedback-message {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: var(--text-main);
}

#restart-btn {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50px;
    padding: 20px 40px;
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 0 20px var(--primary);
    text-transform: uppercase;
    transition: transform 0.2s;
}

#restart-btn:active {
    transform: scale(0.95);
}

.hidden {
    display: none !important;
}