/* =========================================================
   BADA BLI — Korean Level Test  |  Premium Design System
   ========================================================= */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

/* ---------- Design Tokens ---------- */
:root {
    /* Color Core */
    --bg: #050b1a;
    --surface: #0d1b36;
    --surface-2: #0f2147;

    /* Brand Gradient */
    --grad-start: #1e6bff;
    --grad-mid: #7c3aed;
    --grad-end: #06b6d4;

    /* Accent */
    --blue: #3b82f6;
    --purple: #7c3aed;
    --cyan: #06b6d4;
    --green: #10b981;
    --gold: #f59e0b;
    --coral: #f43f5e;
    --pink: #ec4899;

    /* Text */
    --text-1: #f0f6ff;
    --text-2: #94a3b8;
    --text-3: #64748b;

    /* Glass */
    --glass: rgba(255, 255, 255, 0.04);
    --glass-hover: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.09);
    --glass-light: rgba(255, 255, 255, 0.13);

    /* Shadows */
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
    --blue-glow: 0 0 30px rgba(59, 130, 246, 0.3);
    --purple-glow: 0 0 30px rgba(124, 58, 237, 0.3);

    /* Layout */
    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 26px;
    --radius-pill: 100px;

    /* Typography */
    --font: 'Outfit', 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;

    /* Easing */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --t-fast: 0.15s var(--ease-out);
    --t-base: 0.3s var(--ease-out);
    --t-slow: 0.6s var(--ease-out);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-1);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   BACKGROUND CANVAS
   ========================================================= */

.bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Mesh Gradient */
.bg-canvas::before {
    content: '';
    position: absolute;
    inset: -50%;
    background:
        radial-gradient(ellipse 700px 500px at 15% 10%, rgba(30, 107, 255, .18) 0%, transparent 60%),
        radial-gradient(ellipse 600px 600px at 85% 80%, rgba(124, 58, 237, .15) 0%, transparent 60%),
        radial-gradient(ellipse 500px 400px at 50% 50%, rgba(6, 182, 212, .10) 0%, transparent 60%);
    animation: meshFloat 30s ease-in-out infinite alternate;
}

/* Noise texture overlay */
.bg-canvas::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px;
}

/* Floating Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    animation: orbFloat var(--dur, 25s) ease-in-out infinite alternate;
}

.orb-1 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(30, 107, 255, .55), transparent 65%);
    top: -120px;
    left: -100px;
    --dur: 22s;
}

.orb-2 {
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(124, 58, 237, .45), transparent 65%);
    bottom: -180px;
    right: -120px;
    --dur: 28s;
    animation-delay: -8s;
}

.orb-3 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(6, 182, 212, .35), transparent 65%);
    top: 55%;
    left: 45%;
    transform: translate(-50%, -50%);
    --dur: 20s;
    animation-delay: -14s;
}

.orb-4 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(244, 63, 94, .3), transparent 65%);
    top: 30%;
    right: 10%;
    --dur: 18s;
    animation-delay: -5s;
}

/* Grid lines */
.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}

@keyframes meshFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40px, -60px) scale(1.08);
    }
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(25px, -40px) scale(1.12);
    }
}

/* =========================================================
   LAYOUT
   ========================================================= */

.app-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 1rem 1.25rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* =========================================================
   HEADER
   ========================================================= */

.app-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0 1.5rem;
    position: relative;
}

.logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--glass-light);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    padding: 4px 14px 4px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 6px;
}

.logo-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--cyan);
    animation: pulse 2s ease-in-out infinite;
}

.logo-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    background: linear-gradient(135deg, #fff 20%, var(--cyan) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.logo-subtitle {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-2);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* =========================================================
   SCREENS
   ========================================================= */

.screen {
    display: none;
    flex-direction: column;
    flex: 1;
    width: 100%;
}

.screen.active {
    display: flex;
    animation: screenIn var(--t-slow) both;
}

@keyframes screenIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

/* =========================================================
   GLASS CARD
   ========================================================= */

.card {
    background: var(--glass);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

/* Subtle inner glow top edge */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .15), transparent);
}

.card-glow-blue {
    box-shadow: var(--shadow-md), var(--blue-glow);
}

.card-glow-purple {
    box-shadow: var(--shadow-md), var(--purple-glow);
}

/* =========================================================
   ONBOARDING SCREEN
   ========================================================= */

.onboarding-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(30, 107, 255, .25), rgba(124, 58, 237, .25));
    border: 1px solid rgba(99, 102, 241, .3);
    border-radius: var(--radius-pill);
    padding: 4px 14px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #a5b4fc;
    margin-bottom: 0.8rem;
}

.onboarding-header h2 {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.3;
    margin-bottom: 0.6rem;
}

