/* =============================================
   SPARTANSKA DIJAGNOSTIKA — Urban Spartan
   Spartan Red accent, dark theme, ScoreApp style
   ============================================= */

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

:root {
    --bg: #1c1c1c;
    --bg-card: #2a2a2a;
    --bg-input: #1a1a1a;
    --border: #3a3a3a;
    --text: #f0f0f0;
    --text-dim: #999;
    --text-muted: #666;
    --accent: #a52a2a;
    --accent-light: #c0392b;
    --accent-glow: rgba(165, 42, 42, 0.25);
    --accent-bright: #e74c3c;
    --green: #27ae60;
    --yellow: #f39c12;
    --blue: #3498db;
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.2s ease;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* =============================================
   SCREENS — show/hide
   ============================================= */
.screen {
    display: none;
    flex: 1;
}
.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeUp 0.3s ease;
}

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

/* =============================================
   INTRO / PRIMING PAGE
   ============================================= */
.intro-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 48px 24px;
    text-align: center;
}

.intro-logo {
    width: 80px;
    height: auto;
    margin-bottom: 32px;
    opacity: 0.9;
}

.intro-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.intro-headline {
    font-size: 36px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
}

.text-red {
    color: var(--accent-light);
    background: var(--accent-glow);
    padding: 2px 8px;
}

.intro-text {
    max-width: 520px;
    margin: 0 auto 32px;
    text-align: left;
}

.intro-text p {
    font-size: 16px;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 12px;
}

.intro-note {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 16px;
}

/* =============================================
   QUIZ BOX — centered container for questions
   ============================================= */
.quiz-box {
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    padding: 32px 24px;
    text-align: center;
}

/* =============================================
   PROGRESS BAR
   ============================================= */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--accent-light);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.progress-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

/* =============================================
   QUESTION TITLES
   ============================================= */
.q-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.q-subtitle {
    font-size: 14px;
    color: var(--text-dim);
    margin-top: -16px;
    margin-bottom: 24px;
}

.q-logo-small {
    width: 60px;
    height: auto;
    margin-bottom: 20px;
}

/* =============================================
   RADIO BUTTON OPTIONS (ScoreApp style)
   ============================================= */
.radio-group {
    text-align: left;
    max-width: 460px;
    margin: 0 auto 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
    position: relative;
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.04);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    transition: all var(--transition);
    position: relative;
}

.radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-light);
    transition: transform 0.15s ease;
}

.radio-option input[type="radio"]:checked ~ .radio-circle {
    border-color: var(--accent-light);
}

.radio-option input[type="radio"]:checked ~ .radio-circle::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}

/* =============================================
   FORM FIELDS (number/email/text inputs)
   ============================================= */
.form-field {
    margin-bottom: 14px;
}

.form-field input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
    -moz-appearance: textfield;
}

