:root {
    --bg: #0b1220;
    --bg-alt: #111827;
    --panel: rgba(17, 24, 39, 0.88);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --panel-soft: rgba(30, 41, 59, 0.82);
    --text-main: #e5eefb;
    --text-soft: #9fb0c9;
    --text-dim: #7f90aa;
    --accent: #60a5fa;
    --accent-strong: #3b82f6;
    --accent-soft: rgba(96, 165, 250, 0.18);
    --success: #22c55e;
    --danger: #f87171;
    --warning: #fbbf24;
    --border: rgba(148, 163, 184, 0.18);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    --radius-lg: 26px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 24px;
    color: var(--text-main);
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    text-align: center;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 28%),
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.10), transparent 22%),
        linear-gradient(145deg, #07101d 0%, #0b1220 45%, #111827 100%);
}

.container {
    position: relative;
    max-width: 880px;
    margin: 0 auto;
    padding: 32px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(17, 24, 39, 0.9));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), transparent 35%, rgba(34, 197, 94, 0.04) 100%);
    pointer-events: none;
}

.logo {
    width: 112px;
    height: auto;
    margin-bottom: 12px;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

h1, h2, h3, p {
    position: relative;
    z-index: 1;
}

.page-title {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.page-subtitle,
.result-summary,
.info-box p {
    color: var(--text-soft);
    line-height: 1.7;
}

.info-box,
.question-box,
.result-box {
    position: relative;
    z-index: 1;
    padding: 24px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.88));
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.info-box {
    margin-bottom: 18px;
}

.progress-wrapper {
    position: relative;
    z-index: 1;
    margin: 22px 0 28px;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--text-soft);
    font-size: 0.96rem;
}

.progress-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    overflow: hidden;
}

.progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #38bdf8);
    transition: width 0.28s ease;
    box-shadow: 0 0 18px rgba(96, 165, 250, 0.35);
}

.start-button,
.next-button,
.restart-button {
    appearance: none;
    border: none;
    border-radius: 999px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.start-button,
.next-button,
.restart-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.25);
}

.start-button:hover,
.next-button:hover,
.restart-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(59, 130, 246, 0.28);
}

.next-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.question-box {
    text-align: left;
}

.question-box h3 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 1.28rem;
    line-height: 1.45;
}

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

.answer {
    width: 100%;
    text-align: left;
    padding: 15px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.72);
    color: var(--text-main);
    font: inherit;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.answer:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.52);
    background: rgba(30, 41, 59, 0.95);
}

.answer.selected {
    border-color: rgba(96, 165, 250, 0.9);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.28), rgba(30, 41, 59, 0.98));
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
}

.next-button,
.restart-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
}

.result-box {
    margin-top: 8px;
}

.chart-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 20px auto 18px;
}

.chart-center {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

#result-text {
    margin: 12px 0 20px;
    font-size: 1.05rem;
    color: var(--text-soft);
}

#error-title {
    margin-top: 26px;
}

.error-box {
    text-align: left;
    padding: 16px 18px;
    margin-bottom: 14px;
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(248, 113, 113, 0.18);
    color: var(--text-soft);
    line-height: 1.65;
}

.error-box strong {
    color: #fda4af;
}

.hidden {
    display: none !important;
}

@media (max-width: 720px) {
    body {
        padding: 14px;
    }

    .container {
        padding: 22px;
        border-radius: 22px;
    }

    .info-box,
    .question-box,
    .result-box {
        padding: 18px;
    }

    .question-box h3 {
        font-size: 1.12rem;
    }

    .progress-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .chart-container {
        width: 190px;
        height: 190px;
    }
}