:root {
    --bg-dark: #0f172a;
    /* Slate 900 */
    --bg-panel: rgba(30, 41, 59, 0.7);
    /* Slate 800 with opacity */
    --primary-color: #6366f1;
    /* Indigo 500 */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    /* Indigo to Purple */
    --accent-cyan: #06b6d4;
    /* Cyan 500 */
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --border-color: rgba(148, 163, 184, 0.1);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --market-green: #10b981;
    --market-red: #ef4444;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    overflow-x: hidden;
    /* Subtle background grid */
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* --- Ticker --- */
.ticker-wrap {
    position: fixed;
    top: 0;
    width: 100%;
    overflow: hidden;
    height: 48px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: var(--border-color);
    line-height: 48px;
    z-index: 1000;
}

.ticker {
    display: flex;
    white-space: nowrap;
    animation: ticker 40s linear infinite;
}

.ticker-item {
    padding: 0 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticker-up {
    color: var(--market-green);
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
}

.ticker-down {
    color: var(--market-red);
    background: rgba(239, 68, 68, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* --- Auth Layout --- */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: 48px;
    position: relative;
}

/* Glowing Orbs for Background */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.4;
    animation: floatOrb 10s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-cyan);
    bottom: 10%;
    right: 40%;
    animation-delay: -5s;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

/* Left Hero */
.auth-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 30px;
    color: #a5b4fc;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
    width: fit-content;
    backdrop-filter: blur(4px);
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -2px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 540px;
    line-height: 1.6;
}

/* Right Form */
.auth-form-container {
    flex: 0 0 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 2;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border-left: var(--glass-border);
}

.auth-box {
    width: 100%;
    max-width: 400px;
}

.auth-header {
    margin-bottom: 32px;
    text-align: center;
}

.auth-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

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

/* Modern Floating Input */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-field {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-field::placeholder {
    color: transparent;
}

/* Fix Autofill Background */
.input-field:-webkit-autofill,
.input-field:-webkit-autofill:hover,
.input-field:-webkit-autofill:focus,
.input-field:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #131b2e inset !important;
    -webkit-text-fill-color: white !important;
    caret-color: white !important;
}

.password-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: var(--primary-color);
}


.input-label {
    position: absolute;
    left: 20px;
    top: 16px;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    background: transparent;
}

