/* ===================================================
   WALLET CONNECT UI
   =================================================== */

/* Wallet bar container */
.wallet-bar {
    display: flex;
    align-items: center;
    padding: 8px 0 4px;
    margin-bottom: 4px;
}

/* "Connect Hot Wallet" button (disconnected state) */
.btn-wallet-connect-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px dashed var(--border-color);
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-sans);
    white-space: nowrap;
}
.btn-wallet-connect-inline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-glow);
}

/* Connected info bar */
.wallet-connected-info {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 0.78rem;
}

.wallet-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-text-muted);
    flex-shrink: 0;
    transition: background var(--transition);
}
.wallet-status-dot.dot-connected {
    background: var(--color-success);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.wallet-addr-text {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--color-text-main);
    font-weight: 600;
}

.wallet-sep {
    color: var(--color-text-muted);
}

.wallet-balance-text {
    color: var(--color-text-muted);
    font-size: 0.76rem;
}

.btn-wallet-disconnect {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
    transition: all var(--transition);
}
.btn-wallet-disconnect:hover {
    border-color: var(--color-error);
    color: var(--color-error);
    background: rgba(239, 68, 68, 0.08);
}

/* Chain badges */
.chain-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: var(--border-color);
    color: var(--color-text-muted);
}
/* Base colors are tuned for the DARK theme (the default) — brighter so they stay
   legible on the dark surface; the light-theme overrides below use deeper shades. */
