/* EpicDeals v3.1 - Dark Theme Redesign */
/* Reference: epicdeals-redesign.jsx */
/* Font: DM Sans (Google Fonts) */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

/* ============================================ */
/* CSS VARIABLES - Color Palette */
/* ============================================ */
:root {
    /* Colors — matched to SellYourGalaxy.co.za */
    --bg-primary: #0a0a0f;
    --bg-surface: #10101a;
    --bg-surface-hover: #1a1a2e;
    --border: #222233;
    --border-hover: #333344;
    --accent: #9333EA;
    --accent-hover: #7C3AED;
    --accent-glow: rgba(147, 51, 234, 0.30);
    --accent-bg: rgba(147, 51, 234, 0.15);
    --accent-teal: #41AAB9;
    --danger: #EF4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;

    /* Typography */
    --font-family: 'DM Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;

    /* Transitions */
    --transition: all 0.2s ease;
}

/* ============================================ */
/* GLOBAL RESET */
/* ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background grid texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

/* In iframe, use absolute instead of fixed to avoid stacking issues */
body.in-iframe::before {
    position: absolute;
    min-height: 100%;
}

/* ============================================ */
/* LANDING SCREEN */
/* ============================================ */
.landing-screen {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 1;
    overflow: visible;
}

/* When embedded in iframe, don't force viewport heights */
body.in-iframe .landing-screen {
    min-height: auto;
    padding: 40px 24px;
}

body.in-iframe .offer-screen {
    min-height: auto;
}

body.in-iframe .chat-screen {
    height: 680px;
    max-height: 100vh;
    overflow: hidden;
}

body.in-iframe .messages-area {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

body.in-iframe .input-bar {
    position: relative;
    flex-shrink: 0;
}

body.in-iframe .faq-section {
    padding: 40px 20px;
}

/* Wider layout when embedded in website */
body.in-iframe .landing-content {
    max-width: 640px;
}

body.in-iframe .landing-subtitle {
    max-width: 520px;
}

body.in-iframe .messages-container {
    max-width: 640px;
}

body.in-iframe .input-container {
    max-width: 640px;
}

body.in-iframe .offer-container {
    max-width: 640px;
}

body.in-iframe .faq-container {
    max-width: 800px;
}

/* Accent glow effect — purple/teal gradient matching SellYourGalaxy.co.za */
.landing-screen::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(ellipse at 40% 50%, rgba(127, 6, 158, 0.18) 0%, rgba(65, 170, 185, 0.08) 50%, transparent 70%) !important;
    pointer-events: none;
    z-index: 0;
}

.landing-content {
    text-align: center;
    max-width: 480px;
    position: relative;
    z-index: 2;
}

/* Logo */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 48px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--bg-primary);
    font-size: 18px;
}

.logo-text {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Headline */
.landing-headline {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 16px;
}

.landing-headline .accent-text {
    color: var(--accent);
}

.landing-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.6;
    margin: 0 0 40px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Button */
.cta-button {
    background: linear-gradient(135deg, #9333EA, #7C3AED);
    color: #FFFFFF;
    border: none;
    padding: 16px 40px;
    border-radius: var(--radius-lg);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: -0.01em;
    transition: var(--transition);
    box-shadow: 0 0 40px rgba(147, 51, 234, 0.35);
    font-family: var(--font-family);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(147, 51, 234, 0.5);
}

.cta-button:active {
    transform: scale(0.97);
}

/* Trust badges */
.trust-badges {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.trust-badge {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

/* Category pills */
.category-pills {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

.category-pill {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
}

.powered-by {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    margin-top: -40px;
    margin-bottom: 40px;
    letter-spacing: 0.05em;
}

/* Epic Deals affiliation text */
.affiliation-text {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 32px;
    line-height: 1.6;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.affiliation-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.affiliation-text a:hover {
    text-decoration: underline;
}

/* Redirect notice (non-Samsung devices) */
.redirect-notice {
    text-align: center;
    padding: 16px;
    margin: 16px 0;
}
.redirect-btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 12px;
    transition: var(--transition);
}
.redirect-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ============================================ */
/* CHAT SCREEN */
/* ============================================ */
.chat-screen {
    height: 680px;
    max-height: 100vh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Top bar */
.top-bar {
    position: relative;
    z-index: 10;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bg-surface-hover);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10,10,10,0.9);
    backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.top-bar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-bar-logo-icon {
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--bg-primary);
    font-size: 14px;
}

.top-bar-logo-text {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
}

/* Progress bar */
.progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar {
    width: 100px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.progress-text {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    min-width: 45px;
}

/* Messages area */
.messages-area {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 16px;
    position: relative;
    z-index: 1;
    min-height: 0;
}

.messages-container {
    max-width: 480px;
    margin: 0 auto;
}

/* Message */
.message {
    display: flex;
    margin-bottom: 16px;
}

.message.user {
    justify-content: flex-end;
}

.message.bot {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 85%;
    padding: 14px 18px;
    font-size: 16px;
    line-height: 1.6;
}

.message.user .message-bubble {
    background: var(--accent);
    color: var(--bg-primary);
    border-radius: 16px 16px 4px 16px;
    font-weight: 600;
}

.message.bot .message-bubble {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-radius: 16px 16px 16px 4px;
    border: 1px solid var(--border);
}

/* Back button (change previous answer) */
.back-button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 6px;
    font-family: var(--font-family);
    transition: color 0.2s ease;
}

.back-button:hover {
    color: var(--accent);
}

/* Quick-select buttons */
.quick-select-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    margin-top: 4px;
}

.quick-select-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-hover);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    font-family: var(--font-family);
}

.quick-select-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.quick-select-btn:active {
    transform: scale(0.97);
}

.quick-select-btn.other-btn {
    border-style: dashed;
    color: var(--text-muted);
}

/* Checklist */
.checklist-container {
    margin-bottom: 16px;
    margin-top: 4px;
}

.checklist-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.checklist-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-hover);
    color: var(--text-primary);
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    font-family: var(--font-family);
}

