:root {
    --primary-pink: #ff2d55;
    --primary-pink-light: #ff6b8a;
    --primary-cyan: #00d4ff;
    --primary-cyan-light: #4facfe;
    --primary-purple: #7c3aed;
    --primary-purple-light: #a855f7;
    --bg-dark: #0a0a14;
    --bg-card: rgba(20, 15, 35, 0.7);
    --white: #FFFFFF;
    --black: #0a0a14;
    --gray-light: rgba(255, 255, 255, 0.12);
    --gray: #a0a0a0;
    --card-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 16px 48px rgba(139, 92, 246, 0.2);
    --border-radius: 20px;
    --transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    /* ── Theme system ─── */
    --t-p1: 139, 92, 246;
    --t-p2: 34, 211, 238;
    --t-bg1: rgba(139, 92, 246, 0.13);
    --t-bg2: rgba(99, 102, 241, 0.10);
    --t-bg3: rgba(34, 211, 238, 0.055);
    --t-bg4: rgba(168, 85, 247, 0.065);
    --t-base1: #07070f;
    --t-base2: #0c0918;
    --t-btn-from: #7c3aed;
    --t-btn-to: #6d28d9;
    --t-card-border: rgba(139, 92, 246, 0.18);
    --t-glow: rgba(139, 92, 246, 0.35);
    --logo-hue: 0deg;
}

/* ── Themes ─────────────────────────────────────────────────── */
[data-theme="ocean"] {
    --t-p1: 14, 165, 233;
    --t-p2: 6, 182, 212;
    --t-bg1: rgba(14, 165, 233, 0.13);
    --t-bg2: rgba(6, 182, 212, 0.10);
    --t-bg3: rgba(56, 189, 248, 0.055);
    --t-bg4: rgba(14, 165, 233, 0.065);
    --t-base1: #050810;
    --t-base2: #080f1c;
    --t-btn-from: #0369a1;
    --t-btn-to: #0284c7;
    --t-card-border: rgba(14, 165, 233, 0.18);
    --t-glow: rgba(14, 165, 233, 0.35);
    --logo-hue: -45deg;
}

[data-theme="emerald"] {
    --t-p1: 16, 185, 129;
    --t-p2: 52, 211, 153;
    --t-bg1: rgba(16, 185, 129, 0.11);
    --t-bg2: rgba(52, 211, 153, 0.09);
    --t-bg3: rgba(52, 211, 153, 0.05);
    --t-bg4: rgba(16, 185, 129, 0.06);
    --t-base1: #050f0c;
    --t-base2: #071a14;
    --t-btn-from: #059669;
    --t-btn-to: #047857;
    --t-card-border: rgba(16, 185, 129, 0.18);
    --t-glow: rgba(16, 185, 129, 0.35);
    --logo-hue: 90deg;
}

[data-theme="rose"] {
    --t-p1: 244, 63, 94;
    --t-p2: 251, 146, 60;
    --t-bg1: rgba(244, 63, 94, 0.12);
    --t-bg2: rgba(251, 146, 60, 0.09);
    --t-bg3: rgba(244, 63, 94, 0.05);
    --t-bg4: rgba(251, 146, 60, 0.065);
    --t-base1: #0f0506;
    --t-base2: #1c0709;
    --t-btn-from: #be123c;
    --t-btn-to: #9f1239;
    --t-card-border: rgba(244, 63, 94, 0.18);
    --t-glow: rgba(244, 63, 94, 0.35);
    --logo-hue: 165deg;
}

html {
    transition: filter 0.55s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

button, a, .nav-btn, .menu-btn, .card, .tab-btn {
    -webkit-tap-highlight-color: transparent;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: 
        radial-gradient(ellipse at 25% 0%, var(--t-bg1) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 100%, var(--t-bg2) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 25%, var(--t-bg3) 0%, transparent 45%),
        radial-gradient(ellipse at 20% 70%, var(--t-bg4) 0%, transparent 45%),
        linear-gradient(160deg, var(--t-base1) 0%, var(--t-base2) 40%, var(--t-base1) 70%, var(--t-base1) 100%);
    background-attachment: fixed;
    transition: background 0.6s ease;
    min-height: 100vh;
    color: var(--white);
    overflow-x: hidden;
}

body {
    padding-bottom: 80px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='1' fill='%23ffffff' fill-opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.board-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0.03;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 49px, rgba(255, 45, 85, 0.2) 49px, rgba(255, 45, 85, 0.2) 51px),
        repeating-linear-gradient(90deg, transparent, transparent 49px, rgba(0, 212, 255, 0.2) 49px, rgba(0, 212, 255, 0.2) 51px);
    background-size: 50px 50px;
    z-index: 0;
}

.app-container {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 120px;
}

@media (min-width: 768px) {
    .app-container {
        max-width: 960px;
        padding: 24px 32px;
        padding-bottom: 60px;
    }
}

@media (min-width: 1200px) {
    .app-container {
        max-width: 1100px;
        padding: 32px 48px;
        padding-bottom: 60px;
    }
}

@media (max-width: 380px) {
    .app-container {
        padding: 12px;
        padding-bottom: 110px;
    }
}

.header {
    text-align: center;
    padding: 20px 16px;
    margin-bottom: 24px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.logo-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: auto;
    margin: 0 auto 16px;
}

.logo-container::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: radial-gradient(ellipse, rgba(var(--t-p1), 0.28) 0%, transparent 70%);
    opacity: 0.7;
    animation: glowPulse 3s ease-in-out infinite;
    pointer-events: none;
    will-change: opacity;
    transition: background 0.5s ease;
}

.logo-svg {
    width: 220px;
    height: auto;
    animation: logoFloat 4s ease-in-out infinite;
    will-change: transform;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(255, 45, 85, 0.4);
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--white) 0%, var(--primary-cyan) 50%, var(--primary-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: 1px;
}

.logo-text span {
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.card {
    background: rgba(15, 10, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 45, 85, 0.5), rgba(0, 212, 255, 0.5), transparent);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: rgba(255, 45, 85, 0.2);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.card-icon.gold { background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple)); }
.card-icon.green { background: linear-gradient(135deg, #10b981, #34d399); }
.card-icon.purple { background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-light)); }
.card-icon.red { background: linear-gradient(135deg, var(--primary-pink), #ff6b8a); }
.card-icon.blue { background: linear-gradient(135deg, var(--primary-cyan), var(--primary-cyan-light)); }

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
}

.rates-grid {
    display: grid;
    gap: 12px;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.rate-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 45, 85, 0.2);
}

.rate-crypto {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crypto-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background-size: 115%;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
}

.crypto-icon.btc { 
    background-image: url('/static/images/btc-icon.jpg');
    box-shadow: 0 0 8px rgba(247, 147, 26, 0.7), 0 0 16px rgba(247, 147, 26, 0.4);
    animation: cryptoFloat 3s ease-in-out infinite;
}