.chain-badge.chain-eth {
    background: rgba(98, 126, 234, 0.18);
    color: #8FA4F3;
}
.chain-badge.chain-bsc {
    background: rgba(240, 185, 11, 0.20);
    color: #F0B90B;
}
.chain-badge.chain-sol {
    background: rgba(153, 69, 255, 0.20);
    color: #B98CFF;
}
body.light-theme .chain-badge.chain-eth { color: #3B5BDB; }
body.light-theme .chain-badge.chain-bsc { color: #A16207; }
body.light-theme .chain-badge.chain-sol { color: #7C3AED; }
@media (prefers-color-scheme: light) {
    body:not(.dark-theme) .chain-badge.chain-eth { color: #3B5BDB; }
    body:not(.dark-theme) .chain-badge.chain-bsc { color: #A16207; }
    body:not(.dark-theme) .chain-badge.chain-sol { color: #7C3AED; }
}

/* Wallet Picker Dialog */
.wallet-picker-dialog {
    max-width: 360px;
    width: calc(100% - 32px);
}

.wallet-options-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wallet-option-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
    font-family: var(--font-sans);
    width: 100%;
}
.wallet-option-card:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-glow);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.wallet-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wallet-option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wallet-option-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text-main);
}
.wallet-option-desc {
    font-size: 0.73rem;
    color: var(--color-text-muted);
}

.wallet-avail-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    background: var(--border-color);
    color: var(--color-text-muted);
}
.wallet-avail-badge.avail-yes {
    background: rgba(16, 185, 129, 0.12);
    color: var(--color-success);
}
.wallet-avail-badge.avail-no {
    background: rgba(239, 68, 68, 0.08);
    color: var(--color-error);
}
.wallet-avail-badge.avail-app {
    background: rgba(59, 130, 246, 0.12);
    color: var(--color-primary);
}

/* QR Code container */
.qr-box canvas,
.qr-box img {
    border-radius: 8px;
}

/* ===================================================
   END WALLET CONNECT UI
   =================================================== */

/* Blue Ocean - Premium Dark-First & Glassmorphic Theme Styling */

:root {
    /* Base Dark Theme (Default) */
    --bg-app: #040814;
    --bg-card: rgba(13, 20, 38, 0.55);
    --bg-input: rgba(20, 30, 54, 0.7);
    --bg-input-inner: rgba(9, 14, 28, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-focus: #4F46E5;
    
    /* Elegant DeFi Accents & Gradients */
    --color-primary: #3B82F6;
    --color-primary-dark: #1D4ED8;
    --color-primary-glow: rgba(99, 102, 241, 0.15);
    --color-text-main: #F8FAFC;
    --color-text-muted: #94A3B8;
    
    /* Standard Status Colors */
    --color-error: #F87171;
    --color-success: #34D399;
    --color-warning: #FBBF24;
    
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px -15px rgba(4, 8, 20, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);

    --bg-header: rgba(4, 8, 20, 0.75);
    --bg-pattern: radial-gradient(circle at top, rgba(59, 130, 246, 0.12) 0%, rgba(4, 8, 20, 0) 70%);
    --color-accent-gradient: linear-gradient(135deg, #3B82F6 0%, #1E3A8A 55%, #0B1220 100%);
    --color-card-border-glow: rgba(99, 102, 241, 0.25);
    --glass-blur: blur(14px);
}

/* Explicit Light Theme Class */
body.light-theme {
    --bg-app: #F8FAFC;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-input: #FFFFFF;
    --bg-input-inner: #F1F5F9;
    --border-color: rgba(15, 23, 42, 0.08);
    --border-color-focus: #2563EB;
    
    --color-primary: #2563EB;
    --color-primary-dark: #1D4ED8;
    --color-primary-glow: rgba(37, 99, 235, 0.08);
    --color-text-main: #0F172A;
    --color-text-muted: #64748B;
    
    --color-error: #EF4444;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.03);

    --bg-header: rgba(255, 255, 255, 0.8);
    --bg-pattern: radial-gradient(circle at top, rgba(37, 99, 235, 0.06) 0%, rgba(248, 250, 252, 0) 70%);
    --color-accent-gradient: linear-gradient(135deg, #2563EB 0%, #0F172A 100%);
    --color-card-border-glow: rgba(37, 99, 235, 0.12);
}

/* Explicit Dark Theme Class */
body.dark-theme {
    --bg-app: #040814;
    --bg-card: rgba(13, 20, 38, 0.55);
    --bg-input: rgba(20, 30, 54, 0.7);
    --bg-input-inner: rgba(9, 14, 28, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-focus: #4F46E5;
    
    --color-primary: #3B82F6;
    --color-primary-dark: #1D4ED8;
    --color-primary-glow: rgba(99, 102, 241, 0.15);
    --color-text-main: #F8FAFC;
    --color-text-muted: #94A3B8;
    
    --color-error: #F87171;
    --color-success: #34D399;
    --color-warning: #FBBF24;

    --bg-header: rgba(4, 8, 20, 0.75);
    --bg-pattern: radial-gradient(circle at top, rgba(59, 130, 246, 0.12) 0%, rgba(4, 8, 20, 0) 70%);
    --color-accent-gradient: linear-gradient(135deg, #3B82F6 0%, #1E3A8A 55%, #0B1220 100%);
    --color-card-border-glow: rgba(99, 102, 241, 0.25);
}

/* System-based Auto Dark Theme: If not light-theme, apply system colors */
@media (prefers-color-scheme: light) {
    body:not(.dark-theme) {
        --bg-app: #F8FAFC;
        --bg-card: rgba(255, 255, 255, 0.75);
        --bg-input: #FFFFFF;
        --bg-input-inner: #F1F5F9;
        --border-color: rgba(15, 23, 42, 0.08);
        --border-color-focus: #2563EB;
        
        --color-primary: #2563EB;
        --color-primary-dark: #1D4ED8;
        --color-primary-glow: rgba(37, 99, 235, 0.08);
        --color-text-main: #0F172A;
        --color-text-muted: #64748B;
        
        --color-error: #EF4444;
        --color-success: #10B981;
        --color-warning: #F59E0B;
        
        --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
        --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.03);

        --bg-header: rgba(255, 255, 255, 0.8);
        --bg-pattern: radial-gradient(circle at top, rgba(37, 99, 235, 0.06) 0%, rgba(248, 250, 252, 0) 70%);
        --color-accent-gradient: linear-gradient(135deg, #2563EB 0%, #0F172A 100%);
        --color-card-border-glow: rgba(37, 99, 235, 0.12);
    }
}

/* Animations */
@keyframes float-orb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -50px) scale(1.15); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes float-orb-reverse {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, 30px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes rate-flash-up {
    0% { box-shadow: 0 0 15px rgba(52, 211, 153, 0.4); border-color: #34D399; }
    100% { box-shadow: none; }
}

@keyframes rate-flash-down {
    0% { box-shadow: 0 0 15px rgba(248, 113, 113, 0.4); border-color: #F87171; }
    100% { box-shadow: none; }
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}


/* Reset and Core Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: clip;
    max-width: 100%;
}

body {
    background-color: var(--bg-app);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: clip;
    position: relative;
    padding-bottom: 24px; /* Modest bottom breathing room (no simulator bar present) */
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition), color var(--transition);
}

/* Cyber Grid & Glowing Orbs Background */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: -2;
    pointer-events: none;
    transform: translateZ(0); /* own compositor layer: no re-raster on scroll */
}
body.light-theme .cyber-grid {
    background-image: radial-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px);
}
@media (prefers-color-scheme: light) {
    body:not(.dark-theme) .cyber-grid {
        background-image: radial-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px);
    }
}

.glowing-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.18;
    transition: opacity var(--transition);
    will-change: transform;       /* keep on its own layer; cheap transform animation */
    contain: strict;              /* isolate from page layout/paint */
}
body.light-theme .glowing-orb {
    opacity: 0.04;
}
@media (prefers-color-scheme: light) {
    body:not(.dark-theme) .glowing-orb {
        opacity: 0.04;
    }
}

.orb-1 {
    top: -100px;
    left: 10%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, rgba(11, 18, 32, 0.1) 70%, transparent 100%);
    animation: float-orb 20s infinite ease-in-out;
}

.orb-2 {
    top: 25%;
    right: 5%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.4) 0%, rgba(30, 58, 138, 0.12) 70%, transparent 100%);
    animation: float-orb-reverse 16s infinite ease-in-out;
}