.checklist-item:hover {
    border-color: var(--accent);
}

.checklist-item.selected.positive {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--accent);
}

.checklist-item.selected.negative {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
}

/* "Other…" button and inline input */
.checklist-item.other-toggle {
    border-style: dashed;
    color: var(--text-muted);
}

.other-input-wrap {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding: 0 2px;
}

.other-input-wrap.hidden {
    display: none;
}

.other-input {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 13px;
    font-family: var(--font-family);
    outline: none;
}

.other-input:focus {
    border-color: var(--accent);
}

.other-add-btn {
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-family);
    white-space: nowrap;
}

.checklist-submit {
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    padding: 12px 26px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-family);
}

.checklist-submit:active {
    transform: scale(0.97);
}

/* Two-track checklist (cosmetic + functional) */
.two-track-checklist {
    margin-bottom: 16px;
    margin-top: 4px;
}

.track-section {
    margin-bottom: 16px;
}

.track-header {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 4px;
}

.cosmetic-header {
    color: #f0ad4e;
    background: rgba(240, 173, 78, 0.12);
}

.functional-header {
    color: var(--danger);
    background: var(--danger-bg);
}

.track-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 10px 2px;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 16px;
}

.typing-bubble {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border);
    border-radius: 16px 16px 16px 4px;
    padding: 12px 20px;
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #555;
    animation: bounce 1.2s ease-in-out infinite;
}

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

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

@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-5px);
    }
}

/* Calculation animation */
.calculation-animation {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 8px;
}

.calc-research-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.calc-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid var(--border-hover);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: calc-spin 0.8s linear infinite;
}

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

.calc-step-current {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    min-height: 20px;
    transition: opacity 0.2s ease;
}

.calc-progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 16px;
}

.calc-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-teal));
    border-radius: 2px;
    transition: width 1.5s ease;
}

.calc-fun-facts {
    font-size: 13px;
    color: var(--text-muted);
    min-height: 18px;
    transition: opacity 0.3s ease;
}

/* Legacy step styles (kept for backward compat) */
.calc-step {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    transition: opacity 0.4s ease;
}

.calc-step.inactive { opacity: 0.3; }

.calc-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: background 0.3s;
}

.calc-step.inactive .calc-icon { background: var(--border-hover); }
.calc-step.active .calc-icon { background: var(--accent); color: var(--text-primary); }