.crypto-icon.xmr { 
    background-image: url('/static/images/xmr-icon.jpg');
    box-shadow: 0 0 8px rgba(255, 102, 0, 0.7), 0 0 16px rgba(255, 102, 0, 0.4);
    animation: cryptoFloat 3s ease-in-out infinite 0.5s;
}

.crypto-icon.usdt { 
    background-image: url('/static/images/usdt-icon.jpg');
    box-shadow: 0 0 8px rgba(38, 161, 123, 0.7), 0 0 16px rgba(38, 161, 123, 0.4);
    animation: cryptoFloat 3s ease-in-out infinite 1s;
}

@keyframes cryptoFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-2px) scale(1.03); }
}

@keyframes cryptoPulse {
    0%, 100% { opacity: 0; transform: scale(0.9); }
    50% { opacity: 0.5; transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
    .crypto-icon, .crypto-icon.btc, .crypto-icon.xmr, .crypto-icon.usdt {
        animation: none;
    }
    .crypto-icon::before {
        animation: none;
        opacity: 0;
    }
}

.rate-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px 12px;
    background: rgba(15, 10, 30, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.4s ease;
}

.menu-btn:hover::before {
    left: 100%;
}

.menu-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(255, 45, 85, 0.2);
    border-color: rgba(255, 45, 85, 0.3);
}

.menu-btn:active {
    transform: translateY(-2px);
}