.orb-3 {
    bottom: -150px;
    left: 5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, rgba(11, 18, 32, 0.12) 70%, transparent 100%);
    animation: float-orb 25s infinite ease-in-out;
}

/* --- Scroll & paint performance ---
   Skip rendering off-screen heavy sections so initial load is fast and
   scrolling (e.g. straight to the footer) doesn't stutter painting the
   chart/table/FAQ/marquee in between. */
.trust-features,
.market-section,
.live-activity-wrapper,
.history-section,
.faq-section,
.global-partners-marquee {
    content-visibility: auto;
    contain-intrinsic-size: auto 360px;
}

/* Isolate paint of heavy glass/animated cards (no absolutely-positioned
   overflow children here, so paint containment is safe). */
.live-activity-box,
.collapsible-card,
.feature-item {
    contain: paint;
}

@media (prefers-reduced-motion: reduce) {
    .glowing-orb { animation: none; }
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Header style */
.app-header {
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-container {
    max-width: 480px; /* Aligned with widget width */
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.65rem;
    letter-spacing: -0.6px;
    line-height: 1;
}

.logo-text .highlight {
    color: var(--color-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-header-action {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition);
}

.btn-header-action:hover {
    color: var(--color-primary);
}

.btn-biz-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 7px 13px;
    border-radius: 7px;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.btn-biz-login::before {
    content: "";
    width: 14px; height: 14px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l8-4v18'/%3E%3Cpath d='M19 21V11l-6-4'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l8-4v18'/%3E%3Cpath d='M19 21V11l-6-4'/%3E%3C/svg%3E") center/contain no-repeat;
}

.btn-biz-login:hover {
    background: var(--color-primary-dark, #1D4ED8);
    box-shadow: 0 2px 8px var(--color-primary-glow);
    transform: translateY(-1px);
}

@media (max-width: 560px) {
    .btn-biz-login { font-size: 0; padding: 7px 9px; gap: 0; }
    .btn-biz-login::before { width: 16px; height: 16px; }
}

.select-header-action {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-sans);
}

.select-header-action:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 6px var(--color-primary-glow);
}


.system-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--color-success);
}

/* App container */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-text-muted);
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.85rem;
}

.text-blue {
    color: var(--color-primary);
}

.text-red {
    color: var(--color-error);
}

.text-green {
    color: var(--color-success);
}

.w-full {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Hero introductory section */
.intro-section h1 {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    color: var(--color-text-main);
}

.gradient-text {
    background: linear-gradient(110deg, var(--color-primary) 0%, var(--color-primary-dark) 35%, #60A5FA 55%, var(--color-primary) 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shine 6s linear infinite;
}

@keyframes gradient-shine {
    0% { background-position: 0% center; }
    100% { background-position: 220% center; }
}

@media (prefers-reduced-motion: reduce) {
    .gradient-text {
        animation: none;
    }
}

.subtitle {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* Widget Card styling (Apple / Stripe style) with 3D depth */
.widget-wrapper {
    width: 100%;
    perspective: 1400px;
}

.widget-card {
    background-color: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s, box-shadow 0.4s;
}

.widget-card:hover {
    border-color: var(--color-card-border-glow);
    box-shadow: var(--shadow-lg), 0 24px 60px -20px rgba(37, 99, 235, 0.25), 0 0 30px rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}

.widget-step {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Buy / Sell direction toggle (segmented control) */
.direction-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-input-inner);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px;
}

.dir-tab {
    flex: 1;
    padding: 9px 0;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.92rem;
    border-radius: 9px;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: -0.2px;
}

.dir-tab:not(.active):hover {
    color: var(--color-text-main);
}

.dir-tab.active {
    background: var(--color-accent-gradient);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.step-header h2 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-main);
}

.rate-badge {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.12);
    padding: 4px 10px;
    border-radius: 20px;
    transition: all var(--transition);
}

