:root {
    --primary-color: #a76e9c;
    --primary-hover: #d86d9c;
    --bg-gradient-start: #F2F1F7;
    --bg-gradient-end: #FDF1F4;
    --card-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-main: #1f2937;
    --text-secondary: #4b5563;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #F2F1F7 0%, #FDF1F4 100%);
    min-height: 100vh;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.game-container {
    width: 100%;
    max-width: 900px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.5s ease-out;
}

h1.game-title {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #d86d9c, #a76e9c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

.case-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.case-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.case-meta {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
}

.data-section {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .data-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.data-card h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.data-card p,
.data-card ul {
    font-size: 1rem;
    line-height: 1.6;
}

.data-card ul {
    list-style-type: none;
}

.lab-results {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
}

.question-section {
    margin-top: 2rem;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.options-grid {
    display: grid;
    gap: 1rem;
}

.option-btn {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.option-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.option-btn.selected {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}

.option-btn.correct {
    border-color: var(--success-color);
    background-color: #ecfdf5;
    color: #065f46;
}

.option-btn.incorrect {
    border-color: var(--error-color);
    background-color: #fef2f2;
    color: #991b1b;
}

.option-char {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: #f3f4f6;
    border-radius: 50%;
    margin-right: 1rem;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.option-btn.correct .option-char {
    background: var(--success-color);
    color: white;
}

.option-btn.incorrect .option-char {
    background: var(--error-color);
    color: white;
}

.feedback-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 1rem;
    animation: slideUp 0.3s ease-out;
    display: none;
}

.feedback-section.show {
    display: block;
}

.feedback-section.correct {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.feedback-section.incorrect {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.feedback-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-text {
    line-height: 1.6;
}

.controls {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    margin-bottom: 2rem;
    overflow: hidden;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Score Screen */
.score-screen {
    text-align: center;
    padding: 2rem;
}

.final-score {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 1rem 0;
}

.score-message {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ── Subscribe CTA ───────────────────────────────────────────── */
.subscribe-cta {
    background: linear-gradient(135deg, rgba(216, 109, 156, 0.08), rgba(167, 110, 156, 0.12));
    border: 1.5px solid rgba(216, 109, 156, 0.35);
    border-radius: 1.25rem;
    padding: 2rem 2rem 1.5rem;
    margin: 1.5rem 0 2rem;
    box-shadow: 0 0 24px rgba(216, 109, 156, 0.1);
    text-align: center;
}

.subscribe-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.subscribe-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.subscribe-subtext {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.subscribe-form {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.subscribe-input {
    flex: 1;
    min-width: 220px;
    max-width: 320px;
    padding: 0.7rem 1.1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    background: white;
    color: var(--text-main);
    transition: border-color 0.2s;
}

.subscribe-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(167, 110, 156, 0.15);
}

.btn-subscribe {
    background: linear-gradient(135deg, #d86d9c, #a76e9c);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: opacity 0.2s, transform 0.15s;
    white-space: nowrap;
}

.btn-subscribe:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.subscribe-privacy {
    font-size: 0.78rem;
    color: #9ca3af;
}

/* Success / error states shown after submission */
.subscribe-feedback {
    padding: 0.75rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.subscribe-feedback.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.subscribe-feedback.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ── Certificate CTA ──────────────────────────────────────────── */
.certificate-cta {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(216, 109, 156, 0.1));
    border: 1.5px solid rgba(216, 109, 156, 0.4);
    border-radius: 1.25rem;
    padding: 1.5rem 2rem;
    margin: 0 0 1.5rem;
    text-align: center;
}

.certificate-intro {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.cert-name-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.cert-name-input {
    display: block;
    margin: 0 auto 1rem;
    width: 100%;
    max-width: 360px;
}

.btn-certificate {
    background: linear-gradient(135deg, #f5c842, #d86d9c);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: opacity 0.2s, transform 0.15s;
    letter-spacing: 0.02em;
}

.btn-certificate:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(216, 109, 156, 0.3);
}