.menu-btn-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.menu-btn-icon.buy { background: linear-gradient(135deg, #10b981, #34d399); color: white; }
.menu-btn-icon.sell { background: linear-gradient(135deg, var(--primary-pink), #ff6b8a); color: white; }
.menu-btn-icon.orders { background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-light)); color: white; }
.menu-btn-icon.profile { background: linear-gradient(135deg, var(--primary-cyan), var(--primary-cyan-light)); color: white; }
.menu-btn-icon.info { background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple)); color: white; }
.menu-btn-icon.admin { background: linear-gradient(135deg, #ff6b6b, #ee5a5a); color: white; }

.menu-btn-text {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.property-card {
    position: relative;
    overflow: hidden;
}

.property-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-pink), var(--primary-cyan));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.property-card.btc::before { background: linear-gradient(90deg, #F7931A, #FF9500); }
.property-card.xmr::before { background: linear-gradient(90deg, #FF6600, #FF8C00); }
.property-card.usdt::before { background: linear-gradient(90deg, #26A17B, #50C878); }

.bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: rgba(15, 10, 30, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    justify-content: space-around;
    padding: 12px 8px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
    z-index: 100;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
    border-radius: 16px;
    min-width: 60px;
}

.nav-btn .nav-icon {
    width: 28px;
    height: 28px;
    transition: var(--transition);
    opacity: 0.5;
}

.nav-btn span {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}

.nav-btn.active {
    background: linear-gradient(135deg, rgba(255, 45, 85, 0.2), rgba(0, 212, 255, 0.1));
    transform: translateY(-2px);
}

.nav-btn.active .nav-icon {
    transform: scale(1.15);
    opacity: 1;
}

.nav-btn.active span {
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.nav-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn:hover .nav-icon {
    transform: scale(1.1);
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
    border-radius: 12px;
}

.nav-item.active {
    color: var(--primary-pink);
    background: rgba(255, 45, 85, 0.1);
}

.nav-item:hover {
    color: var(--primary-pink);
}

.nav-icon {
    font-size: 24px;
}

.nav-text {
    font-size: 11px;
    font-weight: 600;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.4s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    color: var(--white);
    box-shadow: 0 4px 20px rgba(255, 45, 85, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 45, 85, 0.5);
}

.btn-gold {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
    color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.input-group {
    margin-bottom: 16px;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.order-card {
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}

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

.order-id {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-cyan);
}

.order-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-new { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.status-pending { background: rgba(251, 146, 60, 0.2); color: #fb923c; }
.status-uploaded { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.status-closed { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.status-rejected { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.order-details {
    display: grid;
    gap: 8px;
    font-size: 14px;
}

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

.order-label {
    color: rgba(255, 255, 255, 0.5);
}

.order-value {
    font-weight: 600;
    color: var(--white);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal,
.modal-content {
    background: rgba(15, 10, 30, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    transition: var(--transition);
    position: relative;
}

.modal::before,
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-pink), var(--primary-cyan));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-overlay.active .modal,
.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
    color: var(--white);
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.dice-loader {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.dice {
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: roll 0.5s ease-in-out infinite;
}

.dice:nth-child(2) {
    animation-delay: 0.1s;
}

@keyframes roll {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(15deg); }
}

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 10, 30, 0.95);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    opacity: 0;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success { 
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
    border-color: rgba(16, 185, 129, 0.5);
}
.toast.error { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
    border-color: rgba(239, 68, 68, 0.5);
}

.currency-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.currency-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: var(--transition);
}

.currency-btn:hover {
    border-color: var(--primary-pink);
    background: rgba(255, 45, 85, 0.1);
}

.currency-btn.selected {
    border-color: var(--primary-pink);
    background: linear-gradient(135deg, rgba(255, 45, 85, 0.15), rgba(0, 212, 255, 0.1));
    box-shadow: 0 0 20px rgba(255, 45, 85, 0.2);
}

.currency-btn .crypto-icon {
    width: 44px;
    height: 44px;
    font-size: 14px;
}

.currency-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
}

.calculation-result {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 16px;
    margin: 16px 0;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.calc-row:last-child {
    border-bottom: none;
}

.calc-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.calc-value {
    font-weight: 600;
    font-size: 14px;
    color: var(--white);
}

.calc-value.highlight {
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 18px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.bonus-info, .referral-info {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.bonus-info strong, .referral-info strong {
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bonus-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
}

.referral-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    margin: 12px 0;
}

.referral-link input {
    flex: 1;
    border: none;
    background: none;
    font-size: 12px;
    font-family: 'SF Mono', monospace;
    color: var(--white);
}

.copy-btn {
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 45, 85, 0.4);
}

.admin-section {
    border-left: 3px solid;
    border-image: linear-gradient(180deg, var(--primary-pink), var(--primary-cyan)) 1;
    padding-left: 12px;
}

/* ═══════════════════════════════════════
   ANALYTICS
═══════════════════════════════════════ */
.analytics-wrap { display: flex; flex-direction: column; gap: 10px; }

.anl-periods {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.analytics-period-btn {
    padding: 5px 12px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05); color: var(--text-secondary); font-size: 12px;
    cursor: pointer; transition: all 0.2s;
}
.analytics-period-btn.active,
.analytics-period-btn:hover {
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-cyan));
    color: #fff; border-color: transparent;
}

.analytics-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.analytics-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
}
.analytics-card.anl-wide { grid-column: 1 / -1; }
.anl-val {
    font-size: 26px; font-weight: 800;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-cyan));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    line-height: 1;
}
.anl-label { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

.anl-panel {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px; padding: 12px;
}
.anl-section-title {
    font-size: 12px; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 10px;
}
.anl-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 400px) { .anl-row-2 { grid-template-columns: 1fr; } }

.anl-bar-row {
    display: flex; align-items: center; gap: 6px; margin-bottom: 7px;
}
.anl-bar-label {
    font-size: 11px; min-width: 64px; max-width: 80px; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0;
}
.anl-bar-track { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.anl-bar-fill {
    height: 100%; border-radius: 4px; min-width: 2px;
    background: linear-gradient(90deg, var(--primary-pink), var(--primary-cyan));
    transition: width 0.5s ease;
}
.anl-bar-right { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.anl-bar-pct { font-size: 10px; color: var(--primary-cyan); min-width: 28px; text-align: right; font-weight: 600; }
.anl-bar-count { font-size: 11px; color: var(--text-secondary); min-width: 20px; text-align: right; }

.anl-sparkline-wrap {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px; padding: 12px;
}
.anl-sparkline-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.anl-sparkline-total { font-size: 12px; font-weight: 700; color: var(--primary-cyan); }
.anl-sparkline { width: 100%; height: 60px; overflow: visible; display: block; }
.anl-sparkline-labels {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 10px; color: var(--text-secondary); margin-top: 4px;
}
.anl-sparkline-legend { display: flex; gap: 10px; }
.anl-leg-all { color: var(--primary-pink); font-size: 10px; }
.anl-leg-uniq { color: #a855f7; font-size: 10px; }

.anl-hourly-grid {
    display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-bottom: 6px;
}
.anl-hour-cell {
    border-radius: 4px; padding: 4px 2px; text-align: center; cursor: default;
    transition: transform 0.1s;
}
.anl-hour-cell:hover { transform: scale(1.15); }
.anl-hour-num { font-size: 8px; color: rgba(255,255,255,0.5); display: block; }
.anl-hour-zero { background: rgba(255,255,255,0.04); }
.anl-hour-low { background: rgba(0, 212, 255, 0.15); }
.anl-hour-mid { background: rgba(0, 212, 255, 0.35); }
.anl-hour-high { background: rgba(255, 45, 85, 0.55); }
.anl-hourly-legend { display: flex; gap: 8px; font-size: 10px; }
.anl-hleg.zero { color: rgba(255,255,255,0.25); }
.anl-hleg.low { color: rgba(0,212,255,0.6); }
.anl-hleg.mid { color: rgba(0,212,255,0.9); }
.anl-hleg.high { color: var(--primary-pink); }

.anl-visits-list { display: flex; flex-direction: column; gap: 6px; max-height: 480px; overflow-y: auto; }
.anl-visit-row2 {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px; padding: 8px 10px; font-size: 11px;
    transition: background 0.15s;
}
.anl-visit-row2:hover { background: rgba(255,255,255,0.07); }
.anl-vr-top, .anl-vr-mid {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.anl-vr-top { margin-bottom: 4px; }
.anl-vr-time { font-variant-numeric: tabular-nums; color: rgba(255,255,255,0.4); min-width: 110px; }
.anl-vr-device { color: var(--text-primary); font-weight: 600; }
.anl-vr-ip { color: rgba(255,255,255,0.25); font-size: 10px; font-family: monospace; margin-left: auto; }
.anl-vr-browser { color: var(--primary-cyan); }
.anl-vr-os { color: rgba(255,255,255,0.55); }
.anl-vr-path { color: rgba(255,255,255,0.4); }
.anl-vr-ref { margin-top: 3px; color: rgba(255,255,255,0.3); font-size: 10px; word-break: break-all; }

.anl-ever-banner {
    background: linear-gradient(135deg, rgba(255,45,85,0.15), rgba(0,212,255,0.15));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px; padding: 18px; text-align: center;
}
.anl-ever-num {
    font-size: 42px; font-weight: 900; line-height: 1;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-cyan));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.anl-ever-label { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 4px; }

.anl-clear-section { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.anl-clear-hint { font-size: 11px; color: rgba(255,255,255,0.3); text-align: center; }

.anl-visit-row {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 12px;
}
.anl-visit-row:last-child { border-bottom: none; }
.anl-time { color: var(--text-secondary); min-width: 34px; font-variant-numeric: tabular-nums; }
.anl-browser { font-weight: 600; color: var(--text-primary); min-width: 58px; }
.anl-device-icon { font-size: 14px; }
.anl-os { color: var(--text-secondary); font-size: 11px; }
.anl-empty { color: var(--text-secondary); font-size: 12px; text-align: center; padding: 8px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

@media (max-width: 380px) {
    .stat-grid {
        gap: 8px;
    }
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 10px;
    border-radius: 14px;
    text-align: center;
    min-width: 0;
}

@media (max-width: 380px) {
    .stat-card {
        padding: 12px 8px;
    }
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-break: break-word;
}

@media (max-width: 380px) {
    .stat-value {
        font-size: 18px;
    }
}

.stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
    line-height: 1.3;
}

@media (max-width: 380px) {
    .stat-label {
        font-size: 10px;
    }
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding: 4px 2px 8px 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
    min-width: fit-content;
}

@media (max-width: 380px) {
    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(255, 45, 85, 0.2), rgba(0, 212, 255, 0.1));
    border-color: var(--primary-pink);
    color: var(--white);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.profile-stat {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-stat-value {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding: 4px 2px 10px 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.admin-tabs::-webkit-scrollbar {
    display: none;
}

.admin-tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
}

@media (max-width: 380px) {
    .admin-tab-btn {
        padding: 8px 10px;
        font-size: 11px;
        gap: 4px;
    }
}

.admin-tab-btn .tab-icon {
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

.admin-tab-btn.active {
    background: linear-gradient(135deg, rgba(255, 45, 85, 0.2), rgba(0, 212, 255, 0.1));
    border-color: var(--primary-pink);
    color: var(--white);
}

.admin-tab-btn.active .tab-icon {
    opacity: 1;
}

.admin-tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.coin-loader {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.coin-spin {
    width: 100%;
    height: 100%;
    animation: spin 1s linear infinite;
}

.animated-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animated-slide-up {
    animation: slideUp 0.5s ease-out backwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animated-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animated-bounce-hover:hover {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animated-scale-hover {
    transition: transform 0.2s ease;
}

.animated-scale-hover:hover {
    transform: scale(1.02);
}

.animated-glow {
    position: relative;
}

.animated-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    box-shadow: 0 0 20px rgba(255, 45, 85, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.animated-glow:hover::after {
    opacity: 1;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.setting-info {
    flex: 1;
}

.setting-label {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.setting-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.setting-input {
    width: 120px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    text-align: right;
}

.setting-input:focus {
    outline: none;
    border-color: var(--primary-pink);
}

.wallet-input-group {
    margin-bottom: 16px;
}

.wallet-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    display: block;
}

.wallet-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 13px;
    font-family: 'SF Mono', 'Consolas', monospace;
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.wallet-input:focus {
    outline: none;
    border-color: var(--primary-pink);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 45, 85, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 45, 85, 0.5);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.card-icon-wrap {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.card-svg-icon {
    width: 44px;
    height: 44px;
}

.menu-btn-icon-wrap {
    width: 52px;
    height: 52px;
}

.menu-svg-icon {
    width: 52px;
    height: 52px;
}

.nav-svg-icon {
    width: 28px;
    height: 28px;
    transition: transform 0.2s ease;
}

.nav-btn.active .nav-svg-icon {
    transform: scale(1.15);
}

.nav-btn:hover .nav-svg-icon {
    transform: scale(1.1);
}

.crypto-svg-icon {
    width: 44px;
    height: 44px;
}

.btn-svg-icon {
    width: 24px;
    height: 24px;
}

.tab-svg-icon {
    width: 18px;
    height: 18px;
}

.svg-loader {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.loader-icon {
    width: 100%;
    height: 100%;
}

.loader-icon.spin {
    animation: spin 1s linear infinite;
}

/* Auth Screen Styles */
.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 0%, rgba(255, 45, 85, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 100%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        linear-gradient(180deg, #0d0a1a 0%, #1a0a2e 50%, #0a0a14 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-screen.hidden {
    display: none;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-logo {
    margin-bottom: 16px;
}

.auth-logo-img {
    width: 120px;
    height: auto;
    filter: hue-rotate(var(--logo-hue))
            drop-shadow(0 0 20px rgba(var(--t-p1), 0.7)) brightness(1.1);
    transition: filter 0.55s ease;
}

.auth-title {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--gray);
    font-size: 16px;
    margin-bottom: 32px;
}

.auth-form {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 16px;
}

.auth-form .input-group {
    margin-bottom: 16px;
    text-align: left;
}

.auth-form .input-group label {
    display: block;
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 8px;
}

.auth-form .input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--white);
    font-size: 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form .input-group input:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.2);
}

.auth-form .input-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
}

.auth-switch {
    color: var(--gray);
    font-size: 14px;
    margin-top: 16px;
}

.auth-switch a {
    color: var(--primary-cyan);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-error {
    color: #ef4444;
    font-size: 14px;
    margin-top: 12px;
    min-height: 20px;
}

/* Logout button in profile */
.logout-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

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

@media (min-width: 768px) {
    .header {
        padding: 32px 16px;
        margin-bottom: 32px;
    }

    .logo-container {
        width: 320px;
        height: auto;
    }

    .logo-img {
        max-width: 320px;
    }

    .subtitle {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .menu-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .menu-btn {
        padding: 28px 16px;
    }

    .menu-btn-icon-wrap {
        width: 56px;
        height: 56px;
    }

    .menu-svg-icon {
        width: 56px;
        height: 56px;
    }

    .menu-btn-text {
        font-size: 15px;
    }

    .card {
        padding: 24px;
        margin-bottom: 20px;
        border-radius: 24px;
    }

    .card-title {
        font-size: 20px;
    }

    .rates-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .rate-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 20px 16px;
    }

    .rate-crypto {
        flex-direction: column;
        gap: 8px;
    }

    .crypto-icon {
        width: 48px;
        height: 48px;
    }

    .rate-value {
        font-size: 18px;
    }

    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        background: rgba(10, 10, 20, 0.95);
        padding: 8px 0;
        max-width: 600px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 24px 24px 0 0;
    }

    .nav-btn {
        padding: 10px 24px;
    }

    .modal,
    .modal-content {
        max-width: 520px;
        padding: 32px;
    }

    .stat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .stat-value {
        font-size: 26px;
    }

    .stat-label {
        font-size: 13px;
    }

    .currency-selector {
        gap: 16px;
    }

    .currency-btn {
        padding: 20px 12px;
    }

    .input-field {
        padding: 16px 20px;
        font-size: 17px;
    }

    .btn {
        padding: 18px 28px;
        font-size: 17px;
    }

    .toast {
        bottom: 80px;
        font-size: 15px;
        padding: 14px 28px;
    }

    .order-card {
        padding: 20px;
    }

    .setting-item {
        padding: 20px;
    }

    .setting-input {
        width: 160px;
        padding: 12px 16px;
    }

    .tabs {
        gap: 10px;
    }

    .tab-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .admin-tabs {
        gap: 10px;
    }

    .admin-tab-btn {
        padding: 12px 18px;
        font-size: 14px;
    }

    .calculation-result {
        padding: 20px;
    }

    .profile-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .tg-connect-banner {
        max-width: 500px;
        margin: 24px auto;
        padding: 32px 24px;
    }
}

@media (min-width: 1200px) {
    .header {
        padding: 40px 16px;
    }

    .logo-container {
        width: 320px;
        height: auto;
    }

    .logo-img {
        max-width: 320px;
    }

    .subtitle {
        font-size: 18px;
    }

    .rates-grid {
        gap: 20px;
    }

    .rate-item {
        padding: 24px 20px;
    }

    .crypto-icon {
        width: 56px;
        height: 56px;
    }

    .rate-value {
        font-size: 20px;
    }

    .stat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .stat-value {
        font-size: 28px;
    }
}

.tg-connect-banner {
    background: rgba(15, 10, 30, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--border-radius);
    padding: 24px 20px;
    text-align: center;
    margin: 16px 0;
    position: relative;
    overflow: hidden;
}

.tg-connect-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-pink), var(--primary-cyan));
}

.tg-connect-banner .tg-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.tg-connect-banner .tg-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.tg-connect-banner .tg-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
    line-height: 1.5;
}

.tg-connect-banner .tg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #0088cc, #00a8e8);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.tg-connect-banner .tg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 136, 204, 0.4);
}

.channel-banner {
    margin: 16px 0;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.15), rgba(124, 58, 237, 0.15));
    border: 1px solid rgba(0, 136, 204, 0.3);
}

.channel-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.channel-link:hover {
    background: rgba(0, 136, 204, 0.1);
}

.desktop-info-grid {
    display: none;
}

@media (min-width: 768px) {
    .desktop-info-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        margin-top: 24px;
    }

    .info-card {
        background: rgba(15, 10, 30, 0.6);
        backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: var(--border-radius);
        padding: 24px 16px;
        text-align: center;
    }

    .info-card .info-icon {
        font-size: 32px;
        margin-bottom: 12px;
    }

    .info-card .info-title {
        font-size: 16px;
        font-weight: 700;
        color: var(--white);
        margin-bottom: 6px;
    }

    .info-card .info-desc {
        font-size: 13px;
        color: rgba(255, 255, 255, 0.5);
        line-height: 1.4;
    }
}

.welcome-screen {
    text-align: center;
    padding: 10px 0 6px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 40px);
    justify-content: center;
}

.welcome-logo {
    margin-bottom: 10px;
}

.welcome-logo-img {
    width: 180px;
    max-width: 55vw;
    filter: hue-rotate(var(--logo-hue))
            drop-shadow(0 0 24px rgba(var(--t-p1), 0.85))
            drop-shadow(0 0 48px rgba(var(--t-p1), 0.45))
            drop-shadow(0 0 14px rgba(var(--t-p2), 0.5))
            brightness(1.15) saturate(1.25);
    animation: welcomeFloat 3s ease-in-out infinite;
    transition: filter 0.55s ease;
}

@keyframes welcomeFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.welcome-title {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #c084fc, #67e8f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.welcome-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 14px;
}

.welcome-features {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.welcome-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.welcome-feature-icon {
    font-size: 15px;
}

.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 340px;
    margin: 0 auto 14px;
    width: 100%;
}

.welcome-btn {
    width: 100%;
    padding: 15px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 16px;
    letter-spacing: 0.02em;
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    padding: 14px 24px;
    border-radius: 16px;
    font-size: 15px;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.2);
}

.welcome-channel-link {
    margin: 8px auto 8px;
    max-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.12));
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.welcome-channel-link .channel-link {
    justify-content: center;
    padding: 10px 16px;
    font-size: 13px;
}

.welcome-tg-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    padding-top: 8px;
}

.welcome-tg-hint a {
    color: var(--primary-cyan);
    text-decoration: none;
}

.welcome-tg-hint a:hover {
    text-decoration: underline;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-cyan);
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    padding: 8px;
}

.btn-link:hover {
    text-decoration: underline;
}

#auth-error {
    background: rgba(255, 68, 102, 0.1);
    border: 1px solid rgba(255, 68, 102, 0.3);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
}

.req-loading {
    text-align: center;
    padding: 40px 20px;
}

.req-loading-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
}

.req-loading-icon span {
    font-size: 36px;
    z-index: 1;
}

.req-pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid var(--primary-cyan);
    animation: reqPulse 1.5s ease-in-out infinite;
}

@keyframes reqPulse {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

.req-loading-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
    animation: reqTextPulse 1.5s ease-in-out infinite;
}

@keyframes reqTextPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.req-shimmer-lines {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.req-shimmer-line {
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: reqShimmer 1.5s ease-in-out infinite;
}

@keyframes reqShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.req-box {
    background: rgba(15, 10, 30, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.req-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-pink), var(--primary-cyan), var(--primary-pink));
    background-size: 200% 100%;
    animation: reqGradient 3s linear infinite;
}

@keyframes reqGradient {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

.req-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.req-header-icon {
    font-size: 24px;
}

.req-header-title {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.req-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
}

.req-details {
    margin-bottom: 16px;
}

.req-details-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.req-details-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    padding: 14px 16px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 12px;
    word-break: break-all;
    user-select: all;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.req-details-value:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

.req-details-value:active {
    transform: scale(0.98);
}

.req-copy-hint {
    font-size: 11px;
    color: var(--primary-cyan);
    text-align: center;
    margin-top: 6px;
    opacity: 0.7;
}

.req-banks-section {
    margin-top: 20px;
}

.req-banks-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.req-banks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.req-bank-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: var(--transition);
}

.req-bank-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.req-bank-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.req-bank-name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

.req-instruction {
    margin-top: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
}

.req-instr-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 14px;
}