.rate-badge.rate-flash-up {
    animation: rate-flash-up 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    color: #34D399;
}

.rate-badge.rate-flash-down {
    animation: rate-flash-down 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    color: #F87171;
}

.btn-back {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: color var(--transition);
}

.btn-back:hover {
    color: var(--color-primary);
}

/* Form input elements */
.input-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.block-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-row {
    display: flex;
    background-color: var(--bg-input-inner);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    align-items: center;
    transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}

.input-row:focus-within {
    border-color: var(--border-color-focus);
    box-shadow: 0 0 0 3px var(--color-primary-glow), 0 0 12px var(--color-primary-glow);
    background-color: rgba(20, 30, 54, 0.4);
}

body.light-theme .input-row:focus-within {
    background-color: #ffffff;
}

.input-row.readonly-row {
    background-color: rgba(9, 14, 28, 0.3);
}

body.light-theme .input-row.readonly-row {
    background-color: rgba(241, 245, 249, 0.5);
}

.value-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--color-text-main);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    flex-grow: 1;
    width: 60%;
    letter-spacing: -0.3px;
}

.coin-selector, .form-control {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition);
}

.coin-selector:focus, .form-control:focus {
    border-color: var(--color-primary);
}

/* Custom Dropdown Selector Component */
.custom-select-wrapper {
    position: relative;
}

.custom-select-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: all var(--transition);
    user-select: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.custom-select-trigger:hover {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.08);
}

body.light-theme .custom-select-trigger:hover {
    background: rgba(15, 23, 42, 0.04);
}

.custom-select-trigger:focus {
    border-color: var(--border-color-focus);
    box-shadow: 0 0 0 2px var(--color-primary-glow);
}

.coin-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.coin-icon-wrapper svg {
    width: 100%;
    height: 100%;
}

.select-chevron {
    transition: transform var(--transition);
    color: var(--color-text-muted);
}

.custom-select-wrapper:focus-within .select-chevron {
    transform: rotate(180deg);
}

.custom-options-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 240px;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.25s, transform 0.25s;
}

.custom-options-dropdown.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    display: none !important;
}

.dropdown-search-container {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-search-container input {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-input-inner);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--color-text-main);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    outline: none;
    transition: border-color var(--transition);
}

.dropdown-search-container input:focus {
    border-color: var(--border-color-focus);
}

.dropdown-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

body.light-theme .dropdown-item:hover {
    background: rgba(15, 23, 42, 0.04);
}

.dropdown-item.active {
    background: var(--color-primary-glow);
    color: var(--color-primary);
}

.dropdown-item .coin-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-main);
}

.dropdown-item .coin-fullname {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-left: auto;
}

.currency-label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

.block-subinfo {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.balance-shortcut {
    cursor: pointer;
    font-weight: 500;
    transition: color var(--transition);
}

.balance-shortcut:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Network selection tabs */
.network-tabs-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.network-tab {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--color-text-muted);
    border-radius: 8px;
    padding: 8px 4px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.network-tab:hover {
    color: var(--color-text-main);
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.08);
}

.network-tab.active {
    border-color: var(--color-primary);
    color: #FFFFFF !important;
    background: var(--color-accent-gradient);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.trust-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    justify-content: center;
    margin: 4px 0;
}

.icon-secure {
    color: var(--color-primary);
}

/* Elegant Buttons */
.btn {
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-family: var(--font-sans);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition);
    letter-spacing: -0.1px;
}

.btn-primary {
    background: var(--color-accent-gradient);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45), 0 0 10px var(--color-primary-glow);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary);
}

body.light-theme .btn-secondary:hover {
    background: rgba(15, 23, 42, 0.03);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 0.92rem;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Form layouts Step 2 */
.receiver-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.group-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.form-control {
    background-color: var(--bg-input-inner);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--color-text-main);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    width: 100%;
    outline: none;
    transition: border-color var(--transition);
}

/* Minimal toggle switch for speeds */
.speed-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-input-inner);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
}

.speed-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.speed-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
}

