/* Design tokens, reset, and page/container chrome shared by every screen. */

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --bg-input: #1f2940;
    --text-primary: #e8e8e8;
    --text-secondary: #a0aec0;
    --text-muted: #6b7280;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-danger: #ef4444;
    --accent-warning: #f59e0b;
    --border-color: #2d3748;
    --border-light: #374151;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
}

.questionnaire-container {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 20px 40px var(--shadow-color);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    border: 1px solid var(--border-color);
}

h1 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2em;
    font-weight: 700;
}

.main-content {
    display: none;
}
.main-content.active {
    display: block;
}

/* ------------------------------------------------------------------
   Visibility is driven by the [hidden] attribute from JS. It has to
   beat the display rules elsewhere in this stylesheet, several of
   which set display on the same elements.
   ------------------------------------------------------------------ */
[hidden] {
    display: none !important;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    body {
        padding: 0;
        background: var(--bg-card);
    }
    .questionnaire-container {
        padding: 20px;
        border-radius: 0;
        margin: 0;
        justify-content: flex-start;
        min-height: 100vh;
        border: none;
        box-shadow: none;
        /* Space for the fixed navigation bar (navigation.css) */
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
    h1 {
        font-size: 1.6em;
        margin-bottom: 20px;
    }
}

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
    .questionnaire-container {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* Small phone adjustments */
@media (max-width: 375px) {
    body {
        padding: 0;
    }
    .questionnaire-container {
        padding: 16px;
        border-radius: 0;
    }
}