.req-instr-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.req-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.req-step-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.req-step-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    padding-top: 2px;
}

.req-instr-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
    padding: 12px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.req-instr-tip strong {
    color: var(--primary-cyan);
}

.req-warning {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.req-amount-block {
    background: linear-gradient(135deg, rgba(255, 59, 130, 0.15), rgba(0, 224, 255, 0.1));
    border: 1px solid rgba(255, 59, 130, 0.35);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.req-amount-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
}

.req-amount-value {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-pink), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.req-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 4px;
}

.req-tab {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.req-tab.active {
    background: linear-gradient(135deg, rgba(255, 45, 85, 0.2), rgba(0, 212, 255, 0.2));
    color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.req-tab:not(.active):hover {
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.06);
}

.req-tab-panel {
    display: none;
}

.req-tab-panel.active {
    display: block;
    animation: reqFadeIn 0.3s ease;
}

@keyframes reqFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.req-details-value-ym {
    background: rgba(139, 0, 255, 0.08);
    border-color: rgba(139, 0, 255, 0.25);
}

.req-details-value-ym:hover {
    background: rgba(139, 0, 255, 0.15);
    border-color: rgba(139, 0, 255, 0.4);
}

.req-upload-section {
    margin-top: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    text-align: center;
}

.req-upload-hint {
    font-size: 15px;
    color: var(--white);
    margin-bottom: 14px;
    font-weight: 600;
}

@media (max-width: 360px) {
    .req-banks-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .req-details-value {
        font-size: 15px;
        padding: 12px;
    }
}

@media (min-width: 768px) {
    .req-banks-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    .req-bank-card {
        padding: 14px 8px;
    }
    .req-bank-icon {
        width: 40px;
        height: 40px;
    }
    .req-bank-name {
        font-size: 12px;
    }
    .req-box {
        padding: 24px;
    }
}

.gif-banners {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.gif-banner {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    height: 120px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.gif-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.25);
}

.gif-banner:active {
    transform: scale(0.98);
}

.gif-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gif-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 14px 18px;
    pointer-events: none;
}