.speed-desc {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

body.light-theme .slider {
    background-color: #E2E8F0;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #FFFFFF;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

input:checked + .slider {
    background: var(--color-accent-gradient);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

input:checked + .slider:before {
    transform: translateX(18px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Summary calculations block */
.summary-review-panel {
    background: var(--bg-input-inner);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.summary-row.total-received-row {
    border-top: 1px solid var(--border-color);
    padding-top: 6px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* STEP 3: ORDER TRACKER */
.tracker-title {
    font-size: 1rem;
    font-weight: 600;
}

.stepper-minimal {
    display: flex;
    justify-content: space-between;
    margin: 16px 0;
    position: relative;
    padding: 0 4px;
}

.stepper-minimal::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    z-index: 1;
}

body.light-theme .stepper-minimal::before {
    background: #E2E8F0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    flex: 1;
}

.dot-indicator {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-input-inner);
    border: 2px solid var(--border-color);
    transition: all var(--transition);
    position: relative;
}

.step-item span {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-weight: 700;
    white-space: nowrap;
    transition: color var(--transition);
}

.step-item.active .dot-indicator {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25), 0 0 15px var(--color-primary);
    animation: pulse-ring 2s infinite ease-in-out;
}

.step-item.active span {
    color: var(--color-primary);
    text-shadow: 0 0 10px var(--color-primary-glow);
}

.step-item.completed .dot-indicator {
    background: var(--color-success);
    border-color: var(--color-success);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}

.step-item.completed span {
    color: var(--color-success);
}

.deposit-area {
    background: var(--bg-input-inner);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.instruction {
    font-size: 0.8rem;
    text-align: center;
}

.qr-box {
    background: white;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: inline-flex;
}

.qr-pattern-svg {
    display: block;
}

.copy-field {
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

.copy-field code {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--color-text-main);
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
}

.copy-field code::-webkit-scrollbar {
    display: none;
}

.btn-copy {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 2px;
    transition: color var(--transition);
}

.btn-copy:hover {
    color: var(--color-primary);
}

.warning-box {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.68rem;
    color: var(--color-error);
    line-height: 1.3;
}

.countdown-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-error);
}

.icon-clock {
    animation: rotate-clock 12s infinite linear;
}

@keyframes rotate-clock {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tracker-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 4px;
}

/* Trust checklists */
.trust-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 8px;
}

.feature-item {
    display: flex;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: 12px;
    align-items: flex-start;
    box-shadow: 0 1px 3px rgba(0,0,0,0.01);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, border-color 0.3s;
}

.feature-item:hover {
    transform: translateY(-4px);
    border-color: var(--color-card-border-glow);
    box-shadow: 0 14px 30px -12px rgba(37, 99, 235, 0.18);
}

.feature-item svg {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-item:hover svg {
    transform: scale(1.12);
}

.feature-item h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--color-text-main);
}

.feature-item p {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.35;
}

/* Collapsible blocks */
.collapsible-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 1px 3px rgba(0,0,0,0.01);
}

.collapsible-trigger {
    padding: 14px 18px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
    color: var(--color-text-main);
}

.collapsible-trigger::-webkit-details-marker {
    display: none;
}

.collapsible-card[open] .collapsible-trigger svg {
    transform: rotate(180deg);
}

.collapsible-content {
    padding: 0 18px 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
}
/* Live charts */
.chart-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
}

.chart-stats-row .stat {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
    background: var(--bg-input-inner);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
}

.chart-stats-row .stat strong {
    font-size: 0.95rem;
    font-weight: 700;
}

.svg-chart-container {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 6px;
}

.svg-chart {
    width: 100%;
    height: auto;
    display: block;
}

/* Transaction histories table */
.history-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.btn-clear {
    background: transparent;
    border: none;
    color: var(--color-error);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition);
}

.btn-clear:hover {
    opacity: 0.8;
}

.table-scroll {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    text-align: left;
}

.table th {
    padding: 8px 10px;
    color: var(--color-text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--color-text-main);
}

.table tbody tr:hover {
    background: var(--bg-input-inner);
}

/* Status pills */
.status-pill {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-pill.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.status-pill.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

.status-pill.failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
}

/* FAQs */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-row h4 {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--color-text-main);
}

.faq-row p {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.35;
}

