:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --accent-primary: #06b6d4;
    --accent-secondary: #10b981;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --error: #ef4444;
    --success: #22c55e;
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.15) 0px, transparent 50%);
}

.app-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.screen.active {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* Typography */
h1 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

p.sub {
    color: var(--text-dim);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

/* Buttons */
.btn {
    appearance: none;
    border: none;
    border-radius: 20px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #0891b2);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Choices */
.choices-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}

.choice-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 14px 20px;
    text-align: left;
    color: var(--text-main);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.choice-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-primary);
}

.choice-btn.correct {
    background: rgba(34, 197, 94, 0.2);
    border-color: var(--success);
    color: var(--success);
}

.choice-btn.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--error);
    color: var(--error);
}

.choice-prefix {
    background: rgba(255, 255, 255, 0.1);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 900;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Image Container */
.question-image-container {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2);
}

.question-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Progress and Timer */
.hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* Sentence Area */
.sentence-area {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.5;
}

.blank {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 0 4px;
}

/* Animations */
.shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Feedback Overlay */
.feedback-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s;
}

.feedback-toast.show {
    opacity: 1;
    transform: translate(-50%, -60%);
}

/* Final Score */
.score-display {
    font-size: 5rem;
    font-weight: 900;
    color: var(--accent-secondary);
    margin: 20px 0;
}