.gif-banner-label {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.gif-banner-name {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
}

.gif-banner-cta {
    margin-left: auto;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-cyan);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.gif-banner:hover .gif-banner-cta {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.6);
}

.site-footer {
    margin-top: 24px;
    padding: 24px 16px 20px;
    text-align: center;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 45, 85, 0.3), rgba(0, 212, 255, 0.3), transparent);
}

.footer-top {
    margin-bottom: 16px;
}

.footer-logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

.footer-logo-img {
    width: 48px;
    height: 48px;
    filter: hue-rotate(var(--logo-hue))
            drop-shadow(0 0 10px rgba(var(--t-p1), 0.7)) brightness(1.1);
    transition: filter 0.55s ease;
}

.footer-logo-text {
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s ease;
    position: relative;
}

.footer-nav a:hover {
    color: var(--primary-cyan);
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--primary-cyan);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.footer-nav a:hover::after {
    transform: scaleX(1);
}

.footer-coins {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.footer-coin {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid;
}

.fc-btc {
    color: #F7931A;
    border-color: rgba(247, 147, 26, 0.25);
    background: rgba(247, 147, 26, 0.06);
}

.fc-xmr {
    color: #FF6600;
    border-color: rgba(255, 102, 0, 0.25);
    background: rgba(255, 102, 0, 0.06);
}

.fc-usdt {
    color: #26A17B;
    border-color: rgba(38, 161, 123, 0.25);
    background: rgba(38, 161, 123, 0.06);
}

.fc-rub {
    color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.footer-bottom {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
    font-weight: 500;
}

@media (max-width: 380px) {
    .gif-banner {
        height: 100px;
    }
    .gif-banner-name {
        font-size: 15px;
    }
    .gif-banner-cta {
        font-size: 11px;
        padding: 4px 10px;
    }
    .footer-nav {
        gap: 12px;
    }
    .footer-coin {
        padding: 3px 8px;
        font-size: 11px;
    }
}

@media (min-width: 768px) {
    .gif-banners {
        flex-direction: row;
    }
    .gif-banner {
        flex: 1;
        height: 140px;
    }
}

.footer-nav {
    flex-wrap: wrap;
}

.chat-widget {
    position: fixed;
    bottom: 90px;
    left: 20px;
    right: auto;
    z-index: 9999;
}
.chat-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff2d55, #00d4ff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 45, 85, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}
.chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(255, 45, 85, 0.6);
}
.chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff2d55;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #1a1a2e;
}
.chat-panel {
    position: absolute;
    bottom: 70px;
    left: 0;
    right: auto;
    width: 320px;
    max-height: 480px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255, 45, 85, 0.2), rgba(0, 212, 255, 0.2));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #fff;
    font-size: 15px;
}
.chat-close {
    cursor: pointer;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1;
}
.chat-close:hover {
    color: #ff2d55;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 280px;
    max-height: 340px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-msg {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    word-wrap: break-word;
}
.chat-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #ff2d55, #d4247a);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-msg.admin {
    align-self: flex-start;
    background: rgba(0, 212, 255, 0.15);
    color: #e0e0ff;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-bottom-left-radius: 4px;
}
.chat-msg-time {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 4px;
}
.chat-msg.user .chat-msg-time {
    text-align: right;
}
.chat-input-row {
    display: flex;
    padding: 10px;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 15, 35, 0.5);
}
.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 8px 14px;
    color: #fff;
    font-size: 13px;
    outline: none;
}
.chat-input:focus {
    border-color: #00d4ff;
}
.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}
.chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff2d55, #00d4ff);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.chat-send-btn:hover {
    transform: scale(1.1);
}
.chat-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
    padding: 40px 20px;
}