/* Clean Dialog / Modals with Modern @starting-style Entry/Exit Transitions */
.lite-dialog {
    background-color: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    max-width: 440px;
    width: calc(100% - 32px);
    margin: auto;
    color: var(--color-text-main);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, 0.05);
    outline: none;
    
    /* Base exit state & transition behavior */
    opacity: 0;
    transform: scale(0.95);
    transition-property: opacity, transform, display, overlay;
    transition-duration: 0.3s;
    transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
    transition-behavior: allow-discrete;
}

/* Open/Entry State */
.lite-dialog[open] {
    opacity: 1;
    transform: scale(1);
    
    @starting-style {
        opacity: 0;
        transform: scale(0.95);
    }
}

.lite-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: display 0.3s allow-discrete, overlay 0.3s allow-discrete, background-color 0.3s ease-out, backdrop-filter 0.3s ease-out;
}

.lite-dialog[open]::backdrop {
    background-color: rgba(4, 8, 20, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    @starting-style {
        background-color: rgba(0, 0, 0, 0);
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
}

/* Maintenance dialog */
.maintenance-dialog { max-width: 400px; text-align: center; }
.maintenance-body { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 4px; }
.maintenance-icon {
    width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--color-primary-glow); color: var(--color-primary);
    margin-bottom: 4px;
}
.maintenance-body h2 { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; color: var(--color-text-main); }
.maintenance-body p { font-size: 0.85rem; color: var(--color-text-muted); line-height: 1.5; margin: 0; }
.maintenance-body .maintenance-sub { font-size: 0.76rem; opacity: 0.85; }
.maintenance-body .btn { margin-top: 10px; }

/* Live activity maintenance state */
.activity-maintenance {
    display: flex; align-items: center; gap: 8px; justify-content: center;
    padding: 16px 12px; font-size: 0.8rem; color: var(--color-warning);
    text-align: center; line-height: 1.4;
}

/* Reduced Motion Compatibility */
@media (prefers-reduced-motion: reduce) {
    .lite-dialog {
        transform: none;
        transition-duration: 0.1s;
    }
    @starting-style {
        .lite-dialog[open] {
            transform: none;
        }
    }
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.dialog-header h2 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
}

.btn-close:hover {
    color: var(--color-primary);
}

.dialog-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--bg-input-inner);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-card .label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.stat-card strong {
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

.dialog-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-inline {
    display: flex;
    gap: 8px;
}

.system-simulator-controls {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.radio-group {
    display: flex;
    gap: 16px;
    margin-top: 6px;
}

.radio-lbl {
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Receipt Details */
.receipt-dialog {
    max-width: 380px;
}

.receipt-title-bar {
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
    margin-bottom: 12px;
}

.receipt-grid {
    background: var(--bg-input-inner);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
}

.receipt-row.total {
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-primary);
}

.receipt-hash-box {
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    word-break: break-all;
    background: var(--bg-input-inner);
    padding: 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

/* Live Chat Widget Box */
.chat-widget-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--color-primary);
    color: #FFFFFF;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    transition: transform var(--transition);
}

.chat-widget-toggle:hover {
    transform: scale(1.06);
}

.chat-popover-box {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 320px;
    max-width: calc(100vw - 24px); /* never exceed the viewport on any device */
    height: 380px;
    max-height: calc(100vh - 110px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 12px;
    background: var(--bg-input-inner);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

.active-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-success);
}

.btn-close-mini {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 1rem;
    cursor: pointer;
}

.chat-body {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-card);
}

.chat-bubble {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.35;
    display: flex;
    flex-direction: column;
    gap: 3px;
    /* Long content (e.g. wallet addresses) wraps instead of forcing horizontal scroll */
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-bubble p {
    margin: 0;
    min-width: 0;
}

.chat-bubble.bot {
    background: var(--bg-input-inner);
    color: var(--color-text-main);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-bubble.user {
    background: var(--color-primary);
    color: #FFFFFF;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-bubble .time {
    font-size: 0.6rem;
    align-self: flex-end;
    opacity: 0.6;
}

.chat-footer {
    display: flex;
    padding: 8px;
    border-top: 1px solid var(--border-color);
    gap: 6px;
    background: var(--bg-input-inner);
}

.chat-footer input {
    flex-grow: 1;
    min-width: 0; /* allow the input to shrink so the row never overflows */
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--color-text-main);
    outline: none;
    font-size: 0.8rem;
}

.btn-send {
    flex-shrink: 0;
    background: var(--color-primary);
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 0 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.78rem;
}

/* Floating Simulator Toolbar (Light Theme Style) */
.simulator-toolbar {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: calc(100% - 32px);
    max-width: 460px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    z-index: 999;
    overflow: hidden;
    transition: transform var(--transition);
}

.simulator-toolbar.collapsed {
    transform: translate(-50%, calc(100% - 34px));
}

.sim-header {
    background: #F8FAFC;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.sim-dot {
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    margin-right: 8px;
}

.sim-header strong {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    color: var(--color-primary);
    flex-grow: 1;
}

.btn-toggle-sim {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.7rem;
    cursor: pointer;
}

.sim-body {
    padding: 10px 16px;
}

.sim-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.sim-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-family: var(--font-sans);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.sim-btn:hover:not(:disabled) {
    background: var(--bg-app);
    border-color: #CBD5E1;
}

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

.sim-btn.fail-btn {
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--color-error);
}

