:root {
    --brand: #1456f0;
    --brand-hover: #2563eb;
    --brand-deep: #17437d;
    --brand-sky: #3daeff;
    --brand-pink: #ea5ec1;
    --brand-light: #eff6ff;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --surface-tint: rgba(255, 255, 255, 0.72);
    --text-main: #222222;
    --text-strong: #18181b;
    --text-muted: #45515e;
    --text-soft: #8e8e93;
    --border: #e5e7eb;
    --border-soft: #f2f3f5;
    --success: #10b981;
    --danger: #ef4444;
    --shadow: rgba(36, 36, 36, 0.08) 0 12px 16px -4px, rgba(44, 30, 116, 0.11) 6px 2px 18px;
    --shadow-soft: rgba(0, 0, 0, 0.08) 0 4px 6px;
    --shadow-glow: rgba(44, 30, 116, 0.16) 0 0 15px;
    --radius: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --font-ui: "DM Sans", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-display: "Outfit", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-mid: "Poppins", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    min-height: 100%;
    background: #ffffff;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: env(safe-area-inset-top) 18px env(safe-area-inset-bottom);
    color: var(--text-main);
    font-family: var(--font-ui);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(circle at 12% 8%, rgba(61, 174, 255, 0.18) 0 180px, transparent 360px),
        radial-gradient(circle at 88% 10%, rgba(234, 94, 193, 0.15) 0 160px, transparent 330px),
        radial-gradient(circle at 50% 100%, rgba(20, 86, 240, 0.08) 0 220px, transparent 520px),
        #ffffff;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    position: relative;
    width: min(100%, 760px);
    margin: 48px auto;
    padding: 44px;
    border: 1px solid var(--border-soft);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.container::before,
.container::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 9999px;
    filter: blur(2px);
}

.container::before {
    top: -92px;
    right: -86px;
    width: 230px;
    height: 230px;
    background: linear-gradient(135deg, rgba(20, 86, 240, 0.16), rgba(234, 94, 193, 0.16));
}

.container::after {
    left: -100px;
    bottom: -110px;
    width: 240px;
    height: 240px;
    background: linear-gradient(135deg, rgba(61, 174, 255, 0.12), rgba(20, 86, 240, 0.06));
}

.container > * {
    position: relative;
    z-index: 1;
}

.container-wide {
    width: min(100%, 980px);
    max-width: 980px;
}

.hero-brand {
    border: 1px solid rgba(20, 86, 240, 0.08) !important;
    background: rgba(0, 0, 0, 0.05) !important;
    color: var(--text-strong) !important;
    border-radius: 9999px !important;
    box-shadow: none !important;
    font-family: var(--font-ui) !important;
    font-weight: 600 !important;
}

.page-title {
    margin: 0 0 14px;
    color: var(--text-main);
    font-family: var(--font-display);
    font-size: clamp(38px, 7vw, 72px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.055em;
}

.page-subtitle {
    margin: 0 0 18px;
    color: var(--brand);
    font-family: var(--font-mid);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.page-description {
    max-width: 720px;
    margin: 0 0 34px;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
}

.section-block {
    margin-top: 28px;
    padding: 26px;
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: rgba(0, 0, 0, 0.04) 0 4px 12px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.03em;
}

.section-heading::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--brand), var(--brand-pink));
    box-shadow: rgba(44, 30, 116, 0.16) 0 0 15px;
}

.section-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

.highlight-block {
    border: 0;
    color: white;
    background:
        radial-gradient(circle at 86% 4%, rgba(255, 255, 255, 0.32), transparent 160px),
        linear-gradient(135deg, #1456f0 0%, #3b82f6 44%, #ea5ec1 115%);
    box-shadow: var(--shadow-glow);
}

.highlight-block .section-heading,
.highlight-block .page-description {
    color: white;
}

.highlight-block .section-heading::before {
    background: white;
}

.highlight-block .section-heading::after {
    background: rgba(255, 255, 255, 0.35);
}

.form-grid {
    display: grid;
    gap: 18px;
}

.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-label {
    color: var(--text-strong);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
}

.small-muted {
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.7;
}

.input-control {
    width: 100%;
    min-width: 0;
    height: 52px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    outline: none;
    background: #ffffff;
    color: var(--text-main);
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 500;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.input-control:hover {
    border-color: #bfdbfe;
}

.input-control:focus {
    border-color: var(--brand);
    background: #ffffff;
    box-shadow: rgba(44, 30, 116, 0.16) 0 0 0 4px;
    transform: translateY(-1px);
}

.input-control:disabled {
    color: var(--text-soft);
    background: #f7f8fb;
    cursor: not-allowed;
}

.input-control::placeholder {
    color: #a4a7ae;
    font-weight: 400;
}

select.input-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2345515e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    padding-right: 44px;
}

.error-tip {
    min-height: 22px;
    margin-top: 14px;
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 13px 24px;
    border: 0;
    border-radius: 9999px;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: #181e25;
    box-shadow: rgba(36, 36, 36, 0.14) 0 12px 20px -10px;
}

.primary-button:hover:not(:disabled) {
    transform: translateY(-2px);
    background: #222b35;
    box-shadow: rgba(44, 30, 116, 0.16) 0 0 15px;
}

.primary-button:active:not(:disabled) {
    transform: translateY(0);
}

.primary-button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.secondary-button {
    color: var(--text-strong);
    background: rgba(0, 0, 0, 0.05);
}

.secondary-button:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #f0f0f0;
}