@media (max-width: 480px) {
    .chat-panel {
        width: calc(100vw - 32px);
        left: 0;
        right: auto;
        bottom: 62px;
        max-height: 55vh;
    }
    .chat-widget {
        bottom: 80px;
        left: 12px;
        right: auto;
    }
    .chat-btn {
        width: 46px;
        height: 46px;
    }
    .chat-btn svg {
        width: 22px;
        height: 22px;
    }
    .chat-panel {
        width: min(300px, calc(100vw - 24px));
    }
}

/* ── Logo PNG ─────────────────────────────────────────────────── */
.logo-img {
    max-width: 160px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: hue-rotate(var(--logo-hue))
            drop-shadow(0 0 20px rgba(var(--t-p1), 0.95))
            drop-shadow(0 0 42px rgba(var(--t-p1), 0.55))
            drop-shadow(0 0 12px rgba(var(--t-p2), 0.45))
            brightness(1.15) saturate(1.2);
    animation: logoFloat 4s ease-in-out infinite;
    transition: filter 0.55s ease, transform 0.3s ease;
    will-change: transform, filter;
}

.logo-img:hover {
    filter: hue-rotate(var(--logo-hue))
            drop-shadow(0 0 32px rgba(var(--t-p1), 1))
            drop-shadow(0 0 64px rgba(var(--t-p1), 0.65))
            drop-shadow(0 0 20px rgba(var(--t-p2), 0.6))
            brightness(1.25) saturate(1.3);
    transform: scale(1.05) translateY(-4px);
    animation-play-state: paused;
}

/* ── Header TG Buttons ────────────────────────────────────────── */
.header-tg-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.tg-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(34, 211, 238, 0.15));
    border: 1px solid rgba(168, 85, 247, 0.45);
    color: #c4b5fd;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.2);
}

.tg-header-btn:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.45), rgba(34, 211, 238, 0.3));
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.6);
    border-color: rgba(168, 85, 247, 0.8);
    transform: scale(1.05) translateY(-1px);
    color: #fff;
}

.tg-header-btn--group {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(168, 85, 247, 0.15));
    border-color: rgba(34, 211, 238, 0.4);
    color: #a5f3fc;
}

.tg-header-btn--group:hover {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.4), rgba(168, 85, 247, 0.3));
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.55);
    border-color: rgba(34, 211, 238, 0.8);
    color: #fff;
}

/* ── Calculator Card ──────────────────────────────────────────── */
.calc-card {
    background: rgba(15, 10, 30, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.3), 0 8px 32px rgba(0,0,0,0.4);
}

.calc-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(168,85,247,0.6), rgba(34,211,238,0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.calc-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.calc-card-title {
    font-size: 17px;
    font-weight: 800;
    background: linear-gradient(135deg, #a855f7, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calc-row-inputs {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 14px;
}

.calc-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calc-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.calc-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(168,85,247,0.3);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease;
}

.calc-select:focus {
    border-color: rgba(168,85,247,0.7);
    box-shadow: 0 0 0 2px rgba(168,85,247,0.15);
}

.calc-select option {
    background: #1a0a2e;
    color: #fff;
}

.calc-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(168,85,247,0.3);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -moz-appearance: textfield;
}

.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calc-input:focus {
    border-color: rgba(168,85,247,0.7);
    box-shadow: 0 0 0 2px rgba(168,85,247,0.15);
}

.calc-input::placeholder { color: rgba(255,255,255,0.25); }

.calc-arrow {
    flex-shrink: 0;
    padding-bottom: 6px;
    opacity: 0.8;
}

.calc-to-label {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    min-height: 20px;
}

.calc-result-val {
    font-size: 16px;
    font-weight: 800;
    color: #a855f7;
    min-height: 24px;
    background: linear-gradient(135deg, #a855f7, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-break: break-all;
}

.calc-commission {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 16px;
    min-height: 16px;
}

.calc-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #7c3aed, #22d3ee);
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}

.calc-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 32px rgba(124,58,237,0.6);
}

.calc-btn:active { transform: scale(0.98); }

/* ── Advantages Grid ──────────────────────────────────────────── */
.advantages-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.adv-card {
    background: rgba(15,10,30,0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(168,85,247,0.2);
    border-radius: 16px;
    padding: 16px 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.adv-card:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: rgba(168,85,247,0.5);
    box-shadow: 0 0 20px rgba(168,85,247,0.25);
}

.adv-icon {
    font-size: 26px;
    margin-bottom: 8px;
    display: block;
}

.adv-title {
    font-size: 14px;
    font-weight: 800;
    color: #e2d9f3;
    margin-bottom: 4px;
}

.adv-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    font-weight: 500;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .advantages-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 400px) {
    .calc-row-inputs {
        flex-direction: column;
        gap: 8px;
    }
    .calc-arrow {
        transform: rotate(90deg);
        align-self: center;
        padding-bottom: 0;
    }
}