.sim-btn.reset-btn {
    margin-left: auto;
}

.simulator-status-terminal {
    background: var(--bg-input-inner);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--color-text-main);
    max-height: 48px;
    overflow-y: auto;
}

/* Toast container */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slide-toast 0.25s ease forwards;
}

.toast.success { border-left: 3px solid var(--color-success); }
.toast.error { border-left: 3px solid var(--color-error); }
.toast.info { border-left: 3px solid var(--color-primary); }

@keyframes slide-toast {
    0% { transform: translateY(-20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Footer styling */
.app-footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 16px 28px;
    margin-top: 56px;
    background: var(--bg-header);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: background-color var(--transition);
}

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

/* Multi-column grid */
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
}

.footer-brand .footer-logo {
    font-size: 1.35rem;
    display: inline-block;
    margin-bottom: 10px;
}

.footer-tagline {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.55;
    max-width: 320px;
    margin-bottom: 14px;
}

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-primary-glow);
    border: 1px solid var(--color-card-border-glow);
    padding: 4px 10px;
    border-radius: 20px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-text-main);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.footer-col a {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition), transform var(--transition);
    width: fit-content;
}

.footer-col a:hover {
    color: var(--color-primary);
    transform: translateX(2px);
}

/* Supported networks strip */
.footer-networks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 14px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 18px;
}

.footer-networks-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
}

.footer-networks-list {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-main);
    font-family: var(--font-heading);
    opacity: 0.85;
}

/* Bottom bar */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copy {
    font-size: 0.74rem;
    color: var(--color-text-muted);
}

.footer-bottom-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-disclaimer {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    opacity: 0.85;
    max-width: 320px;
}

@media (max-width: 760px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px 16px;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

.btn-footer-action {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-sans);
}

.btn-footer-action:hover {
    background: var(--bg-app);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 6px var(--color-primary-glow);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .network-tabs-container {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Tighter widget padding so content never crowds the viewport edges */
    .app-container {
        padding: 16px 12px;
        gap: 18px;
    }

    .widget-card {
        padding: 18px 16px;
        border-radius: 16px;
    }

    .intro-section h1 {
        font-size: 1.45rem;
    }

    .subtitle {
        font-size: 0.84rem;
    }

    /* Header: keep logo + actions on one tidy row, no overflow */
    .header-container {
        gap: 8px;
    }

    .header-actions {
        gap: 8px;
    }

    .select-header-action {
        padding: 5px 6px;
        font-size: 0.7rem;
    }

    /* Step-header can wrap the rate badge below the title on tight screens */
    .step-header {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Chat popover must never exceed the viewport width */
    .chat-popover-box {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 76px;
    }

    .chat-widget-toggle {
        right: 16px;
        bottom: 16px;
    }

    /* Disable pointer-tilt artifacts: card stays flat on touch screens */
    .widget-card:hover {
        transform: none;
    }

    /* Receiver form stacks cleanly on narrow screens */
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Extra-small phones (≤360px) */
@media (max-width: 360px) {
    .intro-section h1 {
        font-size: 1.3rem;
    }

    .logo-text {
        font-size: 1.4rem;
    }

    .value-input {
        font-size: 1.3rem;
    }

    .partner-logo {
        padding: 7px 11px;
    }
}

/* Print styles for Receipt only */
@media print {
    @page {
        size: auto;
        margin: 10mm 15mm;
    }

    html, body {
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background-color: #FFFFFF !important;
    }

    /* Hide everything on the page */
    body > * {
        display: none !important;
    }

    /* Show only the receipt dialog */
    body > dialog#receipt-dialog {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: #FFFFFF !important;
        color: #000000 !important;
        overflow: visible !important;
        inset: auto !important;
    }

    /* Hide backdrop */
    dialog#receipt-dialog::backdrop {
        display: none !important;
        background: transparent !important;
    }

    /* Hide unnecessary receipt dialog parts when printing */
    #receipt-dialog .btn-close,
    #receipt-dialog .dialog-header,
    #receipt-dialog .dialog-footer {
        display: none !important;
    }

    /* Adjust font styling for clean print look */
    #receipt-dialog .receipt-header {
        border-bottom: 2px solid #000000 !important;
        color: #000000 !important;
    }

    #receipt-dialog .receipt-status-badge {
        background: none !important;
        border: 1px solid #000000 !important;
        color: #000000 !important;
    }

    #receipt-dialog .text-blue {
        color: #000000 !important;
    }

    #receipt-dialog .receipt-section {
        border-top: 1px dashed #000000 !important;
        color: #000000 !important;
    }

    #receipt-dialog .receipt-row-premium {
        color: #000000 !important;
    }

    #receipt-dialog .receipt-row-premium span {
        color: #000000 !important;
    }

    #receipt-dialog .receipt-total-box {
        background: none !important;
        border: 1px solid #000000 !important;
        color: #000000 !important;
    }

    #receipt-dialog .receipt-total-box span {
        color: #000000 !important;
    }

    #receipt-dialog .receipt-hash-container {
        border-top: 1px dashed #000000 !important;
    }

    #receipt-dialog .receipt-hash-box {
        border: 1px solid #000000 !important;
        background: none !important;
        color: #000000 !important;
    }

    #receipt-dialog .receipt-barcode-wrap div {
        background-color: #FFFFFF !important;
        border-color: #000000 !important;
        color: #000000 !important;
    }

    #receipt-dialog .receipt-barcode-wrap div div {
        background-color: #000000 !important;
    }

    #receipt-dialog .receipt-footer-text {
        border-top: 1px dashed #000000 !important;
        color: #000000 !important;
    }
}

