:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #818cf8;
    --accent: #06b6d4;
    --premium: #f59e0b;
    --dark: #0f172a;
    --slate: #475569;
    --muted: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --success: #10b981;
    --voice: #0ea5e9;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.18);
    --radius: 16px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light);
    color: var(--dark);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Hero / Background ---------- */
.hero-bg {
    position: relative;
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(49, 46, 129, 0.92) 0%, rgba(79, 70, 229, 0.82) 45%, rgba(6, 182, 212, 0.78) 100%),
        url('https://images.unsplash.com/photo-1521737711867-e3b97375f902?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 40px 16px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---------- Top navigation ---------- */
.topbar {
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px 28px;
    color: #fff;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.35em;
    letter-spacing: -0.02em;
}
.brand .logo-mark {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    font-size: 1.1em;
    backdrop-filter: blur(6px);
}
.wallet-info {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    font-size: 0.95em;
}
.btn-premium {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1f2937;
    text-decoration: none;
    padding: 9px 18px;
    border-radius: 30px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-premium:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(245, 158, 11, 0.5); }

/* ---------- Profile avatar + dropdown ---------- */
.profile-menu {
    position: relative;
    display: inline-block;
}
.profile-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 700;
    font-size: 1.05em;
    cursor: pointer;
    display: grid;
    place-items: center;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    transition: transform 0.15s, box-shadow 0.15s;
}
.profile-avatar:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 230px;
    background: #fff;
    color: #1f2937;
    border-radius: 14px;
    padding: 20px 18px 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 50;
}
.profile-menu.open .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.profile-dropdown::before {
    content: "";
    position: absolute;
    top: -7px; right: 15px;
    width: 14px; height: 14px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(15, 23, 42, 0.06);
}
.profile-dropdown .pd-avatar {
    width: 56px; height: 56px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 700;
    font-size: 1.4em;
    display: grid;
    place-items: center;
    text-transform: uppercase;
}
.profile-dropdown .pd-name {
    font-weight: 700;
    font-size: 1.05em;
    word-break: break-word;
}
.profile-dropdown .pd-email {
    margin-top: 4px;
    font-size: 0.85em;
    color: #64748b;
    word-break: break-all;
}
.profile-dropdown .pd-logout {
    display: inline-block;
    margin-top: 14px;
    padding: 7px 20px;
    border-radius: 24px;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85em;
    transition: background 0.15s, color 0.15s;
}
.profile-dropdown .pd-logout:hover { background: #e2e8f0; color: #0f172a; }

/* ---------- Hero headline ---------- */
.hero-head {
    text-align: center;
    color: #fff;
    max-width: 760px;
    margin: 10px auto 36px;
}
.hero-head .eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
    backdrop-filter: blur(6px);
}
.hero-head h1 {
    font-size: clamp(2.1em, 5vw, 3.4em);
    line-height: 1.12;
    margin: 0 0 16px;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.hero-head h1 .accent {
    background: linear-gradient(90deg, #fde68a, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-head p {
    font-size: 1.12em;
    color: rgba(255,255,255,0.9);
    margin: 0 auto;
    max-width: 580px;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 36px;
    margin-top: 26px;
    flex-wrap: wrap;
}
.hero-stats .stat { text-align: center; color: #fff; }
.hero-stats .stat b { display: block; font-size: 1.6em; font-weight: 800; }
.hero-stats .stat span { font-size: 0.85em; color: rgba(255,255,255,0.8); }

/* ---------- Glass card container ---------- */
.container {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 36px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.container2 {
    max-width: 440px;
    margin: 0 auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.card-head {
    text-align: center;
    margin-bottom: 28px;
}
.card-head h2 {
    margin: 0 0 6px;
    font-size: 1.6em;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.card-head p { margin: 0; color: var(--muted); font-size: 0.98em; }

h3 {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--dark);
    margin: 24px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- Form ---------- */
.grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 8px;
}
.grid-form.single { grid-template-columns: 1fr; }

label.field-label {
    font-size: 0.82em;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 6px;
    display: block;
}

input, select {
    padding: 13px 14px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    width: 100%;
    font-size: 0.98em;
    font-family: inherit;
    background: #fff;
    color: var(--dark);
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
input::placeholder { color: #94a3b8; }

.divider {
    height: 1px;
    background: var(--border);
    border: none;
    margin: 28px 0 4px;
}

.premium-tag {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    font-size: 0.65em;
    padding: 3px 10px;
    border-radius: 20px;
    color: #1f2937;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* ---------- Action buttons ---------- */
.action-section { margin-top: 30px; }
.main-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.btn-action {
    border: none;
    padding: 20px 24px;
    border-radius: 16px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.05em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}
.btn-action .ba-icon { font-size: 1.5em; }
.btn-action .ba-sub { font-size: 0.78em; font-weight: 500; opacity: 0.9; }
.btn-action:hover { transform: translateY(-3px); filter: brightness(1.05); }
.chat { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 10px 24px rgba(16, 185, 129, 0.35); }
.voice { background: linear-gradient(135deg, #0ea5e9, #0369a1); box-shadow: 0 10px 24px rgba(14, 165, 233, 0.35); }

.secondary-actions { text-align: center; margin-top: 18px; }
.btn-last {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 30px;
    border: 1.5px solid var(--border);
    transition: background 0.2s, border-color 0.2s;
}
.btn-last:hover { background: #f1f5f9; border-color: var(--primary-light); }

/* ---------- Feature strip ---------- */
.feature-strip {
    width: 100%;
    max-width: 820px;
    margin: 36px auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.feature-card {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 22px 18px;
    color: #fff;
    text-align: center;
    backdrop-filter: blur(8px);
}
.feature-card .fc-icon { font-size: 1.8em; display: block; margin-bottom: 10px; }
.feature-card h4 { margin: 0 0 6px; font-size: 1.02em; font-weight: 700; }
.feature-card p { margin: 0; font-size: 0.85em; color: rgba(255,255,255,0.82); }

/* ---------- Messages ---------- */
.messages { margin-bottom: 18px; }
.alert {
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: #eef2ff;
    color: var(--primary-dark);
    font-weight: 500;
    border: 1px solid #e0e7ff;
}

/* ---------- Buttons ---------- */
.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    font-size: 1.05em;
    font-weight: 700;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(79, 70, 229, 0.4); }

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}
.modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.modal-content h2 { margin-top: 0; }
.modal-buttons { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.btn-skip {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.95em;
    font-family: inherit;
}

/* ---------- Searching state ---------- */
.searching-overlay .modal-content { max-width: 460px; }
.status-pulse {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    margin: 10px auto 24px;
    animation: pulse 2s infinite;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 2em;
}
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.6); }
    70% { transform: scale(1); box-shadow: 0 0 0 24px rgba(79, 70, 229, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

footer.site-foot {
    text-align: center;
    color: rgba(255,255,255,0.75);
    font-size: 0.85em;
    margin-top: 44px;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    .grid-form { grid-template-columns: 1fr; }
    .main-actions { grid-template-columns: 1fr; }
    .feature-strip { grid-template-columns: 1fr; }
    .container { padding: 24px; }
    .hero-bg { background-attachment: scroll; }
    .wallet-info { font-size: 0.82em; gap: 8px; }
}