.onboarding-header p {
    font-size: 0.9rem;
    color: var(--text-2);
}

/* Feature pills */
.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 1rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-2);
}

.pill-icon {
    font-size: 0.85rem;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0.5rem 0 1.75rem;
    color: var(--text-3);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

/* =========================================================
   FORM
   ========================================================= */

.form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-2);
    letter-spacing: 0.04em;
}

.field-wrap {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
    opacity: 0.6;
}

input,
select {
    width: 100%;
    background: rgba(0, 0, 0, .25);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem 0.75rem 2.8rem;
    color: var(--text-1);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
    outline: none;
}

input::placeholder {
    color: var(--text-3);
}

input:hover,
select:hover {
    border-color: rgba(255, 255, 255, .18);
    background: rgba(0, 0, 0, .32);
}

input:focus,
select:focus {
    border-color: rgba(99, 102, 241, .6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
    background: rgba(0, 0, 0, .35);
}

select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 2.5rem;
}

select option {
    background: #0d1b36;
    color: var(--text-1);
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius);
    padding: 0.9rem 1.5rem;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
}

.btn-w100 {
    width: 100%;
}

/* Shimmer hover effect */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .12) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn:hover::after {
    transform: translateX(100%);
}

/* Primary */
.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, .35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, .5);
}

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

/* Secondary / ghost */
.btn-secondary {
    background: var(--glass);
    color: var(--text-1);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--glass-hover);
    border-color: var(--glass-light);
}

.btn-secondary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Outline */
.btn-outline {
    background: transparent;
    color: var(--text-1);
    border: 1px solid var(--glass-light);
}

.btn-outline:hover {
    background: var(--glass);
    border-color: rgba(255, 255, 255, .25);
}

/* Ghost text */
.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border: none;
    font-weight: 500;
}

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

/* Icon inside button */
.btn-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .15);
    border-radius: 6px;
    flex-shrink: 0;
}

/* =========================================================
   PROGRESS BAR
   ========================================================= */

.progress-block {
    margin-bottom: 1.75rem;
}

.progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-2);
}

.progress-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    padding: 3px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 0.04em;
}

.progress-track {
    height: 5px;
    background: rgba(255, 255, 255, .08);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--blue), var(--purple));
    transition: width 0.5s var(--ease-out);
    position: relative;
}

/* Shimmer on progress bar */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3));
    border-radius: 100px;
}

/* Step dots */
.progress-dots {
    display: flex;
    gap: 4px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.step-dot {
    flex: 1;
    min-width: 4px;
    max-width: 20px;
    height: 3px;
    border-radius: 100px;
    background: rgba(255, 255, 255, .08);
    transition: background var(--t-base);
}

.step-dot.done {
    background: var(--blue);
}

.step-dot.current {
    background: var(--purple);
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* =========================================================
   QUESTION CARD
   ========================================================= */

.q-level-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.q-level-tag.basic {
    background: rgba(59, 130, 246, .2);
    border: 1px solid rgba(59, 130, 246, .35);
    color: #93c5fd;
}

.q-level-tag.beginner {
    background: rgba(16, 185, 129, .2);
    border: 1px solid rgba(16, 185, 129, .35);
    color: #6ee7b7;
}

.q-level-tag.intermediate {
    background: rgba(124, 58, 237, .2);
    border: 1px solid rgba(124, 58, 237, .35);
    color: #c4b5fd;
}

.q-level-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 5px currentColor;
}

.q-instruction {
    font-size: 0.9rem;
    color: var(--text-2);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

/* Question content box */
.q-box {
    background: rgba(0, 0, 0, .3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
    color: var(--text-1);
    position: relative;
}

/* Decorative quote mark */
.q-box::before {
    content: '"';
    position: absolute;
    top: -12px;
    left: 14px;
    font-size: 2.5rem;
    color: var(--blue);
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

/* =========================================================
   OPTIONS
   ========================================================= */

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.option {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    cursor: pointer;
    transition:
        border-color var(--t-fast),
        background var(--t-fast),
        transform var(--t-fast),
        box-shadow var(--t-fast);
    text-align: left;
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text-1);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.option-num {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--glass-border);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-2);
    transition: all var(--t-fast);
}

.option-text {
    flex: 1;
    line-height: 1.5;
}

.option-check {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity var(--t-fast);
    color: var(--green);
}

.option:hover {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .18);
    transform: translateX(3px);
}

.option.selected {
    background: linear-gradient(135deg, rgba(59, 130, 246, .15), rgba(124, 58, 237, .12));
    border-color: rgba(99, 102, 241, .5);
    box-shadow: 0 0 20px rgba(99, 102, 241, .2);
    transform: translateX(0);
}

.option.selected .option-num {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    border-color: transparent;
    color: #fff;
}

.option.selected .option-check {
    opacity: 1;
}

/* Ripple inner highlight */
.option.selected::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, .08), transparent);
    pointer-events: none;
}