/* ===================================================
   LIVE TRANSACTION FEED & MARQUEE Banner
   =================================================== */

/* Live Activity Box styling */
.live-activity-wrapper {
    width: 100%;
    margin-top: 8px;
}

.live-activity-box {
    background-color: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.activity-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.activity-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-main);
}

.active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
    display: inline-block;
}

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 48px;
    max-height: 120px;
    overflow-y: hidden;
    position: relative;
}

.activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    color: var(--color-text-main);
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--bg-input-inner);
    animation: slide-in-top 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@keyframes slide-in-top {
    0% { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 1; transform: translateY(0); }
}

.activity-item .time {
    color: var(--color-text-muted);
    font-size: 0.7rem;
    margin-left: auto;
}

.activity-item .tx-tag {
    font-family: monospace;
    color: var(--color-primary);
    font-weight: 700;
    margin-right: 4px;
}

/* Global Partners Marquee styling */
.global-partners-marquee {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    padding: 12px 0;
    margin-top: 8px;
}

.partner-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.marquee-track {
    display: flex;
    overflow: hidden;
    user-select: none;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-content {
    display: flex;
    flex-shrink: 0;
    justify-content: space-around;
    min-width: 100%;
    gap: 14px;
    animation: marquee 30s linear infinite;
    align-items: center;
}

.marquee-track:hover .marquee-content {
    animation-play-state: paused;
}

/* Real branded partner logo chips */
.partner-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    white-space: nowrap;
    transition: transform 0.25s var(--transition), box-shadow 0.25s, border-color 0.25s;
}

.partner-logo:hover {
    transform: translateY(-3px);
    border-color: var(--color-card-border-glow);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.plogo-mark {
    display: inline-flex;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.plogo-mark svg {
    width: 100%;
    height: 100%;
    display: block;
}

.plogo-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: -0.2px;
}

/* ===================================================
   RESPONSIVE DESKTOP LAYOUT GRID & OVERRIDES
   =================================================== */

.desktop-layout-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.desktop-left-column,
.desktop-right-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

@media (min-width: 992px) {
    .app-container {
        max-width: 1200px !important;
        width: 100%;
        margin: 0 auto;
        padding: 40px 24px;
    }

    .header-container {
        max-width: 1200px !important;
    }

    .footer-container {
        max-width: 1200px !important;
    }

    .desktop-layout-grid {
        display: grid;
        grid-template-columns: 460px 1fr;
        gap: 32px;
        align-items: start;
    }

    .intro-section {
        grid-column: span 2;
        text-align: left;
    }
}