/* ── Footer TG Icons ──────────────────────────────────────────── */
.footer-tg-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
}

.footer-tg-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 50px;
    background: rgba(168,85,247,0.1);
    border: 1px solid rgba(168,85,247,0.3);
    color: #c4b5fd;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-tg-icon-btn:hover {
    background: rgba(168,85,247,0.25);
    box-shadow: 0 0 18px rgba(168,85,247,0.45);
    border-color: rgba(168,85,247,0.7);
    color: #fff;
    transform: scale(1.05);
}

.footer-tg-icon-btn--group {
    background: rgba(34,211,238,0.08);
    border-color: rgba(34,211,238,0.3);
    color: #a5f3fc;
}

/* ── Brand Preloader ──────────────────────────────────────────── */
.brand-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(7, 7, 15, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: preloaderFadeIn 0.18s ease;
}

.brand-preloader-inner {
    position: relative;
    width: 86px;
    height: 86px;
    margin-bottom: 22px;
}

.brand-preloader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #a855f7;
    border-right-color: #22d3ee;
    animation: preloaderSpin 0.9s linear infinite;
}

.brand-preloader-ring::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-bottom-color: rgba(168, 85, 247, 0.18);
    border-left-color: rgba(34, 211, 238, 0.18);
}

.brand-preloader-ring::after {
    content: '';
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(34, 211, 238, 0.35);
    border-right-color: rgba(168, 85, 247, 0.35);
    animation: preloaderSpin 1.4s linear infinite reverse;
}

.brand-preloader-c {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 900;
    font-style: italic;
    background: linear-gradient(135deg, #c084fc, #67e8f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: preloaderPulse 0.9s ease-in-out infinite;
    letter-spacing: -1px;
}

.brand-preloader-text {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
}

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

@keyframes preloaderPulse {
    0%, 100% { opacity: 0.6; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
}

@keyframes preloaderFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes preloaderFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.brand-preloader.hiding {
    animation: preloaderFadeOut 0.25s ease forwards;
}

.footer-tg-icon-btn--group:hover {
    background: rgba(34,211,238,0.2);
    box-shadow: 0 0 18px rgba(34,211,238,0.4);
    border-color: rgba(34,211,238,0.7);
    color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   MINI LOADER (toast-style API loading indicator)
═══════════════════════════════════════════════════════════════ */
.mini-loader {
    position: fixed;
    bottom: 86px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8800;
    background: rgba(10, 8, 18, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(var(--t-p1), 0.30);
    border-radius: 50px;
    padding: 11px 22px 11px 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    box-shadow: 0 6px 30px rgba(var(--t-p1), 0.22), 0 0 0 1px rgba(var(--t-p1), 0.08);
    animation: miniLoaderIn 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    white-space: nowrap;
}

.mini-loader-spinner {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    border-top-color: rgb(var(--t-p1));
    border-right-color: rgb(var(--t-p2));
    animation: preloaderSpin 0.75s linear infinite;
    flex-shrink: 0;
}

.mini-loader-icon {
    font-size: 15px;
    flex-shrink: 0;
    line-height: 1;
}

.mini-loader-text {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
}

@keyframes miniLoaderIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.92); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0)    scale(1); }
}
@keyframes miniLoaderOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0)    scale(1); }
    to   { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.92); }
}
.mini-loader.hiding {
    animation: miniLoaderOut 0.2s ease forwards;
}

/* ══════════════════════════════════════════════════════════════
   MOBILE THEME SIDE-TAB (vertical, right edge, unobtrusive)
═══════════════════════════════════════════════════════════════ */
.theme-pill {
    position: fixed;
    right: 0;
    top: 22%;
    z-index: 8000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 5px 8px 7px;
    background: rgba(9, 7, 16, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--t-p1), 0.30);
    border-right: none;
    border-radius: 10px 0 0 10px;
    box-shadow: -3px 0 20px rgba(0,0,0,0.30),
                -1px 0 10px rgba(var(--t-p1), 0.12),
                inset 0 0 0 1px rgba(var(--t-p1), 0.05);
    transition: border-color 0.45s ease, box-shadow 0.45s ease;
    user-select: none;
}

.theme-pill-label {
    font-size: 11px;
    line-height: 1;
    opacity: 0.30;
    margin-bottom: 1px;
}

.theme-pill-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.22s ease,
                box-shadow 0.22s ease;
    box-shadow: 0 1px 5px rgba(0,0,0,0.45);
    flex-shrink: 0;
}

.theme-pill-dot:hover {
    transform: scale(1.18) translateX(-2px);
}

.theme-pill-dot.active {
    border-color: rgba(255,255,255,0.88);
    transform: scale(1.22) translateX(-2px);
    box-shadow: 0 0 10px rgba(var(--t-p1), 0.65),
                0 1px 5px rgba(0,0,0,0.45);
}

/* ══════════════════════════════════════════════════════════════
   DESKTOP SIDEBAR
═══════════════════════════════════════════════════════════════ */
.desktop-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    body { padding-bottom: 0 !important; }

    .bottom-nav   { display: none !important; }
    .header       { display: none !important; }
    .theme-pill   { display: none !important; }

    .desktop-sidebar {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 260px;
        background: rgba(7, 6, 14, 0.96);
        backdrop-filter: blur(28px);
        -webkit-backdrop-filter: blur(28px);
        border-right: 1px solid rgba(var(--t-p1), 0.12);
        padding: 24px 14px 20px;
        z-index: 500;
        overflow-y: auto;
        gap: 6px;
        box-shadow: 4px 0 48px rgba(var(--t-p1), 0.06);
        scrollbar-width: none;
    }
    .desktop-sidebar::-webkit-scrollbar { display: none; }

    .app-container {
        margin-left: 260px;
        max-width: none;
        width: calc(100% - 260px);
        padding: 28px 48px;
    }

    .mini-loader {
        left: calc(130px + 50vw);
        bottom: 28px;
    }

    .welcome-screen {
        min-height: calc(100vh - 80px);
        max-width: 480px;
        margin: 0 auto;
    }
}

/* ── Sidebar header ─── */
.ds-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(var(--t-p1), 0.1);
    margin-bottom: 10px;
}

.ds-logo-img {
    width: 90px;
    display: block;
    margin: 0 auto 8px;
    filter: hue-rotate(var(--logo-hue))
            drop-shadow(0 0 14px rgba(var(--t-p1), 0.85))
            drop-shadow(0 0 28px rgba(var(--t-p1), 0.45))
            brightness(1.15) saturate(1.2);
    transition: filter 0.55s ease;
}

.ds-brand {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, rgb(var(--t-p1)), rgb(var(--t-p2)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: background 0.45s ease;
}

.ds-tagline {
    font-size: 11px;
    color: rgba(255,255,255,0.38);
    margin-top: 2px;
}

/* ── Sidebar nav ─── */
.ds-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 10px;
}

