/* E-HUB Quiz Popup v3.0.1 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

.ehub-qa { display: none; }

/* === OVERLAY === */
.ehub-qo {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 2147483647 !important; justify-content: center; align-items: center; padding: 0;
}
.ehub-qo.active { display: flex !important; }

/* === POPUP === */
.ehub-qp {
    position: relative;
    z-index: 2147483647 !important;
    border-radius: 20px;
    padding: 32px 24px;
    padding-top: max(32px, env(safe-area-inset-top, 32px));
    max-width: 480px; max-height: 100vh;
    overflow-y: auto; overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    display: flex; flex-direction: column;
}

/* === HEADER === */
.eq-header {
    display: flex; align-items: center; justify-content: center;
    padding: 20px 20px 0; position: relative;
    min-height: 56px;
}
.eq-back {
    position: absolute; left: 16px; top: 20px;
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; font-size: 18px; transition: all 0.2s;
    z-index: 10;
}
.eq-header-title {
    font-size: 16px; font-weight: 700;
    text-align: center;
    max-width: 60%;
    line-height: 1.3;
}
.eq-close-x {
    position: absolute; right: 16px; top: 20px;
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; font-size: 16px; transition: all 0.2s;
    z-index: 10;
}
.eq-light .eq-close-x { background: #e4e8f4; color: #1a1a2e; }
.eq-light .eq-close-x:hover { background: #d0d5e8; }
.eq-dark .eq-close-x { background: rgba(255,255,255,0.08); color: #fff; }
.eq-dark .eq-close-x:hover { background: rgba(255,255,255,0.15); }

/* === PROGRESS DOTS === */
.eq-progress-dots {
    display: flex; align-items: center; padding: 12px 24px 0; gap: 0;
}
.eq-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    transition: all 0.3s ease;
}
.eq-line {
    flex: 1; height: 2px; transition: background 0.3s ease;
}

/* === CONTENT AREA === */
.eq-content {
    flex: 1; padding: 24px 24px 20px; overflow-y: auto;
    position: relative;
    display: flex; flex-direction: column; justify-content: flex-start;
    min-height: 0;
}

/* Question title area - sticky at top */
.eq-q-title-wrap {
    flex-shrink: 0;
}

/* Options scrollable */
.eq-opts {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
}

/* Step animation */
.eq-step-anim {
    animation: eqSlideIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes eqSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
.eq-step-anim-back {
    animation: eqSlideBack 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes eqSlideBack {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* === QUESTION STEP === */
.eq-q-title { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 8px; line-height: 1.25; }
.eq-q-subtitle { font-size: 14px; text-align: center; margin-bottom: 24px; opacity: 0.5; }

/* Options */
.eq-opts { display: flex; flex-direction: column; gap: 10px; }
.eq-opt {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: 12px;
    cursor: pointer; transition: all 0.2s; border: 1.5px solid transparent;
    font-size: 15px; font-weight: 500; width: 100;
    text-align: left; font-family: 'Inter', sans-serif;
    position: relative;
}
.eq-opt-emoji { font-size: 24px; flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.eq-opt-text { flex: 1; }
.eq-opt-check {
    width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; font-size: 14px;
}

/* === INFO STEP === */
.eq-info-title { font-size: 26px; font-weight: 900; text-align: center; margin-bottom: 6px; line-height: 1.2; }
.eq-info-text { font-size: 15px; text-align: center; margin-bottom: 28px; opacity: 0.5; }
.eq-info-quote {
    border-radius: 16px; padding: 28px 24px; margin-bottom: 20px; position: relative;
    text-align: center; font-size: 15px; font-weight: 500; line-height: 1.55;
}
.eq-info-quote::before, .eq-info-quote::after {
    position: absolute; font-size: 40px; font-weight: 900; opacity: 0.15; line-height: 1;
}
.eq-info-quote::before { content: '\201C'; top: 10px; left: 16px; }
.eq-info-quote::after { content: '\201D'; bottom: 10px; right: 16px; }
.eq-info-source { text-align: center; font-size: 13px; opacity: 0.5; font-weight: 500; }

/* === INTRO STEP === */
.eq-intro-slide { display: flex; flex-direction: column; align-items: center; padding: 40px 0 10px; }
.eq-intro-title {
    font-size: 24px; font-weight: 900; text-align: center; margin-bottom: 12px; line-height: 1.3;
}
.eq-intro-subtitle {
    font-size: 15px; text-align: center; margin-bottom: 32px; opacity: 0.5; line-height: 1.5;
}
.eq-intro-seats { width: 100%; }
.eq-intro-seats-bar {
    width: 100%; height: 10px; border-radius: 5px; overflow: hidden; margin-bottom: 10px;
}
.eq-intro-seats-fill {
    height: 100%; width: 0%; border-radius: 5px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.eq-intro-seats-text {
    font-size: 14px; font-weight: 600; text-align: center;
}

/* Light theme intro */
.eq-light .eq-intro-seats-bar { background: #e0e4f0; }
.eq-light .eq-intro-seats-fill { background: linear-gradient(90deg, var(--eq-accent), #ef4444); }
.eq-light .eq-intro-seats-text { color: #1a1a2e; }

/* Dark theme intro */
.eq-dark .eq-intro-seats-bar { background: rgba(255,255,255,0.1); }
.eq-dark .eq-intro-seats-fill { background: linear-gradient(90deg, var(--eq-accent), #ef4444); }
.eq-dark .eq-intro-seats-text { color: rgba(255,255,255,0.7); }

/* === LOADING STEP === */
.eq-loading-slide { display: flex; flex-direction: column; align-items: center; padding: 40px 0 20px; }
.eq-loading-circle-wrap {
    position: relative; width: 140px; height: 140px; margin-bottom: 28px;
}
.eq-loading-circle-fill {
    fill: none; stroke-width: 8; stroke-linecap: round;
}
.eq-loading-text {
    font-size: 16px; font-weight: 600; text-align: center; margin-bottom: 4px;
    transition: opacity 0.3s;
}
.eq-loading-dots {
    display: flex; gap: 2px; justify-content: center; font-size: 24px; font-weight: 700;
}
.eq-loading-dots span {
    animation: eq-dot-bounce 1.4s ease-in-out infinite;
    opacity: 0.3;
}
.eq-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.eq-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes eq-dot-bounce {
    0%, 80%, 100% { opacity: 0.3; }
    40% { opacity: 1; }
}

/* Light theme loading */
.eq-light .eq-loading-circle-fill { stroke: var(--eq-accent); }
.eq-light .eq-loading-text { color: #1a1a2e; }
.eq-light .eq-loading-dots span { color: #1a1a2e; }

/* Dark theme loading */
.eq-dark .eq-loading-circle-fill { stroke: var(--eq-accent); }
.eq-dark .eq-loading-text { color: #ffffff; }
.eq-dark .eq-loading-dots span { color: #ffffff; }

/* === STATS SLIDE === */
.eq-stats-slide { display: flex; flex-direction: column; align-items: center; padding: 20px 0; }
.eq-circle-wrap {
    position: relative; width: 140px; height: 140px;
    margin-bottom: 28px;
}
.eq-circle-svg {
    width: 100%; height: 100%;
    transform: rotate(-90deg);
}
.eq-circle-bg {
    fill: none; stroke-width: 8; opacity: 0.1;
}
.eq-circle-fill {
    fill: none; stroke-width: 8; stroke-linecap: round;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.eq-circle-text {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: flex; align-items: baseline; gap: 2px;
}
.eq-circle-num { font-size: 36px; font-weight: 900; }
.eq-circle-pct { font-size: 18px; font-weight: 700; opacity: 0.5; }
.eq-stats-title {
    font-size: 18px; font-weight: 800; text-align: center;
    line-height: 1.35; margin-bottom: 8px; max-width: 300px;
}
.eq-stats-subtitle {
    font-size: 14px; text-align: center; opacity: 0.45;
}

/* Light theme stats */
.eq-light .eq-circle-bg { stroke: #1a1a2e; }
.eq-light .eq-circle-fill { stroke: var(--eq-accent); }
.eq-light .eq-circle-num { color: #1a1a2e; }
.eq-light .eq-circle-pct { color: #1a1a2e; }

/* Dark theme stats */
.eq-dark .eq-circle-bg { stroke: #ffffff; }
.eq-dark .eq-circle-fill { stroke: var(--eq-accent); }
.eq-dark .eq-circle-num { color: #ffffff; }
.eq-dark .eq-circle-pct { color: #ffffff; }

/* === EMAIL STEP === */
.eq-autofill-form { margin: 0; }
.eq-email-title { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 10px; line-height: 1.25; }
.eq-email-subtitle { font-size: 14px; text-align: center; margin-bottom: 20px; line-height: 1.55; opacity: 0.55; }

/* Registration progress */
.eq-reg-progress { margin-bottom: 24px; }
.eq-reg-bar {
    width: 100%; height: 10px; border-radius: 5px; overflow: hidden; margin-bottom: 10px;
}
.eq-reg-fill {
    height: 100%; width: 0%; border-radius: 5px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.eq-reg-text {
    font-size: 13px; font-weight: 600; text-align: center; opacity: 0.6;
}

.eq-email-input {
    width: 100%; padding: 16px; border-radius: 12px; font-size: 16px;
    font-family: 'Inter', sans-serif; outline: none; transition: border-color 0.2s;
}
.eq-email-error { font-size: 12px; color: #ef4444; margin-top: 8px; display: none; text-align: center; }
.eq-email-disclaimer { font-size: 11px; text-align: center; margin-top: 12px; opacity: 0.35; }

/* === FOOTER / CTA === */
.eq-footer { padding: 16px 24px 24px; }
.eq-btn {
    width: 100%; padding: 16px; border: none; border-radius: 14px;
    font-size: 16px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    cursor: pointer; font-family: 'Inter', sans-serif;
    transition: all 0.25s; opacity: 0.35; pointer-events: none;
}
.eq-btn.active { opacity: 1; pointer-events: auto; }
.eq-btn.active:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* Skip quiz button */
.eq-btn-skip {
    width: 100%; padding: 14px; border: none; border-radius: 14px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    font-family: 'Inter', sans-serif; transition: all 0.25s;
    margin-top: 10px; background: transparent; text-decoration: underline;
    text-underline-offset: 3px;
}
.eq-btn-skip:hover { opacity: 0.8; }

/* ==================== LIGHT THEME ==================== */
.ehub-qp.eq-light {
    background: linear-gradient(180deg, #f0f4ff 0%, #e8ecf8 50%, #d8ddf0 100%);
    color: #1a1a2e;
}
.eq-light .eq-back { background: #e4e8f4; color: #1a1a2e; }
.eq-light .eq-back:hover { background: #d0d5e8; }
.eq-light .eq-header-title { color: #1a1a2e; }
.eq-light .eq-dot { background: #d0d4e0; }
.eq-light .eq-dot.active { background: var(--eq-accent); }
.eq-light .eq-dot.done { background: #1a1a2e; }
.eq-light .eq-line { background: #d0d4e0; }
.eq-light .eq-line.done { background: #1a1a2e; }
.eq-light .eq-opt { background: #ffffff; border-color: transparent; color: #1a1a2e; }
.eq-light .eq-opt:hover { border-color: #c8cee0; }
.eq-light .eq-opt.selected { border-color: var(--eq-accent); background: #f0f3ff; }
.eq-light .eq-opt-emoji { background: #f5f6fa; }
.eq-light .eq-opt-check { border: 2px solid #ccc; background: #fff; }
.eq-light .eq-opt.selected .eq-opt-check { border-color: var(--eq-accent); background: var(--eq-accent); color: #fff; }
.eq-light .eq-info-quote { background: #ffffff; color: #1a1a2e; }
.eq-light .eq-email-input { background: #ffffff; border: 1.5px solid #d0d4e0; color: #1a1a2e; }
.eq-light .eq-email-input::placeholder { color: #999; }
.eq-light .eq-email-input:focus { border-color: var(--eq-accent); }
.eq-light .eq-reg-bar { background: #e0e4f0; }
.eq-light .eq-reg-fill { background: var(--eq-accent); }
.eq-light .eq-btn-skip { color: #1a1a2e; opacity: 0.5; }

/* ==================== DARK THEME ==================== */
.ehub-qp.eq-dark {
    background: linear-gradient(180deg, #0f0f1a 0%, #141428 50%, #1a1a30 100%);
    color: #ffffff;
}
.eq-dark .eq-back { background: rgba(255,255,255,0.08); color: #fff; }
.eq-dark .eq-back:hover { background: rgba(255,255,255,0.15); }
.eq-dark .eq-header-title { color: #fff; }
.eq-dark .eq-dot { background: rgba(255,255,255,0.15); }
.eq-dark .eq-dot.active { background: var(--eq-accent); }
.eq-dark .eq-dot.done { background: #fff; }
.eq-dark .eq-line { background: rgba(255,255,255,0.1); }
.eq-dark .eq-line.done { background: rgba(255,255,255,0.5); }
.eq-dark .eq-opt { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.08); color: #fff; }
.eq-dark .eq-opt:hover { border-color: rgba(255,255,255,0.2); }
.eq-dark .eq-opt.selected { border-color: var(--eq-accent); background: color-mix(in srgb, var(--eq-accent) 15%, transparent); }
.eq-dark .eq-opt-emoji { background: rgba(255,255,255,0.06); }
.eq-dark .eq-opt-check { border: 2px solid rgba(255,255,255,0.2); background: transparent; }
.eq-dark .eq-opt.selected .eq-opt-check { border-color: var(--eq-accent); background: var(--eq-accent); color: #fff; }
.eq-dark .eq-info-quote { background: rgba(255,255,255,0.06); color: #fff; }
.eq-dark .eq-email-input { background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,255,255,0.12); color: #fff; }
.eq-dark .eq-email-input::placeholder { color: #666; }
.eq-dark .eq-email-input:focus { border-color: var(--eq-accent); }
.eq-dark .eq-reg-bar { background: rgba(255,255,255,0.1); }
.eq-dark .eq-reg-fill { background: var(--eq-accent); }
.eq-dark .eq-btn-skip { color: #ffffff; opacity: 0.5; }

/* === RESPONSIVE === */
@media (min-width: 481px) {
    .ehub-qp { max-width: 480px; max-height: 90vh; border-radius: 24px; height: auto; }
}
