/* ============================================
   ConeQUIZZ — Premium CSS
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #9D4EDD;
    --primary-light: #C77DFF;
    --accent: #F72585;
    --accent-light: #FF6EB4;
    --bg: #08020b;
    --surface: #11071a;
    --surface2: #1a0d2e;
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-muted: #a0a0b0;
    --green: #25D366;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    --glow: 0 0 30px rgba(157, 78, 221, 0.25);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Ubuntu', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* BACKGROUND ORBS */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.bg-orb-1 {
    width: 600px;
    height: 600px;
    background: rgba(157, 78, 221, 0.15);
    top: -100px;
    left: -100px;
}

.bg-orb-2 {
    width: 500px;
    height: 500px;
    background: rgba(247, 37, 133, 0.1);
    bottom: -100px;
    right: -100px;
}

/* PAGE WRAPPER */
.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px 60px;
}

/* HEADER */
.quiz-header {
    width: 100%;
    max-width: 600px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 16px;
}

.quiz-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

.quiz-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.3);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: #25D366;
}

.badge-dot {
    width: 7px;
    height: 7px;
    background: #25D366;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.4);
    }
}

/* ============================================
   LANDING SECTION
   ============================================ */
.landing-section {
    width: 100%;
    max-width: 600px;
    padding: 40px 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.landing-inner {
    text-align: center;
    width: 100%;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(157, 78, 221, 0.12);
    border: 1px solid rgba(157, 78, 221, 0.3);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 28px;
}

.hero-title {
    font-size: clamp(28px, 7vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary-light), var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto 32px;
}

.social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.proof-avatars {
    display: flex;
}

.av {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    margin-left: -8px;
}

.av:first-child {
    margin-left: 0;
}

.social-proof p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-xl {
    font-size: 17px;
    padding: 18px 36px;
    width: 100%;
    max-width: 420px;
    margin-bottom: 20px;
}

.pulse-btn {
    animation: pulse-glow 2.5s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(247, 37, 133, 0.3);
    }

    50% {
        box-shadow: 0 8px 40px rgba(247, 37, 133, 0.6), 0 0 60px rgba(157, 78, 221, 0.3);
    }
}

.landing-pills {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   QUIZ CONTAINER
   ============================================ */
.quiz-container {
    width: 100%;
    max-width: 600px;
}

.hidden {
    display: none !important;
}

/* PROGRESS */
.progress-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 10px;
}

#stepPercent {
    color: var(--primary-light);
    font-weight: 700;
}

.progress-bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 100px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

/* STEP CARD */
.quiz-step {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    animation: slideIn 0.4s ease;
    box-shadow: var(--shadow);
}

.quiz-step.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-icon {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
}

.step-title {
    font-size: clamp(20px, 5vw, 26px);
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.step-sub {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* FORM FIELDS */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 15px;
    font-family: 'Ubuntu', sans-serif;
    color: #fff;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.15);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input.invalid {
    border-color: #ff4d6d;
}

.field-error {
    display: block;
    font-size: 12px;
    color: #ff4d6d;
    margin-top: 5px;
    min-height: 16px;
    font-weight: 500;
}

/* RADIO GRID (cards) */
.radio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

.radio-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 14px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.25s ease;
    user-select: none;
}

.radio-card input[type="radio"] {
    display: none;
}

.radio-card .radio-icon {
    font-size: 28px;
}

.radio-card:hover {
    border-color: rgba(157, 78, 221, 0.4);
    color: #fff;
    background: rgba(157, 78, 221, 0.07);
}

.radio-card.selected {
    border-color: var(--primary);
    background: rgba(157, 78, 221, 0.12);
    color: #fff;
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.2);
}

/* RADIO LIST (items with description) */
.radio-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.radio-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.25s ease;
    user-select: none;
}

.radio-item input[type="radio"] {
    display: none;
}

.radio-item span:first-of-type {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    flex: 1;
    transition: color 0.2s;
}

.radio-item .radio-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
    flex: none;
    white-space: nowrap;
}

.radio-item:hover {
    border-color: rgba(157, 78, 221, 0.4);
    background: rgba(157, 78, 221, 0.05);
}

.radio-item:hover span:first-of-type {
    color: #fff;
}

.radio-item.selected {
    border-color: var(--primary);
    background: rgba(157, 78, 221, 0.1);
    box-shadow: 0 0 12px rgba(157, 78, 221, 0.15);
}

.radio-item.selected span:first-of-type {
    color: #fff;
}

.radio-item.selected .radio-desc {
    color: var(--primary-light);
}

.radio-item.hot.selected {
    border-color: var(--accent);
    background: rgba(247, 37, 133, 0.1);
    box-shadow: 0 0 12px rgba(247, 37, 133, 0.15);
}

/* STEP ACTIONS */
.step-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.step-actions.single {
    justify-content: center;
}

/* BUTTONS */
.btn-primary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-family: 'Ubuntu', sans-serif;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(157, 78, 221, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary.btn-finish {
    background: linear-gradient(135deg, #25D366, #128C7E);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-primary.btn-finish:hover {
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
}

.btn-secondary {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    font-family: 'Ubuntu', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* LOADING */
.loading-wrapper {
    text-align: center;
    padding: 20px 0;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(157, 78, 221, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-bars {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.lbar {
    font-size: 13px;
    color: var(--text-muted);
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lbar.active {
    opacity: 1;
    color: var(--primary-light);
    border-color: rgba(157, 78, 221, 0.3);
}

.lbar::before {
    content: '✓ ';
    opacity: 0;
    transition: opacity 0.3s ease 0.4s;
}

.lbar.active::before {
    opacity: 1;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .quiz-step {
        padding: 24px 18px;
    }

    .radio-grid {
        grid-template-columns: 1fr 1fr;
    }

    .radio-item .radio-desc {
        display: none;
    }

    .btn-xl {
        font-size: 15px;
        padding: 16px 24px;
    }
}