.ds-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.6);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    text-align: left;
    width: 100%;
}
.ds-nav-item:hover {
    background: rgba(var(--t-p1), 0.1);
    color: rgba(255,255,255,0.9);
}
.ds-nav-item.active {
    background: rgba(var(--t-p1), 0.16);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(var(--t-p1), 0.25);
}

.ds-nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.8;
}
.ds-nav-item.active .ds-nav-icon { opacity: 1; }

/* ── Sidebar rates box ─── */
.ds-rates-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(var(--t-p1), 0.1);
    border-radius: 14px;
    padding: 12px 14px;
    margin: 6px 0;
}

.ds-rates-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 10px;
}

.ds-rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 12.5px;
}
.ds-rate-item:last-child { border-bottom: none; }

.ds-rate-coin {
    font-weight: 700;
    color: rgba(var(--t-p1), 1);
    color: rgb(var(--t-p1));
    font-size: 12px;
}

.ds-rate-val {
    color: rgba(255,255,255,0.75);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
}

/* ── Sidebar TG links ─── */
.ds-tg-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 6px 0;
}

.ds-tg-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(var(--t-p1), 0.07);
    border: 1px solid rgba(var(--t-p1), 0.18);
    color: rgba(255,255,255,0.7);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}
.ds-tg-btn:hover {
    background: rgba(var(--t-p1), 0.16);
    color: #fff;
}
.ds-tg-btn--group {
    background: rgba(var(--t-p2), 0.07);
    border-color: rgba(var(--t-p2), 0.18);
}
.ds-tg-btn--group:hover {
    background: rgba(var(--t-p2), 0.16);
}

/* ── Sidebar theme switcher ─── */
.ds-theme-switcher {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(var(--t-p1), 0.1);
}

.ds-theme-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 10px;
}

.ds-theme-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.ds-theme-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 6px;
    border-radius: 10px;
    border: 1.5px solid transparent;
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    color: rgba(255,255,255,0.55);
    font-size: 11px;
    font-weight: 500;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.ds-theme-btn:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.8); }
.ds-theme-btn.active {
    border-color: rgba(var(--t-p1), 0.5);
    background: rgba(var(--t-p1), 0.1);
    color: #fff;
}
.ds-theme-preview {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: block;
}

/* ══════════════════════════════════════════════════════════════
   DESKTOP CONTENT IMPROVEMENTS
═══════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
    .page-home-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .card {
        border-color: var(--t-card-border);
    }

    .advantages-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .rates-card {
        max-width: 100%;
    }

    .page#page-home .footer {
        margin-top: 40px;
    }
}

@media (min-width: 1400px) {
    .app-container {
        padding: 32px 72px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN — USERS PANEL
═══════════════════════════════════════════════════════════════════════════ */
.users-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(var(--accent-rgb), 0.08);
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.users-online-count { color: #4ade80; font-size: 13px; }

/* User card */
.user-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}
.user-card:hover { border-color: rgba(var(--accent-rgb), 0.4); }

.user-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    flex-shrink: 0;
}
.user-avatar-lg { width: 56px; height: 56px; font-size: 22px; }

.user-info { flex: 1; min-width: 0; }
.user-name {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}
.user-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.user-badge-admin {
    font-size: 9px;
    font-weight: 700;
    background: var(--accent);
    color: #fff;
    border-radius: 4px;
    padding: 1px 5px;
    letter-spacing: 0.5px;
}
.user-badge-tg {
    font-size: 9px;
    font-weight: 700;
    background: #229ED9;
    color: #fff;
    border-radius: 4px;
    padding: 1px 5px;
    letter-spacing: 0.5px;
}
.user-badge-web {
    font-size: 9px;
    font-weight: 700;
    background: #6b7280;
    color: #fff;
    border-radius: 4px;
    padding: 1px 5px;
    letter-spacing: 0.5px;
}

.user-online-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}
.user-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.3);
}
.user-status-dot.online {
    background: #4ade80;
    box-shadow: 0 0 6px #4ade8099;
}
.user-status-dot.offline { background: #6b7280; }
.user-status-label { font-size: 10px; color: var(--text-muted); }

/* User stats row */
.user-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.user-stat {
    background: rgba(var(--accent-rgb), 0.06);
    border-radius: 8px;
    padding: 8px 6px;
    text-align: center;
}
.user-stat-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-stat-lbl {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.user-detail-btn {
    width: 100%;
    margin-top: 4px;
    font-size: 13px;
    padding: 8px;
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 8px;
    color: var(--accent);
    cursor: pointer;
    transition: background 0.2s;
}
.user-detail-btn:hover { background: rgba(var(--accent-rgb), 0.15); }

/* User detail modal */
.user-detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.user-detail-name {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.user-detail-id { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.user-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.user-detail-item {
    background: rgba(var(--accent-rgb), 0.07);
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
}
.user-detail-item-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}
.user-detail-item-lbl {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.user-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
}

/* Bonus section */
.user-bonus-section {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(var(--accent-rgb), 0.07);
    border-radius: 12px;
    border: 1px solid rgba(var(--accent-rgb), 0.15);
}
.user-bonus-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--accent);
}
.user-bonus-form .input-field { margin-bottom: 6px; }

/* Orders section */
.user-orders-section {
    margin-top: 4px;
}
.user-orders-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.user-order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    background: rgba(255,255,255,0.03);
    margin-bottom: 4px;
    gap: 8px;
}
.user-order-row:last-child { margin-bottom: 0; }

#web-back-btn {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px 8px 10px;
    background: rgba(20, 20, 36, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
#web-back-btn:hover {
    background: rgba(30, 30, 50, 0.95);
    border-color: rgba(255,255,255,0.22);
}
#web-back-btn:active {
    transform: scale(0.96);
}

.loyalty-card {
    padding: 18px;
}
.loyalty-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.loyalty-tier-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.loyalty-tier-name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
}
.loyalty-deals-count {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}
.loyalty-discount-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.loyalty-progress-section {
    margin-bottom: 16px;
}
.loyalty-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    margin-bottom: 6px;
}
.loyalty-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 99px;
    overflow: hidden;
}
.loyalty-progress-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.5s ease;
    min-width: 4px;
}
.loyalty-max-tier {
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    padding: 8px 0 14px;
}
.loyalty-tiers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.loyalty-tier-card {
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    transition: border-color 0.2s;
}
.loyalty-tier-card.active {
    background: rgba(255,255,255,0.07);
}
.loyalty-tier-card-icon {
    font-size: 18px;
    margin-bottom: 4px;
}
.loyalty-tier-card-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 2px;
}
.loyalty-tier-card-range {
    font-size: 9px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 4px;
    line-height: 1.3;
}
.loyalty-tier-card-disc {
    font-size: 11px;
    font-weight: 700;
}
.loyalty-note {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    text-align: center;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
@media (max-width: 380px) {
    .loyalty-tiers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
