/* === DA Game Quiz — Neobrutalist Design === */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Work+Sans:wght@400;500;600&display=swap');

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

:root {
    --surface: #fffae2;
    --surface-container: #f4eed4;
    --surface-container-high: #eee9ce;
    --surface-white: #ffffff;
    --primary: #006879;
    --primary-container: #01b8d4;
    --secondary-container: #f89300;
    --tertiary-container: #fc81a6;
    --on-background: #080808;
    --on-surface-variant: #3c494c;
    --outline: #6c797d;
    --error: #ba1a1a;
    --stroke: #080808;
}

body {
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--surface);
    color: var(--on-background);
    min-height: 100dvh;
    overflow-x: hidden;
}

/* Grainy texture */
.grainy-surface {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
}

/* === TopAppBar === */
.topbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 72px;
    background: var(--surface);
    border-bottom: 4px solid var(--stroke);
    box-shadow: 4px 4px 0px var(--stroke);
}
.topbar-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    color: var(--on-background);
}
.topbar-left, .topbar-right {
    width: 40px;
}

/* === Screens === */
.screen {
    display: none;
    width: 100%;
    min-height: 100dvh;
}
.screen.active {
    display: block;
}

.main-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 96px 24px 40px;
    z-index: 10;
}

.content-center {
    width: 100%;
    max-width: 420px;
    z-index: 10;
}

/* === Decorative elements === */
.deco {
    position: absolute;
    z-index: 0;
    opacity: 0.8;
}
.deco-blob {
    top: 96px;
    left: -20px;
    width: 120px;
    height: 60px;
    background: var(--tertiary-container);
    border-radius: 0 0 60px 60px;
}
.deco-triangle {
    bottom: 80px;
    right: -10px;
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-bottom: 70px solid var(--secondary-container);
    border-right: 40px solid transparent;
    transform: rotate(12deg);
}

/* === Typography === */
.screen-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 32px;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    color: var(--on-background);
    text-align: center;
    margin-bottom: 12px;
}
.screen-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--on-surface-variant);
    text-align: center;
    margin-bottom: 32px;
}

/* === Form elements === */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--on-surface-variant);
    margin-bottom: 8px;
}

.input-neo {
    width: 100%;
    padding: 16px 18px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 600;
    background: var(--surface-white);
    border: 3px solid var(--stroke);
    outline: none;
    transition: all 0.15s;
}
.input-neo:focus {
    background: var(--surface-container-high);
    box-shadow: 4px 4px 0px var(--primary-container);
}
.input-neo::placeholder {
    color: #bbb;
}

.input-otp {
    text-align: center;
    font-size: 32px;
    letter-spacing: 0.3em;
}

/* Checkboxes */
.checkbox-group {
    margin-bottom: 24px;
}
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--on-surface-variant);
    margin-bottom: 10px;
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--primary-container);
    width: 18px;
    height: 18px;
}
.checkbox-label a {
    color: var(--primary);
    text-decoration: underline;
}

/* === Buttons === */
.btn-container {
    margin-top: 8px;
}
.btn-neo {
    width: 100%;
    padding: 18px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    background: var(--primary-container);
    color: var(--on-background);
    border: 3px solid var(--stroke);
    box-shadow: 4px 4px 0px var(--stroke);
    cursor: pointer;
    transition: all 0.1s;
}
.btn-neo:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}
.btn-neo:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.btn-neo:disabled:active {
    transform: none;
    box-shadow: 4px 4px 0px var(--stroke);
}

.btn-link {
    display: block;
    background: none;
    border: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    cursor: pointer;
    margin: 8px auto;
    padding: 8px;
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

.btn-outline {
    background: transparent;
    color: var(--on-background);
    border: 3px solid var(--stroke);
    box-shadow: 2px 2px 0px var(--stroke);
}

/* === Errors & Timer === */
.error {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--error);
    text-align: center;
    margin-top: 12px;
}
.timer {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--on-background);
    text-align: center;
    margin-top: 16px;
}
.hidden {
    display: none !important;
}

/* === Quiz Screen === */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--surface-white);
    border: 3px solid var(--stroke);
}
.quiz-progress, .quiz-cycle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--on-background);
}

.quiz-card {
    background: var(--surface-white);
    border: 3px solid var(--stroke);
    box-shadow: 4px 4px 0px var(--stroke);
    padding: 28px 24px;
    width: 100%;
    margin-bottom: 20px;
}

.block-badge {
    display: inline-block;
    background: var(--secondary-container);
    color: var(--on-background);
    padding: 6px 14px;
    border: 2px solid var(--stroke);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.question-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: var(--on-background);
}

/* Answer blur */
.answer-container {
    position: relative;
}
.answer-blur {
    position: relative;
    background: var(--surface-container);
    border: 3px solid var(--stroke);
    padding: 20px;
    cursor: pointer;
    overflow: hidden;
    min-height: 60px;
}
.answer-text {
    font-family: 'Work Sans', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--on-background);
    transition: filter 0.3s ease;
}
.answer-text.blurred {
    filter: blur(12px);
    user-select: none;
}
.blur-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 238, 212, 0.3);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.blur-overlay.revealed {
    opacity: 0;
}

/* === Banners === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--on-background);
    color: var(--surface);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    z-index: 100;
    border-top: 3px solid var(--primary-container);
}
.cookie-banner .btn-small {
    background: var(--primary-container);
    color: var(--on-background);
    border: 2px solid var(--stroke);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    cursor: pointer;
}

.a2hs-banner {
    position: fixed;
    bottom: 20px;
    left: 16px;
    right: 16px;
    background: var(--surface-white);
    border: 3px solid var(--stroke);
    box-shadow: 4px 4px 0px var(--stroke);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 99;
}
.a2hs-buttons {
    display: flex;
    gap: 8px;
}
.a2hs-banner .btn-small {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid var(--stroke);
}

/* === Animations === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.screen.active .content-center {
    animation: fadeIn 0.3s ease;
}

/* === Responsive === */
@media (max-width: 480px) {
    .screen-title { font-size: 26px; }
    .question-text { font-size: 19px; }
    .topbar { height: 64px; padding: 0 16px; }
    .main-content { padding: 80px 16px 32px; }
}