.input-field:focus~.input-label,
.input-field:not(:placeholder-shown)~.input-label {
    transform: translateY(-28px) translateX(-10px) scale(0.85);
    color: #a5b4fc;
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.social-btn {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: 0.3s;
    margin-bottom: 12px;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider span {
    padding: 0 15px;
}

/* --- Dashboard Layout --- */
.dashboard-container {
    display: flex;
    height: 100vh;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 24px;
    z-index: 10;
    flex-shrink: 0;
}

.sidebar-header {
    margin-bottom: 40px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: #fff;
    background: none;
    -webkit-text-fill-color: initial;
}

.sidebar-menu {
    list-style: none;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    border-radius: 12px;
    transition: all 0.3s;
    font-weight: 500;
    text-decoration: none;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(99, 102, 241, 0.1);
    color: #fff;
}

.sidebar-menu a.active i {
    color: var(--primary-color);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--market-red);
    font-weight: 500;
    margin-top: auto;
    border-radius: 12px;
    transition: 0.3s;
    text-decoration: none;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

@media (max-width: 900px) {
    .dashboard-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .sidebar {
        width: 100%;
        padding: 16px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .sidebar-header {
        margin-bottom: 0;
    }

    .sidebar-menu {
        display: none;
    }

    /* Mobile menu toggle needed later */
    .logout-btn {
        display: none;
    }
}

/* --- Top Navigation --- */
.app-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.top-nav {
    height: 60px;
    background: #131722;
    border-bottom: 1px solid #2a2e39;
    display: flex;
    align-items: center;
    padding: 0 24px;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
    z-index: 1000;
}

.nav-brand {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
    margin-right: 40px;
}

.nav-links {
    display: flex;
    gap: 24px;
    flex: 1;
}

.nav-item {
    color: #848e9c;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0 4px;
    /* Minimal side padding */
    margin: 0 12px;
    /* Spacing between items */
    height: 60px;
    /* Full header height */
    display: flex;
    align-items: center;
    position: relative;
    transition: color 0.2s;
}

.nav-item:hover {
    color: #fff;
    background: transparent;
}

.nav-item.active {
    color: #fff;
    background: transparent;
}

/* Underline Effect for Active State - REMOVED per user request */
/* .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #0ecb81;
    box-shadow: 0 -2px 8px rgba(14, 203, 129, 0.4);
} */

.nav-user {
    display: flex;
    align-items: center;
}

/* Dashboard Container Adjustment */
.dashboard-container {
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #0b0e11;
}

.main-content {
    padding: 4px;
    overflow: hidden;
}

/* Market Stats Bar */
.market-stats-bar {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 8px 16px;
    background: #131722;
    margin-bottom: 4px;
    border-radius: 2px;
}

.pair-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

/* --- Pro Dashboard Layout --- */
.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 2;
    /* Content above orbs */
}

/* Portfolio Header - Glassmorphism */
.portfolio-section {
    background: rgba(30, 41, 59, 0.6);
    /* Glass background matches auth box */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.details-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.balance-label {
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 500;
}

.balance-amount {
    font-size: 2.5rem;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 8px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.balance-usdt {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 16px;
}

.btn-action {
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Primary Gradient Button for Deposit */
.btn-deposit {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-deposit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
}

/* Glass Buttons for others */
.btn-withdraw,
.btn-transfer {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.btn-withdraw:hover,
.btn-transfer:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Assets Table - Glassmorphism */
.assets-section {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.section-header {
    padding: 20px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.asset-table {
    width: 100%;
    border-collapse: collapse;
}

.asset-table th {
    text-align: left;
    padding: 16px 32px;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.asset-table td {
    padding: 20px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 500;
}

.asset-table tr:last-child td {
    border-bottom: none;
}

.asset-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.coin-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.coin-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.coin-name {
    font-weight: 600;
    color: #fff;
}

.coin-symbol {
    color: #64748b;
    font-size: 0.85rem;
    margin-left: 4px;
}

.table-action {
    color: #a5b4fc;
    text-decoration: none;
    margin-right: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.table-action:hover {
    color: #fff;
    text-decoration: none;
}

/* Custom Scrollbar for Webkit */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #2a2e39;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #474d57;
}

/* --- Exchange Redesign (3-Column Grid) --- */
.exchange-layout {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    /* narrowed sidebars slightly */
    grid-template-rows: 40px auto minmax(400px, auto);
    /* Header, Main, Bottom (Expandable) */
    gap: 4px;
    min-height: calc(100vh - 60px);
    height: auto;
    padding: 4px;
    background: #0b0e11;
    overflow: visible;
    /* Allow scroll */
}

/* Market Bar (Ticker Strip) */
.market-bar {
    grid-column: 1 / -1;
    background: #131722;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 24px;
    border-radius: 2px;
}

/* Bottom Section */
.col-bottom {
    grid-column: 1 / -1;
    grid-row: 3;
    background: #131722;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 400px;
    /* Ensure visible area */
}

/* Columns */
.col-left {
    grid-row: 2;
    display: flex;
    flex-direction: column;
    background: #131722;
    border-radius: 2px;
    overflow: hidden;
    height: 100%;
}

.col-center {
    grid-row: 2;
    display: grid;
    grid-template-rows: 1fr auto;
    /* Chart gets 1fr, Form gets auto */
    gap: 4px;
    min-width: 0;
    overflow: hidden;
    height: 100%;
}

.col-right {
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    height: 100%;
}

/* Center components */
.chart-container-box {
    width: 100%;
    height: 100%;
    background: #131722;
    border-radius: 2px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.trade-forms-container {
    flex: 0 0 auto;
    /* Fixed height based on content */
    background: #131722;
    border-radius: 2px;
    padding: 12px;
}

/* Order Book Styling */
.ob-header {
    display: grid;
    grid-template-columns: 35% 30% 35%;
    /* Grid alignment */
    padding: 8px 12px;
    font-size: 0.75rem;
    color: #848e9c;
    border-bottom: 1px solid #2a2e39;
    font-weight: 600;
}

.ob-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.ob-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.ob-row {
    display: grid;
    grid-template-columns: 35% 30% 35%;
    /* Match header */
    padding: 2px 12px;
    cursor: pointer;
    position: relative;
    height: 18px;
    /* Compact row */
    align-items: center;
    font-size: 0.75rem;
    /* Manageable font size */
    font-family: 'Roboto Mono', monospace;
    /* Monospace for numbers */
}

.ob-row:hover {
    background: #2a2e39;
}

.ob-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ob-price-ask {
    color: #f6465d;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ob-price-bid {
    color: #0ecb81;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ob-amount {
    color: #d1d4dc;
    text-align: right;
    z-index: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ob-total {
    color: #707a8a;
    text-align: right;
    z-index: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ob-depth-bar {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    opacity: 0.15;
    z-index: 0;
}

.ob-bg-ask {
    background: #f6465d;
}

.ob-bg-bid {
    background: #0ecb81;
}

.current-price-sticky {
    padding: 8px 12px;
    border-top: 1px solid #2a2e39;
    border-bottom: 1px solid #2a2e39;
    background: #131722;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center the price */
    gap: 12px;
}

.curr-price-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0ecb81;
}

/* Trade Forms */
.form-header {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
}

/* Reduced margin */
.form-tab {
    color: #848e9c;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding-bottom: 6px;
    /* Reduced padding */
    border-bottom: 2px solid transparent;
}

.form-tab.active-buy {
    color: #0ecb81;
    border-color: #0ecb81;
}

.form-tab.active-sell {
    color: #f6465d;
    border-color: #f6465d;
}

.trade-input-row {
    background: #2a2e39;
    border-radius: 4px;
    padding: 6px 10px;
    /* Reduced padding */
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    /* Reduced margin */
    border: 1px solid transparent;
    transition: 0.2s;
}

.trade-input-row:focus-within {
    border-color: #fcd535;
}

.input-lbl {
    color: #848e9c;
    font-size: 0.8rem;
    width: 50px;
}

.trade-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    text-align: right;
    font-size: 0.9rem;
    outline: none;
}

.input-coin {
    color: #fff;
    font-size: 0.8rem;
    margin-left: 8px;
    font-weight: 600;
}

.range-slider-container {
    margin: 12px 0;
    padding: 0 4px;
}

/* Reduced margin */

/* Standard range input styling would go here, omitting for brevity */

.btn-trade-action {
    width: 100%;
    padding: 10px;
    /* Reduced padding */
    border-radius: 4px;
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    cursor: pointer;
    margin-top: 4px;
    /* Reduced margin */
}

.btn-buy-green {
    background: #0ecb81;
}

.btn-buy-green:hover {
    background: #0ebb76;
}

.btn-sell-red {
    background: #f6465d;
}

.btn-sell-red:hover {
    background: #d93d52;
}

/* Right Column Panels */
.market-trades-panel,
.pairs-panel {
    background: #131722;
    border-radius: 2px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.panel-head-sm {
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
    border-bottom: 1px solid #2a2e39;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .exchange-layout {
        display: flex;
        flex-direction: column;
        height: auto;
        overflow-y: auto;
    }

    .col-left,
    .col-center,
    .col-right {
        width: 100%;
        height: auto;
    }

    .chart-container-box {
        height: 400px;
    }

    .col-left {
        height: 600px;
        max-height: 600px;
    }
}

/* --- Global Mobile Responsiveness --- */
@media (max-width: 768px) {

    /* Auth Page (index.php) */
    .auth-wrapper {
        flex-direction: column;
        padding-top: 60px;
    }

    .auth-hero {
        padding: 40px 20px;
        text-align: center;
        align-items: center;
    }

    .hero-title {
        font-size: 3rem;
        letter-spacing: -1px;
    }

    .hero-badge {
        margin: 0 auto 24px auto;
    }

    .auth-form-container {
        flex: 1;
        width: 100%;
        border-left: none;
        border-top: var(--glass-border);
        padding: 40px 20px;
        align-items: flex-start;
    }

    .auth-box {
        margin-top: 0;
    }

    /* Top Navigation fixes */
    .top-nav {
        padding: 0 16px;
    }

    .nav-brand {
        margin-right: auto;
    }

    .user-dropdown-btn span {
        display: none;
        /* Hide username text on mobile, just show icon */
    }

    /* Dashboard fixes */
    .portfolio-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 20px;
    }

    .balance-amount {
        font-size: 2rem;
    }

    .action-buttons {
        width: 100%;
        gap: 10px;
        flex-wrap: wrap;
    }

    .btn-action {
        flex: 1;
        min-width: calc(50% - 10px);
        justify-content: center;
        padding: 10px;
    }

    .assets-section {
        overflow-x: auto;
    }

    .asset-table th,
    .asset-table td {
        padding: 12px 16px;
        white-space: nowrap;
    }

    /* Global fixes */
    .main-content {
        padding: 16px;
    }

    /* ROOT FIX: unlock fixed heights on mobile so content can scroll */
    .app-layout {
        height: auto !important;
        min-height: 100vh;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    .dashboard-container {
        height: auto !important;
        min-height: 0;
        overflow: visible !important;
    }

    /* Contain orbs within viewport */
    .orb {
        display: none;
    }
}

@media (max-width: 480px) {
    .btn-action {
        min-width: 100%;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .market-stats-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}