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

:root {
    --bg-base: #070606;
    --bg-main: #100d0b;
    --bg-card: #18120d;
    --bg-card-hover: #241811;
    --bg-nav: rgba(12, 9, 7, 0.96);
    --text-main: #f6ead5;
    --text-muted: #a68d6f;
    --accent-gold: #d6a342;
    --accent-gold-glow: rgba(214, 163, 66, 0.28);
    --accent-red: #e11d2e;
    --color-up: #d6a342;
    --color-down: #e11d2e;
    --border-color: rgba(214, 163, 66, 0.14);
    --glass-border: 1px solid rgba(214, 163, 66, 0.10);
    --bg-toast: rgba(24, 18, 13, 0.98);
    --bottom-nav-height: 64px;
    --bottom-nav-gap: 12px;
    --bottom-nav-safe-space: calc(var(--bottom-nav-height) + var(--bottom-nav-gap) + max(12px, env(safe-area-inset-bottom)));
}

/* === DARK THEME === */
[data-theme="dark"] {
    --bg-base: #070606;
    --bg-main: #100d0b;
    --bg-card: #18120d;
    --bg-card-hover: #241811;
    --bg-nav: rgba(12, 9, 7, 0.97);
    --text-main: #f6ead5;
    --text-muted: #a68d6f;
    --accent-gold: #d6a342;
    --accent-gold-glow: rgba(214, 163, 66, 0.28);
    --accent-red: #e11d2e;
    --color-up: #d6a342;
    --color-down: #e11d2e;
    --border-color: rgba(214, 163, 66, 0.16);
    --glass-border: 1px solid rgba(214, 163, 66, 0.12);
    --bg-toast: rgba(24, 18, 13, 0.98);
    --bottom-nav-height: 64px;
    --bottom-nav-gap: 12px;
    --bottom-nav-safe-space: calc(var(--bottom-nav-height) + var(--bottom-nav-gap) + max(12px, env(safe-area-inset-bottom)));
}