.secondary-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
}

/* Quiz */
.quiz-top {
    position: sticky;
    top: -44px;
    z-index: 10;
    margin: -44px -44px 36px;
    padding: 30px 44px 20px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.progress-text {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 700;
}

.progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 9999px;
    background: #f0f0f0;
}

.progress-value {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--brand), var(--brand-sky));
    transition: width 0.35s ease;
}

.question-text {
    margin: 0 0 34px;
    color: var(--text-main);
    font-family: var(--font-display);
    font-size: clamp(25px, 4vw, 38px);
    font-weight: 500;
    line-height: 1.24;
    letter-spacing: -0.035em;
}

.options {
    display: grid;
    gap: 14px;
    margin-bottom: 34px;
}

.option-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    box-shadow: rgba(0, 0, 0, 0.04) 0 4px 10px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.option-item:hover {
    transform: translateX(8px);
    border-color: #bfdbfe;
    box-shadow: rgba(44, 30, 116, 0.11) 6px 2px 17px;
}

.option-item.selected {
    border-color: transparent;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, var(--brand), var(--brand-pink)) border-box;
    box-shadow: var(--shadow-glow);
}

.option-badge {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 800;
}

.option-item.selected .option-badge {
    color: white;
    background: #181e25;
}

.option-item span:last-child {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
}

.quiz-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

/* Result */
.result-hero {
    margin-bottom: 22px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.summary-card {
    min-height: 96px;
    padding: 18px;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.summary-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
}

.summary-card strong {
    color: var(--text-strong);
    font-family: var(--font-mid);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.35;
    word-break: break-word;
}

.result-panel {
    margin-top: 14px;
    padding: 20px;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.result-panel h3,
.result-list-item h3 {
    margin: 0 0 8px;
    color: var(--text-strong);
    font-family: var(--font-mid);
    font-size: 18px;
    font-weight: 500;
}

.result-panel p,
.result-panel li,
.result-list-item p {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.75;
}

.result-panel ul {
    margin: 0;
    padding-left: 20px;
}

.score-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    min-height: 76px;
    margin: 2px 0 18px;
    padding: 0 24px;
    border-radius: 9999px;
    background: #ffffff;
    color: var(--brand);
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 600;
    box-shadow: rgba(255, 255, 255, 0.38) 0 0 24px;
}

.result-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.result-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.result-list-item strong {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-strong);
    font-size: 14px;
}

/* Success */
.success-card {
    padding: 48px 0 18px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    border-radius: 28px;
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--brand-sky));
    box-shadow: var(--shadow-glow);
}

.success-icon svg {
    width: 36px;
    height: 36px;
}

.success-message {
    margin: 0 0 10px;
    color: var(--text-main);
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.success-hint {
    margin: 0;
    color: var(--text-muted);
    font-size: 16px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.45s ease forwards;
}

@media (max-width: 860px) {
    body {
        padding: 14px;
    }

    .container,
    .container-wide {
        width: 100%;
        margin: 18px auto;
        padding: 26px 20px;
        border-radius: 24px;
    }

    .page-title {
        font-size: clamp(34px, 11vw, 48px);
    }

    .section-block {
        padding: 20px;
    }

    .two-col,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .quiz-top {
        top: -26px;
        margin: -26px -20px 28px;
        padding: 22px 20px 16px;
    }

    .progress-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .result-list-item {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (min-width: 861px) and (max-width: 1100px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