/* =========================================================
   ACTIONS ROW
   ========================================================= */

.actions-row {
    display: flex;
    gap: 10px;
}

/* =========================================================
   LOADING SCREEN
   ========================================================= */

.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    gap: 2rem;
    padding: 4rem 2rem;
}

/* Orbital loader */
.loader-orbit {
    position: relative;
    width: 80px;
    height: 80px;
}

.loader-core {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--blue);
    animation: spin 1.2s linear infinite;
}

.loader-ring-2 {
    inset: 8px;
    border-top-color: var(--purple);
    animation-duration: 0.9s;
    animation-direction: reverse;
}

.loader-ring-3 {
    inset: 18px;
    border-top-color: var(--cyan);
    animation-duration: 0.6s;
}

.loader-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, .5);
}

.loading-text h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.loading-text p {
    font-size: 0.88rem;
    color: var(--text-2);
}

/* Typing dots */
.typing-dots {
    display: inline-flex;
    gap: 4px;
    margin-top: 10px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-3);
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Analysis steps */
.analysis-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 280px;
}

.a-step {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.82rem;
    color: var(--text-2);
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--t-base);
}

.a-step.visible {
    opacity: 1;
    transform: translateX(0);
}

.a-step-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* =========================================================
   RESULT SCREEN
   ========================================================= */

.result-hero {
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-hero h2 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 1.5rem;
}

/* Score Ring */
.score-ring-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.score-ring {
    position: relative;
    width: 148px;
    height: 148px;
}

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

.score-track {
    fill: none;
    stroke: rgba(255, 255, 255, .07);
    stroke-width: 7;
}

.score-arc {
    fill: none;
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 0 339;
    transition: stroke-dasharray 1.6s var(--ease-out);
    filter: drop-shadow(0 0 6px currentColor);
}

.score-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-num {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.score-unit {
    font-size: 0.7rem;
    color: var(--text-2);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Level Badge */
.level-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}

.level-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.5;
}

.level-card-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-2);
    margin-bottom: 6px;
}

.level-card-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    text-shadow: 0 0 20px currentColor;
}

.level-card-desc {
    font-size: 0.85rem;
    color: var(--text-2);
}

/* Progress tiers */
.level-tiers {
    display: flex;
    gap: 5px;
    margin: 1rem 0;
    padding: 0 0.5rem;
}

.tier {
    flex: 1;
    height: 5px;
    border-radius: 100px;
    background: rgba(255, 255, 255, .08);
    transition: background 0.8s ease;
}

.tier.active {
    background: currentColor;
}

/* Feedback box */
.feedback-box {
    background: rgba(0, 0, 0, .25);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    margin-bottom: 1.75rem;
    font-size: 0.88rem;
    color: var(--text-2);
    line-height: 1.7;
    position: relative;
}

.feedback-box::before {
    content: '💡';
    display: block;
    font-size: 1rem;
    margin-bottom: 5px;
}

/* Email Notice */
.email-notice {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(59, 130, 246, .1);
    border: 1px solid rgba(59, 130, 246, .25);
    border-radius: var(--radius);
    padding: 0.8rem 1rem;
    margin-bottom: 1.75rem;
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.5;
}

.email-notice span {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.email-notice p {
    margin: 0;
}

/* CTA Section */
.cta-section h3 {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-2);
}

.cta-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cta-btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: #fff;
    border: none;
    box-shadow: 0 6px 24px rgba(99, 102, 241, .4);
}

.cta-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(99, 102, 241, .55);
}

/* share row */
.share-row {
    display: flex;
    gap: 8px;
}

/* =========================================================
   ANIMATIONS / UTILS
   ========================================================= */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.85);
    }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

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

.fade-up {
    animation: fadeSlideUp var(--t-slow) both;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* =========================================================
   FOOTER
   ========================================================= */

.app-footer {
    text-align: center;
    padding: 1.5rem 0 0.5rem;
    font-size: 0.75rem;
    color: var(--text-3);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 480px) {
    .app-container {
        padding: 1.5rem 1rem 2.5rem;
    }

    .card {
        padding: 1.6rem;
        border-radius: var(--radius);
    }

    .logo-title {
        font-size: 1.85rem;
    }

    .onboarding-header h2 {
        font-size: 1.4rem;
    }

    .score-ring {
        width: 128px;
        height: 128px;
    }

    .score-num {
        font-size: 1.8rem;
    }

    .actions-row {
        flex-direction: column;
    }
}

@media (min-width: 640px) {
    .app-container {
        padding: 2rem 1.5rem 4rem;
    }
}