.form-field input::-webkit-outer-spin-button,
.form-field input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-field input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form-field input:focus {
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-field input.error {
    border-color: var(--accent-bright);
}

.form-field-unit {
    position: relative;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.form-field-unit input {
    padding-right: 55px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
}

.field-unit {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
}

.error-msg {
    font-size: 13px;
    color: var(--accent-bright);
    min-height: 18px;
    margin-bottom: 6px;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px 48px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-full {
    width: 100%;
    max-width: 360px;
}

.btn-submit {
    padding: 16px 56px;
    font-size: 17px;
}

.btn-back {
    display: inline-block;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 1px;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 16px;
    transition: color var(--transition);
}

.btn-back:hover {
    color: var(--text);
}

.btn-outline {
    display: inline-block;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: var(--accent-light);
    border: 2px solid var(--accent-light);
    border-radius: var(--radius);
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-outline:hover {
    background: var(--accent-glow);
}

/* =============================================
   EMAIL CAPTURE CARD
   ============================================= */
.email-capture-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.email-capture-card input {
    background: #fff;
    color: #1a1a1a;
    border-color: #ddd;
}

.email-capture-card input::placeholder {
    color: #999;
}

.email-capture-card input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.email-capture-card .error-msg {
    color: var(--accent-bright);
}

.email-capture-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.email-capture-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.email-capture-card .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 17px;
    border-radius: var(--radius);
    margin-top: 4px;
}

.privacy-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
    font-style: italic;
}

.email-capture-card .privacy-note {
    color: #999;
}

/* =============================================
   FOOTER
   ============================================= */
.quiz-footer {
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* =============================================
   RESULTS PAGE (rezultat.html)
   ============================================= */
.results-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    width: 100%;
}

/* Header */
.results-head {
    text-align: center;
    margin-bottom: 40px;
}

.results-head h1 {
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.results-head h1 .text-red {
    display: inline;
}

.results-head .results-sub {
    font-size: 14px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Score Overview — two score boxes side by side */
.scores-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.score-box {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    color: #1a1a1a;
}

.score-box-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
}

.score-box-label {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.score-box-sublabel {
    font-size: 11px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* Circular score display */
.score-circle {
    width: 100px;
    height: 100px;
    margin: 0 auto 8px;
    position: relative;
}

.score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-circle .bg {
    fill: none;
    stroke: #eee;
    stroke-width: 8;
}

.score-circle .fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s ease;
}

.score-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 900;
    color: #1a1a1a;
}

.score-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-critical { background: #fde8e8; color: #c0392b; }
.badge-average  { background: #fef3cd; color: #d68910; }
.badge-good     { background: #d4efdf; color: #27ae60; }
.badge-great    { background: #d5f5e3; color: #1e8449; }

/* Result Cards */
.r-card {
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    margin-bottom: 24px;
}

.r-card-dark {
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.r-card-white {
    background: #fff;
    color: #1a1a1a;
}

.r-card-cta {
    background: var(--accent);
    text-align: center;
    color: #fff;
}

.r-card h2 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-light);
    margin-bottom: 16px;
}

.r-card-white h2 {
    color: var(--accent);
}

.r-card-cta h2 {
    color: #fff;
    font-size: 20px;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 800;
    margin-bottom: 12px;
}

/* Zone titles in explanation sections */
.zone-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
}

.zone-title.critical { color: var(--accent-bright); }
.zone-title.average  { color: var(--yellow); }
.zone-title.good     { color: var(--green); }
.zone-title.great    { color: #1e8449; }

.zone-text {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.r-card-white .zone-text { color: #444; }
.r-card-dark .zone-text  { color: var(--text-dim); }

/* Habit Cards */
.habits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.habit-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    color: #1a1a1a;
}

.habit-icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

.habit-title {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.habit-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* CTA card */
.r-card-cta p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.9;
}

.btn-cta-white {
    display: inline-block;
    background: #fff;
    color: var(--accent);
    border: none;
    padding: 16px 48px;
    font-size: 17px;
    font-weight: 800;
    font-family: inherit;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn-cta-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.secondary-link {
    display: block;
    margin-top: 14px;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.secondary-link a {
    color: #fff;
    text-decoration: underline;
}

/* Calorie section */
.cal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.cal-item {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border);
}

.cal-value {
    font-size: 24px;
    font-weight: 800;
    display: block;
}

.cal-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    display: block;
}

.cal-note {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

/* Tips */
.tip-list {
    list-style: none;
    padding: 0;
}

.tip-list li {
    font-size: 15px;
    padding: 12px 0 12px 32px;
    position: relative;
    border-bottom: 1px solid var(--border);
    line-height: 1.5;
}

.tip-list li:last-child { border-bottom: none; }

.tip-num {
    position: absolute;
    left: 0;
    top: 14px;
    width: 20px;
    height: 20px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* No data fallback */
.no-data {
    text-align: center;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.no-data h2 {
    font-size: 24px;
    margin-bottom: 12px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text);
}

.no-data p {
    color: var(--text-dim);
    margin-bottom: 24px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 600px) {
    .intro-headline {
        font-size: 28px;
    }

    .intro-text p {
        font-size: 15px;
    }

    .intro-container {
        padding: 32px 20px;
    }

    .quiz-box {
        padding: 24px 16px;
    }

    .q-title {
        font-size: 20px;
    }

    .radio-option {
        padding: 12px 12px;
    }

    .radio-text {
        font-size: 14px;
    }

    .btn-primary {
        padding: 14px 36px;
        font-size: 15px;
        width: 100%;
    }

    .btn-submit {
        font-size: 16px;
    }

    .email-capture-card {
        padding: 28px 20px;
    }

    /* Results page mobile */
    .scores-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .score-box {
        padding: 20px 12px;
    }

    .score-box-label {
        font-size: 11px;
    }

    .score-circle {
        width: 80px;
        height: 80px;
    }

    .score-number {
        font-size: 22px;
    }

    .habits-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .habit-card {
        display: flex;
        align-items: center;
        gap: 16px;
        text-align: left;
        padding: 16px;
    }

    .habit-icon {
        font-size: 32px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .r-card {
        padding: 24px 18px;
    }

    .cal-grid {
        grid-template-columns: 1fr 1fr;
    }

    .btn-cta-white {
        padding: 14px 36px;
        font-size: 16px;
        width: 100%;
    }

    .results-head h1 {
        font-size: 24px;
    }
}

@media (max-width: 380px) {
    .scores-row {
        grid-template-columns: 1fr;
    }

    .cal-grid {
        grid-template-columns: 1fr;
    }
}