.calc-label { font-size: 14px; transition: color 0.3s; }
.calc-step.inactive .calc-label { color: #555; }
.calc-step.active .calc-label { color: var(--text-primary); }

/* Input bar */
.input-bar {
    position: relative;
    z-index: 10;
    padding: 12px 16px 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--bg-surface-hover);
    background: rgba(10,10,10,0.95);
    backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.input-container {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
}

.input-field {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    font-family: var(--font-family);
}

.input-field::placeholder {
    color: #555;
}

.input-field:focus {
    border-color: var(--accent);
}

.send-button {
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 22px;
    color: var(--bg-primary);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    font-family: var(--font-family);
}

.send-button:active {
    transform: scale(0.97);
}

/* ============================================ */
/* OFFER SCREEN */
/* ============================================ */
.offer-screen {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px 80px;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.offer-container {
    max-width: 460px;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Offer header */
.offer-header {
    text-align: center;
    margin-bottom: 32px;
}

.offer-label {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.offer-title {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

/* Choices summary */
.choices-summary {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 12px;
}

.summary-heading {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 5px 0;
    gap: 12px;
}

.summary-label {
    color: var(--text-secondary);
    font-size: 14px;
    min-width: 90px;
    flex-shrink: 0;
}

.summary-value {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
    max-width: 65%;
}

.summary-value.damage {
    color: var(--danger);
}

/* Pricing breakdown */
.pricing-breakdown {
    background: var(--bg-surface);
    border: 1px solid #333333;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.breakdown-label {
    color: var(--text-secondary);
    font-size: 15px;
}

.breakdown-value {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
}

.breakdown-value.negative {
    color: var(--danger);
}

.breakdown-divider {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 8px;
}

.breakdown-total-label {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
}

.breakdown-total-value {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
}

.breakdown-source {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 12px;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Offer cards — Radio-button style */
.offer-cards-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.offer-card {
    width: 100%;
    background: var(--bg-surface);
    border: 2px solid var(--border-hover);
    border-radius: var(--radius-lg);
    padding: 20px 20px 20px 56px;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-family: var(--font-family);
}

.offer-card:hover {
    border-color: var(--accent);
    background: var(--bg-surface-hover);
}

.offer-card.selected {
    background: var(--accent-bg);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 0 20px var(--accent-glow);
}

/* Radio circle */
.offer-card::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-hover);
    background: transparent;
    transition: var(--transition);
}

.offer-card:hover::before {
    border-color: var(--accent);
}

.offer-card.selected::before {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: inset 0 0 0 4px var(--bg-surface);
}

.offer-card-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent);
    color: var(--bg-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-bottom-left-radius: 8px;
}

.offer-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.offer-card-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text-primary);
}

.offer-card.selected .offer-card-title {
    color: var(--accent);
}

.offer-card-subtitle {
    font-size: 14px;
    margin: 0;
    color: var(--text-secondary);
}

.offer-card-price-section {
    text-align: right;
    flex-shrink: 0;
}

.offer-card-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.offer-card.selected .offer-card-price {
    color: var(--accent);
}

.offer-card-savings {
    font-size: 13px;
    font-weight: 600;
    margin: 2px 0 0;
    color: var(--accent);
}

.offer-card-price-lg {
    font-size: 29px !important;
}

.offer-card-savings-lg {
    font-size: 17px !important;
}

/* "Choose an option" header with lines */
.choose-option-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    margin-top: 4px;
}

.choose-option-line {
    flex: 1;
    height: 1px;
    background: var(--accent);
    opacity: 0.4;
}

.choose-option-text {
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Accept button */
.accept-button {
    width: 100%;
    background: linear-gradient(135deg, #9333EA, #7C3AED);
    color: #FFFFFF;
    border: none;
    padding: 18px;
    border-radius: var(--radius-lg);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 0 40px rgba(147, 51, 234, 0.25);
    font-family: var(--font-family);
    transition: var(--transition);
    letter-spacing: -0.01em;
}

.accept-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(147, 51, 234, 0.4);
}

.accept-button:active {
    transform: scale(0.97);
}

/* Sell another item button */
.sell-another-btn {
    display: block;
    width: 100%;
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 12px;
    font-family: var(--font-family);
    transition: color 0.2s ease;
}

.sell-another-btn:hover {
    color: var(--accent);
}

/* Secondary button */
.secondary-button {
    width: 100%;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid #444444;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 15px;
    cursor: pointer;
    margin-top: 8px;
    font-family: var(--font-family);
}

.secondary-button:hover {
    border-color: #666666;
    color: var(--text-primary);
}

.secondary-button:active {
    transform: scale(0.97);
}

/* ============================================ */
/* UTILITIES */
/* ============================================ */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media (max-width: 640px) {
    .landing-headline {
        font-size: 36px;
    }

    .landing-subtitle {
        font-size: 16px;
    }

    .cta-button {
        padding: 16px 32px;
        font-size: 17px;
    }

    .trust-badges {
        gap: 16px;
    }

    .offer-title {
        font-size: 24px;
    }

    .offer-card-price {
        font-size: 20px;
    }

    .offer-card-price-lg {
        font-size: 24px !important;
    }

    .offer-card-savings-lg {
        font-size: 15px !important;
    }

    .offer-card {
        padding: 18px 18px 18px 50px;
    }

    .offer-card::before {
        left: 16px;
        width: 20px;
        height: 20px;
    }
}

/* ============================================ */
/* LEGACY SUPPORT (Old v2/v3 Classes) */
/* ============================================ */
.container {
    max-width: 600px;
    margin: 0 auto;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-primary:active {
    transform: scale(0.97);
}

/* IMEI / Account Lock Notice (in chat) */
.imei-notice {
    display: flex;
    gap: 10px;
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    max-width: 85%;
}

.imei-notice-icon {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1.5;
}

.imei-notice-text {
    color: #e5c565;
    font-size: 13px;
    line-height: 1.5;
}

.imei-notice-text strong {
    color: #fbbf24;
}

/* IMEI Warning on Offer Screen */
.imei-offer-warning {
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-top: 16px;
    color: #e5c565;
    font-size: 14px;
    line-height: 1.6;
}

.imei-offer-warning strong {
    color: #fbbf24;
}

.imei-offer-warning-text {
    margin-bottom: 14px;
}

.imei-acknowledge-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 14px;
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.25);
    border-radius: 8px;
    transition: all 0.2s ease;
    color: #d4b85c;
    font-size: 14px;
    font-weight: 600;
}

