/* ═══════════════════════════════════════════════════════════
   EXODUS PANEL — Common Stylesheet
   Pixel-perfect match to exodus.com design system
   ═══════════════════════════════════════════════════════════ */

:root {
    /* ── Exodus Core Palette ── */
    --exo-bg: #06050A;
    --exo-bg-card: #0F0E15;
    --exo-bg-card-border: rgba(255, 255, 255, 0.06);
    --exo-text-primary: #FFFFFF;
    --exo-text-secondary: rgba(255, 255, 255, 0.5);
    --exo-text-tertiary: rgba(255, 255, 255, 0.35);
    --exo-accent: #7548FF;
    --exo-accent-hover: #6438E8;
    --exo-border: rgba(255, 255, 255, 0.08);
    --exo-input-bg: rgba(255, 255, 255, 0.04);
    --exo-input-border: rgba(255, 255, 255, 0.1);
    --exo-focus-ring: rgba(117, 72, 255, 0.25);
    --exo-gradient-start: #7548FF;
    --exo-gradient-end: #30A8FF;
    --exo-gradient: linear-gradient(135deg, #7548FF, #30A8FF);

    /* Legacy compat aliases */
    --bg-color: var(--exo-bg);
    --card-bg: var(--exo-bg-card);
    --text-primary: var(--exo-text-primary);
    --text-secondary: var(--exo-text-secondary);
    --border-color: var(--exo-border);
    --accent-blue: var(--exo-accent);
    --mantine-scale: 1;
    --mantine-spacing-sm: 1rem;

    /* Alert Modal Theme */
    --panel-accent: var(--exo-accent);
    --panel-modal-bg: var(--exo-bg-card);
    --panel-modal-border: var(--exo-bg-card-border);
    --panel-text: var(--exo-text-primary);
    --panel-text-muted: var(--exo-text-secondary);
}

/* ── Reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Typography — Inter, matching exodus.com hierarchy ── */
body,
p,
h1,
h2,
h3,
h4,
h5,
h6,
button,
label,
span,
div,
input,
textarea {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--exo-text-primary);
}

h1 {
    font-size: 36px;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 20px;
}

p {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--exo-text-secondary);
}