[data-theme="dark"] body { background-color: var(--bg-base); }
[data-theme="dark"] .form-control { background: #100d0b; border-color: rgba(255,255,255,0.1); color: var(--text-main); }
[data-theme="dark"] .form-control:focus { background: #18120d; border-color: var(--accent-gold); color: var(--text-main); }
[data-theme="dark"] .auth-container {
    padding: 40px 24px;
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-main);
    overflow-y: auto;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.3;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    font-size: 13px; /* Reduced from 14px */
    height: 100vh;
    height: 100dvh;
}

#app {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-base);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d8bf8f; border-radius: 4px; }

.view-container {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0; left: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.scroll-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: calc(var(--bottom-nav-safe-space) + 16px);
    scrollbar-width: none;
}
.scroll-content::-webkit-scrollbar { display: none; }

.view-container.no-nav {
    padding-bottom: 0;
}

/* --- Typography & Utilities --- */
.text-green { color: var(--color-up) !important; font-weight: 700; }
.text-red { color: var(--color-down) !important; font-weight: 700; }
.text-main { color: var(--accent-gold) !important; }

.bg-green { 
    background: rgba(214, 163, 66, 0.1) !important; 
    color: var(--color-up) !important; 
    font-weight: 700;
}
.bg-red { 
    background: rgba(225, 29, 46, 0.1) !important; 
    color: var(--color-down) !important; 
    font-weight: 700;
}
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; letter-spacing: 0.2px; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

/* --- Top Header --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-nav);
    backdrop-filter: blur(10px);
    border-bottom: var(--border-color);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-back { 
    font-size: 1.1rem; 
    cursor: pointer; 
    color: var(--text-main); 
    padding: 8px;
    background: var(--bg-card-hover);
    border-radius: 12px;
    transition: all 0.2s;
}
.header-back:hover { background: #3b2a18; }

/* --- Floating Bottom Nav Bar --- */
.bottom-nav {
    position: fixed;
    bottom: max(var(--bottom-nav-gap), env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 476px;
    height: var(--bottom-nav-height);
    background: var(--bg-nav);
    backdrop-filter: blur(15px);
    border: var(--glass-border);
    border-radius: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
    padding: 8px 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item.active {
    color: var(--accent-gold);
    transform: translateY(-2px);
}

.nav-item.active .nav-icon {
    color: var(--accent-gold);
    transform: scale(1.05);
}

.nav-icon {
    font-size: 1.1rem;
    margin-bottom: 2px;
    transition: all 0.3s;
}

/* --- Glass Cards --- */
.glass-card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s;
}

/* --- Home View --- */
.home-banner {
    background: linear-gradient(135deg, #070606 0%, #1a1009 42%, #6f1414 100%);
    color: #f6ead5;
    padding: 18px 20px;
    position: relative;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    border: 1px solid rgba(214, 163, 66, 0.28);
    border-top: 0;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 34px rgba(214, 163, 66, 0.18);
}

.banner-logo-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.banner-logo {
    width: 86px;
    height: 86px;
    flex: 0 0 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-right: 0;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(214, 163, 66, 0.45);
    background: #070606;
    box-shadow: 0 8px 20px rgba(214, 163, 66, 0.3);
}

/* Custom SVG-style Logo based on User Image */
.tech-logo-svg {
    width: 86px;
    height: 86px;
    filter: drop-shadow(0 0 12px rgba(214, 163, 66, 0.55));
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    border: none;
    background: #070606;
    display: block;
    flex-shrink: 0;
}

.banner-text h2 { 
    font-size: 1.15rem; /* Reduced from 1.3rem */
    margin-bottom: 2px; 
    font-weight: 800; 
    letter-spacing: 0.3px;
    color: #fff;
}
.banner-text p { 
    font-size: 0.75rem; /* Reduced from 0.8rem */
    font-weight: 500; 
    opacity: 0.85; 
}

.announcement-bar {
    background: rgba(15, 10, 7, 0.92);
    backdrop-filter: blur(8px);
    margin: 0 15px 15px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(214, 163, 66, 0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    color: var(--accent-gold);
    font-size: 0.78rem;
    font-weight: 600;
}

.announcement-bar i {
    font-size: 1rem;
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(214, 163, 66, 0.45);
}

.marquee-container {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
}

@keyframes marquee {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* --- Guide Cards Section --- */
.guide-section {
    display: flex;
    gap: 8px; /* Reduced gap */
    padding: 0 15px 15px; /* Reduced padding */
}

.guide-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px; /* Reduced gap */
    padding: 12px 8px; /* Reduced padding */
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.guide-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.06);
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 20px;
}
.guide-box:active::after { opacity: 1; }
.guide-box:active { transform: scale(0.96); }

.guide-box-primary {
    background: linear-gradient(135deg, #d6a342 0%, #b81418 100%);
    box-shadow: 0 8px 24px rgba(214, 163, 66, 0.32);
}

.guide-box-secondary {
    background: linear-gradient(135deg, #1a1009 0%, #7f1d1d 100%);
    border-color: rgba(214, 163, 66, 0.18);
    box-shadow: 0 8px 24px rgba(225, 29, 46, 0.20);
}

.guide-box-tertiary {
    background: linear-gradient(135deg, #d6a342 0%, #9a6a1f 100%);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.guide-box h4 {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f6ead5;
    text-align: center;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.guide-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #f6ead5;
    backdrop-filter: blur(4px);
}

/* --- Invite Banner --- */
.invite-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #120c07 0%, #24160b 58%, #3a1111 100%);
    margin: 0 20px 20px;
    padding: 16px 20px;
    border-radius: 18px;
    border: 1px solid rgba(214, 163, 66, 0.18);
    color: #f6ead5;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0,0,0,0.32);
    transition: all 0.2s;
}
.invite-banner:active { transform: scale(0.98); }

/* --- Market Section --- */
.market-section {
    padding: 0 0 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 22px;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 14px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 16px;
    background: var(--accent-gold);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-gold);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(214, 163, 66, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(214, 163, 66, 0.2);
}

.live-indicator span {
    font-size: 0.6rem;
    font-weight: 800;
    color: #d6a342;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.live-dot {
    width: 5px; height: 5px;
    background: #d6a342;
    border-radius: 50%;
    box-shadow: 0 0 8px #d6a342;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

/* --- Home Coins --- */
.coin-list { 
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.coin-item {
    background: linear-gradient(165deg, #17100b 0%, #0a0705 100%);
    position: relative;
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(214, 163, 66, 0.24);
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42), inset 0 1px 1px rgba(255,255,255,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Digital Grid Pattern Background */
.coin-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(circle at 2px 2px, rgba(255,255,255,0.03) 1px, transparent 0);
    background-size: 12px 12px;
    pointer-events: none;
}

/* Holographic Glint / Sweep Animation */
.coin-item::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(255, 255, 255, 0.03) 48%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 52%,
        transparent 55%
    );
    transform: rotate(25deg);
    animation: techSweep 4s infinite linear;
    pointer-events: none;
}

@keyframes techSweep {
    0% { transform: translateX(-100%) rotate(25deg); }
    100% { transform: translateX(100%) rotate(25deg); }
}

.coin-item:active {
    transform: scale(0.96);
    border-color: var(--accent-gold);
    box-shadow: 0 0 20px rgba(214, 163, 66, 0.32);
}

.coin-name-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.coin-icon-box {
    width: 38px;
    height: 38px;
    background: rgba(214, 163, 66, 0.10);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(214, 163, 66, 0.16);
    box-shadow: 0 4px 10px rgba(0,0,0,0.28);
}

.coin-item .coin-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: #fff;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.coin-item .coin-pair {
    color: rgba(189, 167, 125, 0.58);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 4px; /* Space between name and pair */
}

.sync-dot {
    width: 6px;
    height: 6px;
    background: #d6a342;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    box-shadow: 0 0 8px #d6a342;
    animation: syncPulse 1.5s infinite;
}

@keyframes syncPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.coin-data-right {
    text-align: right;
    z-index: 2;
}

.coin-item .coin-price {
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
    font-family: 'JetBrains Mono', 'Fira Code', monospace; /* Modern tech font */
    letter-spacing: -0.5px;
    text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.coin-item .coin-change {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.78rem;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.bg-neon-up { 
    background: rgba(214, 163, 66, 0.15) !important; 
    color: #d6a342 !important; 
    border: 1px solid rgba(214, 163, 66, 0.3) !important;
}
.bg-neon-down { 
    background: rgba(225, 29, 46, 0.15) !important; 
    color: #e11d2e !important; 
    border: 1px solid rgba(225, 29, 46, 0.3) !important;
}

/* =========================================
   TRADE VIEW — TECHY REDESIGN
   ========================================= */

.trade-view-wrap {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    padding-bottom: 0 !important;
    background: var(--bg-main);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

/* --- Top Bar --- */
.trade-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 50;
}
.trade-back {
    font-size: 1rem;
    color: var(--text-main);
    background: var(--bg-card);
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.trade-back:hover { background: var(--bg-card-hover); }
.trade-topbar-center {
    display: flex; align-items: center; gap: 7px;
}
.trade-topbar-title {
    font-size: 0.95rem; font-weight: 800; color: var(--text-main); letter-spacing: 0.3px;
}
.trade-live-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #d6a342;
    box-shadow: 0 0 6px rgba(214,163,66,0.8);
    animation: livePulse 1.5s infinite;
}
@keyframes livePulse {
    0%,100% { box-shadow: 0 0 4px rgba(214,163,66,0.8); }
    50% { box-shadow: 0 0 12px rgba(214,163,66,1); }
}
.trade-live-label {
    font-size: 0.65rem; font-weight: 800; color: #d6a342; letter-spacing: 1px;
}
.trade-rule-btn {
    font-size: 0.75rem; font-weight: 700;
    color: var(--accent-gold);
    background: rgba(214,163,66,0.12);
    padding: 6px 12px; border-radius: 16px;
    cursor: pointer; transition: all 0.2s;
    border: 1px solid rgba(214,163,66,0.22);
}
.trade-rule-btn:hover { background: rgba(214,163,66,0.22); }

/* --- Price Row --- */
.trade-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 18px 10px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}
.trade-pair-label {
    font-size: 1.2rem; font-weight: 900; color: var(--text-main); letter-spacing: -0.5px;
}
.trade-pair-label span { color: var(--text-muted); font-weight: 600; font-size: 0.9rem; }
.trade-price-sub {
    display: flex; flex-direction: column; gap: 4px; margin-top: 6px;
}
.trade-info-chip {
    font-size: 0.7rem; font-weight: 600; color: var(--text-muted);
    display: flex; align-items: center; gap: 2px;
}
.trade-price-right { text-align: right; }
.trade-big-price {
    font-size: 1.5rem; font-weight: 900; letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s;
}
.settle-badge {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 5px; padding: 4px 10px; border-radius: 16px;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.3px;
}
.settle-up { background: rgba(214,163,66,0.12); color: #d6a342; border: 1px solid rgba(214,163,66,0.25); }
.settle-down { background: rgba(225,29,46,0.12); color: #e11d2e; border: 1px solid rgba(225,29,46,0.25); }

/* --- Timeframe Tabs --- */
.timeframe-tabs {
    display: flex;
    padding: 10px 14px;
    gap: 7px;
    overflow-x: auto;
    background: var(--bg-main);
    scrollbar-width: none;
}
.timeframe-tabs::-webkit-scrollbar { display: none; }
.time-tab {
    padding: 6px 14px;
    font-size: 0.75rem; font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer; transition: all 0.2s;
    white-space: nowrap;
}
.time-tab.active {
    background: var(--accent-gold);
    color: #fff;
    border-color: var(--accent-gold);
    box-shadow: 0 4px 12px var(--accent-gold-glow);
}

/* --- Chart --- */
.chart-area {
    flex: 1;
    min-height: 200px;
    background: var(--bg-main);
}

/* --- Stats Bar --- */
.trade-stats-bar {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 16px;
    gap: 10px;
}
.trade-stat-item {
    flex: 1;
    display: flex; flex-direction: column; gap: 3px;
}
.trade-stat-label {
    font-size: 0.65rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px;
    display: flex; align-items: center; gap: 4px;
}
.trade-stat-value {
    font-size: 0.85rem; font-weight: 800; color: var(--text-main);
    font-variant-numeric: tabular-nums;
}
.period-id {
    font-size: 0.7rem !important; font-family: 'Courier New', monospace;
    color: var(--accent-gold) !important;
    letter-spacing: 0.5px;
}
.trade-stat-divider {
    width: 1px; height: 32px;
    background: var(--border-color);
    flex-shrink: 0;
}
.trade-countdown { font-size: 1rem !important; font-weight: 900 !important; }
.countdown-safe  { color: #d6a342 !important; }
.countdown-danger { color: #e11d2e !important; animation: blinkDanger 0.6s infinite; }
@keyframes blinkDanger {
    0%,100% { opacity: 1; } 50% { opacity: 0.4; }
}

/* --- UP / DOWN Action Buttons --- */
.trade-action-row {
    display: flex;
    gap: 10px;
    padding: 10px 16px calc(max(18px, env(safe-area-inset-bottom)) + 10px);
    background: var(--bg-main);
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
}
.trade-btn {
    flex: 1;
    min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px;
    min-height: 64px;
    padding: 10px 8px;
    border-radius: 16px;
    border: none; cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    position: relative; overflow: hidden;
}
.trade-btn::before {
    content: '';
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.08);
    opacity: 0; transition: opacity 0.2s;
}
.trade-btn:active::before { opacity: 1; }
.trade-btn:active { transform: scale(0.96); }
.trade-btn-up {
    background: linear-gradient(145deg, #8a5a1c, #d6a342);
    box-shadow: 0 8px 24px rgba(214,163,66,0.35);
}
.trade-btn-down {
    background: linear-gradient(145deg, #9f1118, #e11d2e);
    box-shadow: 0 8px 24px rgba(225,29,46,0.35);
}
.trade-btn.locked {
    opacity: 0.35; cursor: not-allowed;
    filter: grayscale(50%);
    transform: none !important;
}
.trade-btn-icon { font-size: 1.1rem; color: #fff; }
.trade-btn-label { font-size: 0.95rem; font-weight: 900; color: #fff; letter-spacing: 1px; }
.trade-btn-ratio { font-size: 0.7rem; font-weight: 600; color: rgba(255,255,255,0.75); }

/* =========================================
   LOCKOUT OVERLAY
   ========================================= */
.lockout-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    z-index: 1800;
    display: flex; align-items: center; justify-content: center;
}
.lockout-card {
    background: linear-gradient(145deg, #070606, #3a1111);
    border: 2px solid rgba(225,29,46,0.5);
    border-radius: 24px;
    padding: 30px 40px;
    text-align: center;
    box-shadow: 0 0 60px rgba(225,29,46,0.25);
    animation: lockPop 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
}
@keyframes lockPop {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.lockout-ring {
    width: 80px; height: 80px; border-radius: 50%;
    border: 4px solid #e11d2e;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 0 30px rgba(225,29,46,0.4), inset 0 0 20px rgba(225,29,46,0.1);
    animation: lockRingPulse 0.6s infinite alternate;
}
@keyframes lockRingPulse {
    from { box-shadow: 0 0 20px rgba(225,29,46,0.4); }
    to   { box-shadow: 0 0 40px rgba(225,29,46,0.7); }
}
.lockout-num {
    font-size: 2.5rem; font-weight: 900; color: #e11d2e;
    font-variant-numeric: tabular-nums;
}
.lockout-title {
    font-size: 1rem; font-weight: 800; color: #fbbf24; margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.lockout-sub {
    font-size: 0.75rem; color: rgba(255,255,255,0.5); font-weight: 500;
}

/* =========================================
   WIN / LOSS POPUP
   ========================================= */
.result-popup {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    background: linear-gradient(145deg, #070606 0%, #1a1009 100%);
    border-radius: 24px;
    padding: 30px 20px 24px;
    text-align: center;
    z-index: 2000;
    cursor: pointer;
    animation: popIn 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    overflow: hidden;
}
.popup-won {
    border: 2px solid rgba(214,163,66,0.5);
    box-shadow: 0 0 60px rgba(214,163,66,0.2), 0 20px 50px rgba(0,0,0,0.6);
}
.popup-lost {
    border: 2px solid rgba(225,29,46,0.5);
    box-shadow: 0 0 60px rgba(225,29,46,0.2), 0 20px 50px rgba(0,0,0,0.6);
}
.popup-glow {
    position: absolute; top: -60px; left: 50%;
    transform: translateX(-50%);
    width: 180px; height: 180px; border-radius: 50%;
    pointer-events: none;
}
.popup-won .popup-glow { background: radial-gradient(circle, rgba(214,163,66,0.15) 0%, transparent 70%); }
.popup-lost .popup-glow { background: radial-gradient(circle, rgba(225,29,46,0.15) 0%, transparent 70%); }
.popup-icon { font-size: 2.5rem; z-index: 1; }
.popup-won .popup-icon { color: #d6a342; text-shadow: 0 0 30px rgba(214,163,66,0.6); }
.popup-lost .popup-icon { color: #e11d2e; text-shadow: 0 0 30px rgba(225,29,46,0.6); }
.popup-title { font-size: 1.3rem; font-weight: 900; color: #fff; letter-spacing: 0.3px; }
.popup-details {
    width: 100%; background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px; padding: 12px 14px;
    display: flex; flex-direction: column; gap: 6px;
}
.popup-detail-row {
    display: flex; justify-content: space-between;
    font-size: 0.8rem; color: rgba(255,255,255,0.55);
}
.popup-detail-row span:last-child { font-weight: 700; color: #3b2a18; }
.popup-amount { font-size: 1.7rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.popup-tap { font-size: 0.7rem; color: rgba(255,255,255,0.3); font-weight: 500; }
@keyframes popIn {
    0% { transform: translate(-50%, -40%) scale(0.75); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* =========================================
   TRADE EXECUTION MODAL
   ========================================= */
.trade-exec-modal {
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-main) 100%);
    width: 100%;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 24px 20px 30px;
    animation: slideUp 0.35s cubic-bezier(0.16,1,0.3,1);
    border-top: 1px solid var(--border-color);
}
.exec-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}
.exec-pair { font-size: 1.1rem; font-weight: 900; color: var(--text-main); }
.exec-period {
    font-size: 0.7rem; font-family: 'Courier New', monospace;
    color: var(--accent-gold); margin-top: 4px; font-weight: 700;
}
.exec-countdown {
    font-size: 1.2rem; font-weight: 900;
    font-variant-numeric: tabular-nums; text-align: right;
}
.exec-direction-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 16px;
    font-size: 0.75rem; font-weight: 800;
    margin-top: 5px; letter-spacing: 0.5px;
}
.badge-up { background: rgba(214,163,66,0.15); color: #d6a342; border: 1px solid rgba(214,163,66,0.3); }
.badge-down { background: rgba(225,29,46,0.15); color: #e11d2e; border: 1px solid rgba(225,29,46,0.3); }
.exec-balance-row {
    display: flex; align-items: center; gap: 10px;
    background: rgba(214,163,66,0.10);
    border: 1px solid rgba(214,163,66,0.18);
    border-radius: 10px; padding: 10px 14px;
    font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px;
}
.exec-balance-row strong { color: var(--text-main); }
.exec-input-wrap { margin-bottom: 14px; }
.exec-input-label {
    font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.exec-input {
    width: 100%;
    max-width: 100%;
    padding: 14px 18px;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-main);
    font-size: 1.4rem; font-weight: 800;
    text-align: center;
    outline: none; transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
    font-variant-numeric: tabular-nums;
    display: block;
}
.exec-input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px var(--accent-gold-glow);
}
.exec-quick-amounts {
    display: flex; gap: 6px; margin-top: 8px;
}
.exec-quick-amounts button {
    flex: 1; padding: 8px 0;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 8px; font-size: 0.75rem; font-weight: 700;
    color: var(--text-muted); cursor: pointer; transition: all 0.2s;
}
.exec-quick-amounts button:hover, .exec-quick-amounts button:active {
    background: var(--accent-gold); color: #fff; border-color: var(--accent-gold);
}
.exec-summary {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px; padding: 12px 14px;
    margin-bottom: 16px;
    display: flex; flex-direction: column; gap: 6px;
}
.exec-summary-row {
    display: flex; justify-content: space-between;
    font-size: 0.85rem; color: var(--text-muted); font-weight: 500;
}
.exec-summary-row span:last-child { font-weight: 700; color: var(--text-main); }
.exec-actions { display: flex; gap: 10px; }
.exec-btn-cancel {
    flex: 1; padding: 14px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 14px; font-size: 0.95rem; font-weight: 700;
    color: var(--text-muted); cursor: pointer; transition: all 0.2s;
}
.exec-btn-cancel:active { transform: scale(0.96); }
.exec-btn-confirm {
    flex: 2; padding: 14px;
    border: none; border-radius: 14px;
    font-size: 1rem; font-weight: 800; color: #fff;
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    letter-spacing: 0.5px;
}
.exec-btn-confirm:active { transform: scale(0.96); }
.confirm-up {
    background: linear-gradient(135deg, #8a5a1c, #d6a342);
    box-shadow: 0 8px 20px rgba(214,163,66,0.35);
}
.confirm-down {
    background: linear-gradient(135deg, #9f1118, #e11d2e);
    box-shadow: 0 8px 20px rgba(225,29,46,0.35);
}






/* --- My Profile View --- */
.profile-header {
    display: flex;
    align-items: center;
    padding: 30px 25px;
    background: var(--bg-main);
    gap: 20px;
}
.avatar {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    background: linear-gradient(135deg, #25180c 0%, #4b1a10 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent-gold);
    box-shadow: 0 8px 20px rgba(214, 163, 66, 0.18);
}
.profile-info h3 { font-size: 1.4rem; margin-bottom: 4px; font-weight: 800; color: var(--text-main); }
.profile-info p { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }

.assets-card {
    background: linear-gradient(135deg, #17100b 0%, #070606 100%);
    margin: 0 20px 25px;
    padding: 30px;
    border-radius: 25px;
    border: 1px solid rgba(214, 163, 66, 0.16);
    box-shadow: 0 15px 35px rgba(0,0,0,0.32);
    position: relative;
    overflow: hidden;
}
.assets-card::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.assets-card .label { color: #bda77d; font-size: 0.9rem; font-weight: 500; margin-bottom: 8px; }
.assets-card .amount { font-size: 2.5rem; font-weight: 800; margin-bottom: 25px; color: #f6ead5; }
.assets-actions { display: flex; gap: 15px; position: relative; z-index: 2;}

.btn-recharge, .btn-withdraw {
    flex: 1;
    padding: 14px;
    text-align: center;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-recharge { background: var(--accent-gold); color: #f6ead5; border: none; box-shadow: 0 6px 15px var(--accent-gold-glow); }
.btn-recharge:active { transform: scale(0.96); }
.btn-withdraw { background: rgba(255,255,255,0.1); color: #f6ead5; border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(5px);}
.btn-withdraw:active { background: rgba(255,255,255,0.15); }

.menu-list { 
    margin: 0 20px 20px; 
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 18px;
    color: var(--text-main);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    transition: all 0.2s;
}
.menu-item:hover { 
    background: var(--bg-card-hover); 
    transform: translateX(4px);
}
.menu-item i:not(.fa-chevron-right) {
    width: 34px;
    height: 34px;
    background: rgba(214, 163, 66, 0.12);
    border: 1px solid rgba(214, 163, 66, 0.16);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--accent-gold);
    font-size: 1rem;
}
.menu-item .fa-chevron-right { color: #d8bf8f; font-size: 0.9rem;}

/* --- Auth Pages --- */
.auth-container {
    padding: 40px 24px;
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-main);
    overflow-y: auto;
    overflow-x: hidden;
}
.auth-logo {
    text-align: center;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-gold);
    letter-spacing: 0;
}
.auth-logo-box {
    width: 130px;
    height: 130px;
    border-radius: 28px;
    border: 2px solid rgba(214, 163, 66, 0.5);
    background: #060404;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 22px rgba(214, 163, 66, 0.22);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 0;
    border: none;
    background: transparent;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; }
.form-control {
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
    background: #100d0b;
    border: 1px solid #3b2a18;
    color: var(--text-main);
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    transition: all 0.2s;
    display: block;
}
.form-control:focus { 
    border-color: var(--accent-gold); 
    background: #18120d;
    box-shadow: 0 0 0 3px var(--accent-gold-glow);
    color: var(--text-main);
}
.btn-primary {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    background: var(--accent-gold);
    color: #0a0705;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    margin-top: 12px;
    box-shadow: 0 8px 20px var(--accent-gold-glow);
    transition: all 0.2s;
    display: block;
}
.btn-primary:active { transform: scale(0.98); }
.auth-links { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.auth-links a { color: var(--accent-gold); text-decoration: none; font-weight: 700; cursor: pointer; }

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 50%; 
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    height: 100%;
    background: rgba(12, 8, 5, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
}
.modal-bottom {
    background: var(--bg-card);
    width: 100%;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    padding: 30px 25px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-weight: 800;
    color: var(--text-main);
    font-size: 1.25rem;
}
.modal-close { cursor: pointer; color: var(--text-muted); font-size: 1.5rem; transition: color 0.2s;}
.modal-close:hover { color: var(--text-main); }
.modal-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}
.modal-input {
    width: 100%;
    padding: 18px;
    border: 2px solid #3b2a18;
    background: #100d0b;
    color: var(--text-main);
    border-radius: 16px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    outline: none;
    transition: all 0.2s;
    margin-bottom: 25px;
}
.modal-input:focus { border-color: var(--accent-gold); box-shadow: 0 0 0 4px var(--accent-gold-glow); }
.modal-actions { display: flex; gap: 15px; }
.btn-modal { flex: 1; padding: 16px; border: none; border-radius: 14px; font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: all 0.2s;}
.btn-modal:active { transform: scale(0.96); }
.btn-clear { background: #241811; color: var(--text-muted); }
.btn-confirm { background: var(--accent-gold); color: #f6ead5; box-shadow: 0 6px 15px var(--accent-gold-glow);}

/* History Modal / Page */
.history-item {
    background: var(--bg-card);
    padding: 18px 20px;
    margin-bottom: 12px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    border: var(--glass-border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.hist-col { display: flex; flex-direction: column; gap: 6px; }
.hist-pair { font-weight: 800; font-size: 1.1rem; color: var(--text-main); }
.hist-time { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.hist-amount { font-size: 1.15rem; font-weight: 700;}
.hist-status { font-weight: 700; font-size: 0.85rem; text-align: right; text-transform: uppercase; }

/* --- Techy Toast Notifications --- */
.toast-container {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 90%;
    max-width: 360px;
}

.toast {
    background: var(--bg-toast);
    border: 1px solid #3b2a18;
    color: var(--text-main);
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-icon { font-size: 1.3rem; }
.toast.error .toast-icon { color: var(--color-down); }
.toast.success .toast-icon { color: var(--color-up); }
.toast.info .toast-icon { color: var(--accent-gold); }

.toast-content { flex: 1; font-size: 0.95rem; font-weight: 600; }

@keyframes toastSlideIn {
    from { transform: translateY(-100%) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

[v-cloak] { display: none; }