.imei-acknowledge-label:hover {
    background: rgba(234, 179, 8, 0.14);
    border-color: rgba(234, 179, 8, 0.4);
}

.imei-acknowledge-label.highlight {
    border-color: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.3);
    animation: imeiPulse 0.4s ease;
}

.imei-acknowledge-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #fbbf24;
    cursor: pointer;
    flex-shrink: 0;
}

.imei-acknowledge-label input[type="checkbox"]:checked + span {
    color: #fbbf24;
}

@keyframes imeiPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Customer form */
.customer-form {
    padding: 16px;
    max-width: 460px;
    margin: 0 auto;
}

.customer-form .offer-container {
    width: 100%;
}

/* Modal overlay */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 100;
    overflow-y: auto;
}

/* Textarea in dark theme */
textarea.input-field {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    font-family: var(--font-family);
}

textarea.input-field:focus {
    border-color: var(--accent);
}

/* Date input fix for dark theme */
input[type="date"].input-field {
    color-scheme: dark;
}

/* Checkbox & radio styling */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--accent);
}

/* Update preference radio options */
.update-pref-option:has(input:checked) {
    border-color: var(--accent) !important;
    background: rgba(147, 51, 234, 0.08);
}

/* Error toast animation */
@keyframes toastFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Loading spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading p {
    color: var(--text-secondary);
}

/* ============================================
   PHOTO UPLOAD
   ============================================ */

.photo-upload-section {
    padding: 16px;
    animation: fadeInUp 0.3s ease;
}

.photo-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--surface);
}

.photo-upload-area:hover,
.photo-upload-area:active {
    border-color: var(--accent);
    background: rgba(240, 192, 64, 0.05);
}

.upload-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.upload-text {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
    margin: 0;
}

.upload-subtext {
    color: var(--text-muted);
    font-size: 13px;
    margin: 4px 0 0 0;
}

.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.photo-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-count {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    margin: 8px 0;
}

.photo-submit-btn {
    width: 100%;
    margin-top: 8px;
    background: var(--accent) !important;
    color: var(--bg-primary) !important;
    font-weight: 700 !important;
}

.photo-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

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

.contact-form-section {
    padding: 16px;
    animation: fadeInUp 0.3s ease;
}

.contact-field {
    margin-bottom: 12px;
}

.contact-field label {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}

.contact-field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.contact-field input:focus {
    border-color: var(--accent);
}

.contact-field input::placeholder {
    color: var(--text-muted);
}

.contact-submit-btn {
    width: 100%;
    margin-top: 8px;
    background: var(--accent) !important;
    color: var(--bg-primary) !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 14px !important;
    border-radius: var(--radius-lg) !important;
}

/* ============================================ */
/* FAQ SECTION */
/* ============================================ */

.faq-section {
    background: var(--bg-primary);
    padding: 60px 20px;
    display: flex;
    justify-content: center;
}

.faq-container {
    max-width: 700px;
    width: 100%;
}

.faq-heading {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 32px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    background: var(--bg-surface);
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: var(--border-hover);
}

.faq-item[open] {
    border-color: var(--accent);
}

.faq-question {
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
    color: var(--accent);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
}

.faq-item[open] .faq-question::after {
    content: '−';
}

.faq-answer {
    padding: 0 20px 18px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.faq-answer p {
    margin: 0;
}

@media (max-width: 600px) {
    .faq-section {
        padding: 40px 16px;
    }

    .faq-heading {
        font-size: 22px;
    }

    .faq-question {
        font-size: 15px;
        padding: 16px;
    }

    .faq-answer {
        font-size: 14px;
        padding: 0 16px 16px;
    }
}