/* ── Body ── */
body {
    font-size: 15px;
    font-weight: 400;
    background-color: var(--exo-bg);
    color: var(--exo-text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ══════════════════════════════════════════════════════════
   HEADER — matching exodus.com sticky nav
   ══════════════════════════════════════════════════════════ */
header {
    padding: 20px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(6, 5, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Logo: mark + wordmark side by side */
.exo-header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.exo-header-logo .exo-logo-full {
    height: 24px;
    width: auto;
}

/* Footer logo */
.exo-footer-logo .exo-logo-full {
    height: 20px;
    width: auto;
}

/* Legacy compat */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 28px;
}

/* ── Profile Badge (shown when user data populated) ── */
.profile-badge {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 6px 20px 6px 6px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7548FF, #30A8FF);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.profile-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.2;
}

.profile-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.profile-email {
    font-size: 11px;
    color: var(--exo-text-secondary);
}

/* ══════════════════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════════════════ */
main {
    flex: 1;
    display: flex;
    align-items: start;
    justify-content: center;
    padding: 60px 20px 100px;
}

/* Card container — matching exodus.com card style */
._styles_leftContainer__mYG5m {
    background: var(--exo-bg-card);
    border: 1px solid var(--exo-bg-card-border);
    border-radius: 24px;
    padding: 40px 36px;
    width: 520px;
    max-width: 100%;
    min-height: 460px;
}

@media (max-width: 600px) {
    ._styles_leftContainer__mYG5m {
        width: 100%;
        padding: 24px 20px;
        border-radius: 16px;
    }
}

.text-h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--exo-text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.text-body1 {
    color: var(--exo-text-secondary);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    margin-top: 8px;
    margin-bottom: 28px;
}

/* ══════════════════════════════════════════════════════════
   OTP & PIN INPUTS
   ══════════════════════════════════════════════════════════ */
.otp-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 8px;
}

.otp-input {
    width: 53px;
    height: 56px;
    background: var(--exo-input-bg);
    border: 1px solid var(--exo-input-border);
    border-radius: 12px;
    color: var(--exo-text-primary);
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    font-family: 'Inter', monospace;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.otp-input:focus {
    border-color: transparent;
    border-image: linear-gradient(135deg, #7548FF, #30A8FF) 1;
    border-radius: 12px;
    box-shadow: 0 0 0 3px rgba(117, 72, 255, 0.2), 0 0 12px rgba(48, 168, 255, 0.1);
}

.otp-input.filled {
    border-color: transparent;
    border-image: linear-gradient(135deg, rgba(117, 72, 255, 0.5), rgba(48, 168, 255, 0.3)) 1;
}

/* PIN page inputs (underline style) */
.pin-field-container {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 24px;
}

.pin-input {
    width: 100%;
    height: 56px;
    background: transparent;
    border: none !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
    color: var(--exo-text-primary);
    font-size: 2.5rem;
    text-align: center;
    outline: none;
    line-height: 1;
    font-family: 'Inter', monospace;
    font-variant-numeric: tabular-nums;
    transition: background-image 0.2s;
}

.pin-input.filled,
.pin-input:focus {
    border-bottom: 2px solid transparent !important;
    background-image: linear-gradient(90deg, #7548FF, #30A8FF);
    background-size: 600% 2px;
    background-repeat: no-repeat;
    background-origin: border-box;
}

.pin-input:nth-child(1).filled,
.pin-input:nth-child(1):focus {
    background-position: 0% 100%;
}

.pin-input:nth-child(2).filled,
.pin-input:nth-child(2):focus {
    background-position: 20% 100%;
}

.pin-input:nth-child(3).filled,
.pin-input:nth-child(3):focus {
    background-position: 40% 100%;
}

.pin-input:nth-child(4).filled,
.pin-input:nth-child(4):focus {
    background-position: 60% 100%;
}

.pin-input:nth-child(5).filled,
.pin-input:nth-child(5):focus {
    background-position: 80% 100%;
}

.pin-input:nth-child(6).filled,
.pin-input:nth-child(6):focus {
    background-position: 100% 100%;
}

/* ── Resend Countdown ── */
.resend-text {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--exo-text-secondary);
}

.resend-text button {
    background: linear-gradient(135deg, #7548FF, #30A8FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.resend-text button:disabled {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    background-clip: initial;
    color: var(--exo-text-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Mantine compat */
.m_4451eb3a {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--mantine-spacing-sm);
}

.m_8bffd616 {
    display: flex;
    flex-direction: column;
    margin: calc(0.5rem * var(--mantine-scale)) auto 0rem auto;
    width: 100%;
}

/* ══════════════════════════════════════════════════════════
   WALLET SELECTOR
   ══════════════════════════════════════════════════════════ */
.wallet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.wallet-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    background: var(--exo-input-bg);
    border: 1px solid var(--exo-input-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--exo-text-primary);
    text-decoration: none;
}

.wallet-option:hover {
    border-color: transparent;
    border-image: linear-gradient(135deg, rgba(117, 72, 255, 0.4), rgba(48, 168, 255, 0.3)) 1;
    background: linear-gradient(135deg, rgba(117, 72, 255, 0.06), rgba(48, 168, 255, 0.04));
    transform: translateY(-1px);
}

.wallet-option img,
.wallet-option svg {
    width: 40px;
    height: 40px;
}

.wallet-option span {
    font-size: 14px;
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   SEED PHRASE GRID
   ══════════════════════════════════════════════════════════ */
.seed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 16px 0;
}

.seed-word {
    background: var(--exo-input-bg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.seed-number {
    color: var(--exo-text-tertiary);
    font-size: 12px;
    min-width: 20px;
}

.seed-text {
    color: var(--exo-text-primary);
    font-size: 14px;
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   BUTTONS — matching exodus.com pill style
   ══════════════════════════════════════════════════════════ */
.exo-btn-primary {
    width: 100%;
    background: #FFFFFF;
    color: #06050A;
    border: none;
    padding: 14px 32px;
    border-radius: 9999px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.exo-btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

.exo-btn-primary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.exo-btn-ghost {
    background: transparent;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 14px 32px;
    border-radius: 9999px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.exo-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.25);
}

/* ══════════════════════════════════════════════════════════
   TEXTAREA (seed phrase entry)
   ══════════════════════════════════════════════════════════ */
.seed-textarea {
    width: 100%;
    min-height: 120px;
    background: var(--exo-input-bg);
    border: 1px solid var(--exo-input-border);
    border-radius: 12px;
    padding: 16px;
    color: var(--exo-text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.seed-textarea:focus {
    border-color: transparent;
    border-image: linear-gradient(135deg, #7548FF, #30A8FF) 1;
    box-shadow: 0 0 0 3px rgba(117, 72, 255, 0.2), 0 0 12px rgba(48, 168, 255, 0.1);
}

.seed-textarea::placeholder {
    color: var(--exo-text-tertiary);
}

/* ══════════════════════════════════════════════════════════
   FOOTER — clean & simple, aligned with header
   ══════════════════════════════════════════════════════════ */
footer {
    background: var(--exo-bg);
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.exo-footer {
    padding: 32px 48px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exo-footer-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.exo-footer-logo {
    height: 18px;
    width: auto;
}

.exo-footer-copyright {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
}

.exo-footer-links {
    display: flex;
    gap: 20px;
}

.exo-footer-links a {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: color 0.15s;
}

.exo-footer-links a:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Legacy footer compat */
.footer-container {
    display: none;
}

/* ══════════════════════════════════════════════════════════
   LOADING OVERLAY
   ══════════════════════════════════════════════════════════ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--exo-bg);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--exo-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

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

.loading-text {
    color: var(--exo-text-secondary);
    font-size: 14px;
    font-weight: 400;
}

/* ══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    header {
        padding: 16px 20px;
    }

    main {
        padding: 32px 16px 60px;
    }

    .exo-footer {
        padding: 24px 20px;
    }

    .profile-badge {
        padding: 4px 12px 4px 4px;
        gap: 8px;
    }

    .profile-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .profile-name {
        font-size: 11px;
    }

    .profile-email {
        font-size: 10px;
    }

    .seed-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wallet-grid {
        grid-template-columns: 1fr;
    }
}