/* =========================================
   MIFX Investment - Binary Trading Platform
   Custom CSS with Trading Animations
   ========================================= */

/* ---- CSS Variables ---- */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #151c2c;
    --bg-card-hover: #1a2236;
    --bg-input: #0d1321;
    --border-color: #1e2a3a;
    --border-glow: rgba(0, 230, 118, 0.15);
    
    --text-primary: #ffffff;
    --text-secondary: #8a94a6;
    --text-muted: #4a5568;
    
    --accent-green: #00e676;
    --accent-green-dark: #00c853;
    --accent-green-glow: rgba(0, 230, 118, 0.3);
    --accent-red: #ff1744;
    --accent-red-dark: #d50000;
    --accent-red-glow: rgba(255, 23, 68, 0.3);
    --accent-blue: #2979ff;
    --accent-blue-glow: rgba(41, 121, 255, 0.3);
    --accent-gold: #ffd740;
    --accent-cyan: #00e5ff;
    --accent-purple: #7c4dff;
    
    --gradient-green: linear-gradient(135deg, #00e676, #00c853);
    --gradient-red: linear-gradient(135deg, #ff1744, #d50000);
    --gradient-blue: linear-gradient(135deg, #2979ff, #2962ff);
    --gradient-dark: linear-gradient(180deg, #0a0e17, #111827);
    --gradient-card: linear-gradient(145deg, #151c2c, #111827);
    
    --shadow-green: 0 0 20px rgba(0, 230, 118, 0.2);
    --shadow-red: 0 0 20px rgba(255, 23, 68, 0.2);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    
    --font-main: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    --header-height: 60px;
    --bottom-nav-height: 70px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background animated grid */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(rgba(0, 230, 118, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 230, 118, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-green); border-radius: 4px; }

/* ---- Preloader ---- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    text-align: center;
    position: relative;
}

.pulse-ring {
    width: 100px;
    height: 100px;
    border: 3px solid var(--accent-green);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulseRing 1.5s ease-out infinite;
}

@keyframes pulseRing {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

.loader-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: loaderPulse 1s ease-in-out infinite alternate;
}

@keyframes loaderPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 var(--accent-green-glow); }
    100% { transform: scale(1.05); box-shadow: 0 0 30px 10px var(--accent-green-glow); }
}

.loader-icon {
    font-size: 36px;
    color: var(--bg-primary);
}

.loader-text {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-green);
    letter-spacing: 3px;
    animation: textGlow 1.5s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% { text-shadow: 0 0 5px var(--accent-green-glow); }
    100% { text-shadow: 0 0 20px var(--accent-green), 0 0 40px var(--accent-green-glow); }
}

/* ---- Header ---- */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-logo {
    gap: 8px;
}

.logo-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--gradient-green);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.logo-icon-wrapper::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2), transparent 70%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.logo-icon {
    font-size: 20px;
    color: var(--bg-primary);
    font-weight: bold;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.logo-sub {
    font-size: 8px;
    font-weight: 600;
    color: var(--accent-green);
    letter-spacing: 3px;
    margin-top: 2px;
}

.header-balance {
    background: var(--gradient-green);
    padding: 8px 16px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.header-balance::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: balanceShimmer 3s infinite;
}

@keyframes balanceShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.header-balance:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-green);
}

.balance-refresh {
    font-size: 16px;
    color: var(--bg-primary);
    animation: spin 2s linear infinite;
    animation-play-state: paused;
}

.balance-refresh.spinning {
    animation-play-state: running;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.balance-amount {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--bg-primary);
    letter-spacing: 0.5px;
}

.header-menu-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: var(--transition);
}

.header-menu-btn:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    box-shadow: inset 0 0 10px var(--accent-green-glow);
}

/* ---- Side Menu ---- */
.side-menu-canvas {
    background: var(--bg-secondary) !important;
    border-left: 1px solid var(--border-color) !important;
    width: 300px !important;
}

.menu-avatar ion-icon {
    font-size: 48px;
    color: var(--accent-green);
}

.menu-balance-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.menu-balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--accent-green-glow) 0%, transparent 70%);
    opacity: 0.3;
}

.menu-balance-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-balance-amount {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-green);
    margin: 4px 0;
}

.menu-balance-growth {
    font-size: 12px;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 4px;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.side-nav-item:hover, .side-nav-item.active {
    background: rgba(0, 230, 118, 0.08);
    color: var(--accent-green);
}

.side-nav-item ion-icon {
    font-size: 20px;
}

.menu-divider {
    border-color: var(--border-color);
    margin: 8px 0;
}

/* ---- App Content ---- */
.app-content {
    padding-top: var(--header-height);
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
    position: relative;
    z-index: 1;
}

/* ---- Pair Selector ---- */
.pair-selector-wrapper {
    padding: 12px 16px 0;
}

.pair-selector {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
}

.pair-selector:hover {
    border-color: var(--accent-green);
    box-shadow: 0 0 15px var(--accent-green-glow);
}

.pair-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-right: 10px;
}

.pair-name {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

.pair-arrow {
    font-size: 18px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.pair-selector:hover .pair-arrow {
    color: var(--accent-green);
}

/* ---- Trading Chart ---- */
.chart-container {
    padding: 12px 16px;
}

.trading-chart {
    width: 100%;
    height: 400px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

/* ---- Price Ticker ---- */
.price-ticker {
    padding: 0 16px;
    margin-bottom: 12px;
}

.ticker-grid {
    display: grid;
    grid-template-columns: auto 1fr 1fr 1fr;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
}

.ticker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ticker-item.ticker-live {
    flex-direction: row;
    gap: 6px;
}

.ticker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-green-glow); }
    50% { opacity: 0.5; box-shadow: 0 0 8px 4px var(--accent-green-glow); }
}

.ticker-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticker-value {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
}

.text-profit { color: var(--accent-green) !important; }
.text-loss { color: var(--accent-red) !important; }

/* ---- Trading Panel ---- */
.trading-panel {
    padding: 0 16px;
    margin-bottom: 16px;
}

.trade-input-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.trade-input-group:focus-within {
    border-color: var(--accent-green);
    box-shadow: 0 0 15px var(--accent-green-glow);
}

.input-icon-label {
    margin-bottom: 8px;
}

.currency-badge {
    background: var(--gradient-green);
    color: var(--bg-primary);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: 1px;
}

.trade-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    outline: none;
    transition: var(--transition);
    margin-bottom: 10px;
}

.trade-input:focus {
    border-color: var(--accent-green);
}

.trade-input::placeholder {
    color: var(--text-muted);
    font-size: 14px;
}

.quick-amounts {
    display: flex;
    gap: 8px;
}

.quick-amount-btn {
    flex: 1;
    padding: 6px;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.2);
    border-radius: var(--radius-sm);
    color: var(--accent-green);
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-display);
    cursor: pointer;
    transition: var(--transition);
}

.quick-amount-btn:hover {
    background: rgba(0, 230, 118, 0.15);
    border-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green-glow);
    transform: translateY(-1px);
}

/* ---- Duration Selector ---- */
.duration-selector {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin-bottom: 12px;
    transition: var(--transition);
}

.duration-selector:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
}

.duration-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(0, 229, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.duration-icon ion-icon {
    font-size: 18px;
    color: var(--accent-cyan);
}

.duration-text {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.duration-arrow {
    font-size: 18px;
    color: var(--text-secondary);
}

/* ---- Profit Display ---- */
.profit-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.profit-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
}

.profit-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.profit-value {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
}

/* ---- Trade Buttons ---- */
.trade-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 6px 16px;
}

.trade-btn {
    position: relative;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
}

.trade-btn .btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.trade-btn .btn-icon {
    font-size: 16px;
    font-weight: 900;
}

.trade-btn .btn-label {
    font-family: var(--font-display);
    letter-spacing: 1.5px;
    font-size: 12px;
}

.trade-btn .btn-payout {
    font-size: 10px;
    opacity: 0.85;
    font-weight: 600;
    margin-left: 2px;
}

.trade-btn .btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 1;
}

.buy-btn {
    background: var(--gradient-green);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px var(--accent-green-glow);
}

.buy-btn .btn-glow {
    background: rgba(255, 255, 255, 0.15);
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-green-glow);
}

.buy-btn:active {
    transform: translateY(0) scale(0.97);
}

.buy-btn:active .btn-glow {
    width: 300px;
    height: 300px;
}

.sell-btn {
    background: var(--gradient-red);
    color: var(--text-primary);
    box-shadow: 0 4px 15px var(--accent-red-glow);
}

.sell-btn .btn-glow {
    background: rgba(255, 255, 255, 0.15);
}

.sell-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-red-glow);
}

.sell-btn:active {
    transform: translateY(0) scale(0.97);
}

.sell-btn:active .btn-glow {
    width: 300px;
    height: 300px;
}

/* Duration Bar */
.duration-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 16px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.duration-bar:active {
    transform: scale(0.98);
    border-color: var(--accent-blue);
}

.duration-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.duration-bar-left ion-icon {
    font-size: 18px;
    color: var(--accent-blue);
}

.duration-bar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    font-family: var(--font-display);
}

.duration-bar-right ion-icon {
    font-size: 14px;
    color: var(--text-muted);
}

/* Button press animation */
@keyframes btnPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.trade-btn.pressing {
    animation: btnPress 0.3s ease;
}

/* ---- Active Trades Section ---- */
.active-trades-section {
    padding: 0 16px;
    margin-bottom: 16px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.section-title ion-icon {
    color: var(--accent-green);
    font-size: 18px;
}

.trade-count {
    background: var(--accent-green);
    color: var(--bg-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-xl);
    font-family: var(--font-display);
}

.active-trades-list {
    max-height: 300px;
    overflow-y: auto;
}

.empty-trades {
    text-align: center;
    padding: 30px;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
}

.empty-icon {
    font-size: 40px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.empty-trades p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
}

.empty-trades small {
    color: var(--text-muted);
    font-size: 12px;
}

/* Active Trade Card */
.trade-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
    animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.trade-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
}

.trade-card.buy::before { background: var(--accent-green); }
.trade-card.sell::before { background: var(--accent-red); }

.trade-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.trade-card-pair {
    font-weight: 600;
    font-size: 14px;
}

.trade-card-badge {
    padding: 2px 10px;
    border-radius: var(--radius-xl);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: var(--font-display);
}

.trade-card-badge.buy {
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-green);
}

.trade-card-badge.sell {
    background: rgba(255, 23, 68, 0.15);
    color: var(--accent-red);
}

.trade-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.trade-card-detail {
    text-align: center;
}

.trade-card-detail-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.trade-card-detail-value {
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-display);
}

.trade-card-timer {
    background: rgba(0, 229, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.trade-card-timer-label {
    font-size: 11px;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    gap: 4px;
}

.trade-card-timer-value {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-cyan);
    animation: timerBlink 1s ease infinite;
}

@keyframes timerBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Trade progress bar */
.trade-progress {
    height: 3px;
    background: rgba(0, 229, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.trade-progress-bar {
    height: 100%;
    background: var(--accent-cyan);
    border-radius: 2px;
    transition: width 1s linear;
    position: relative;
}

.trade-progress-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 6px var(--accent-cyan);
}

/* ---- Market Overview ---- */
.market-overview {
    padding: 0 16px;
    margin-bottom: 20px;
}

.market-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.market-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.market-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at top right, var(--accent-green-glow), transparent 60%);
    opacity: 0;
    transition: var(--transition);
}

.market-card:hover {
    border-color: var(--accent-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.market-card:hover::after {
    opacity: 1;
}

.market-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.market-pair-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.market-pair-name {
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-display);
    letter-spacing: 0.5px;
}

.market-card-price {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.market-card-change {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---- Bottom Navigation ---- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: rgba(10, 14, 23, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    padding: 0 10px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    transition: var(--transition);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    position: relative;
}

.bottom-nav-item ion-icon {
    font-size: 22px;
    transition: var(--transition);
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--accent-green);
}

.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-green);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent-green-glow);
}

.bottom-nav-item.profile-btn .profile-btn-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--gradient-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -22px;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 15px var(--accent-green-glow);
    transition: var(--transition);
}

.bottom-nav-item.profile-btn .profile-btn-circle ion-icon {
    font-size: 22px;
    color: var(--bg-primary);
}

.bottom-nav-item.profile-btn:hover .profile-btn-circle {
    transform: scale(1.1);
    box-shadow: 0 0 25px var(--accent-green-glow);
}

/* ---- Modals ---- */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.trading-modal {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
}

.trading-modal .modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}

.trading-modal .modal-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.trading-modal .modal-body {
    padding: 16px 20px;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

.search-input {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    padding: 12px 14px 12px 42px !important;
    font-size: 14px;
}

.search-input:focus {
    border-color: var(--accent-green) !important;
    box-shadow: 0 0 10px var(--accent-green-glow) !important;
}

.search-input::placeholder {
    color: var(--text-muted) !important;
}

/* Fix modal clickability */
.modal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1055 !important;
}

.offcanvas {
    z-index: 1080 !important;
}

.offcanvas-backdrop {
    z-index: 1070 !important;
}

/* ---- Bottom Sheet ---- */
.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    z-index: 2001;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
}

.bottom-sheet.open {
    transform: translateY(0);
}

.sheet-handle {
    display: flex;
    justify-content: center;
    padding: 10px 0 4px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.sheet-handle-bar {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: var(--text-muted);
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px 14px;
    border-bottom: 1px solid var(--border-color);
}

.sheet-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
    margin: 0;
}

.sheet-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.sheet-close:hover {
    background: rgba(255, 23, 68, 0.15);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.sheet-body {
    padding: 14px 20px 30px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

/* Pair List */
.pair-list-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
    border: 1px solid transparent;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.pair-list-item:hover {
    background: rgba(0, 230, 118, 0.08);
    border-color: rgba(0, 230, 118, 0.15);
}

.pair-list-item:active {
    background: rgba(0, 230, 118, 0.15);
    border-color: var(--accent-green);
    transform: scale(0.98);
}

.pair-list-item.selected {
    background: rgba(0, 230, 118, 0.1);
    border-color: var(--accent-green);
}

.pair-list-item.selected .pair-list-arrow {
    color: var(--accent-green);
}

.pair-list-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

.pair-list-info {
    flex: 1;
    min-width: 0;
}

.pair-list-symbol {
    font-weight: 600;
    font-size: 14px;
    font-family: var(--font-display);
}

.pair-list-name {
    font-size: 12px;
    color: var(--text-secondary);
}

.pair-list-arrow {
    color: var(--text-muted);
    font-size: 16px;
    flex-shrink: 0;
}

/* Duration List */
.duration-list-item {
    display: flex;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
    gap: 12px;
    border: 1px solid transparent;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.duration-list-item:hover {
    background: rgba(0, 229, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.15);
}

.duration-list-item:active {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--accent-cyan);
    transform: scale(0.98);
}

.duration-list-item.selected {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--accent-cyan);
}

.duration-list-item.selected .duration-list-icon,
.duration-list-item.selected .duration-list-label {
    color: var(--accent-cyan);
}

.duration-list-icon {
    color: var(--accent-cyan);
    font-size: 22px;
    flex-shrink: 0;
}

.duration-list-label {
    flex: 1;
    font-weight: 500;
    font-size: 15px;
}

.duration-list-arrow {
    color: var(--text-muted);
    font-size: 16px;
    flex-shrink: 0;
}

/* ---- Trade Result Modal ---- */
.trade-result-modal {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
}

.result-icon-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    animation: resultPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes resultPop {
    0% { transform: scale(0); }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.result-icon {
    font-size: 60px;
}

.result-icon.win { color: var(--accent-green); }
.result-icon.lose { color: var(--accent-red); }

.result-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.result-message {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.result-details {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 10px;
}

.result-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.result-detail-row:last-child {
    border-bottom: none;
}

.result-detail-row span:first-child {
    color: var(--text-secondary);
}

.result-detail-row span:last-child {
    font-weight: 600;
    font-family: var(--font-display);
    font-size: 12px;
}

/* Glow Buttons */
.btn-glow-green {
    background: var(--gradient-green);
    border: none;
    color: var(--bg-primary);
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: 1px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition);
}

.btn-glow-green:hover {
    box-shadow: var(--shadow-green);
    transform: translateY(-1px);
    color: var(--bg-primary);
}

/* ---- Page Specific Styles ---- */

/* Login / Register Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #050b14;
    position: relative;
    overflow: hidden;
}

/* Animated grid overlay */
.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,230,118,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,230,118,0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridDrift 20s linear infinite;
    z-index: 0;
}

/* Radial glow – bottom left blue */
.auth-page::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(41,121,255,0.12), transparent 65%);
    bottom: -150px;
    left: -150px;
    z-index: 0;
    pointer-events: none;
}

@keyframes gridDrift {
    0%   { background-position: 0 0, 0 0; }
    100% { background-position: 60px 60px, 60px 60px; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Canvas candlestick background */
.auth-bg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

/* Top-right green glow orb */
.candle-bg {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,230,118,0.14), transparent 65%);
    top: -140px;
    right: -140px;
    z-index: 0;
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}

/* Floating price ticker strip */
.auth-ticker {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 32px;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 1;
    border-top: 1px solid rgba(0,230,118,0.08);
    background: rgba(5,11,20,0.7);
    backdrop-filter: blur(4px);
}

.auth-ticker-track {
    display: flex;
    gap: 48px;
    animation: tickerScroll 30s linear infinite;
    white-space: nowrap;
    padding: 0 24px;
}

.auth-ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-family: var(--font-mono, monospace);
    letter-spacing: 0.5px;
}

.auth-ticker-sym  { color: rgba(255,255,255,0.5); font-weight: 700; }
.auth-ticker-price { color: rgba(255,255,255,0.7); }
.auth-ticker-up   { color: #00e676; font-weight: 600; }
.auth-ticker-dn   { color: #ff1744; font-weight: 600; }

@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 2;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-lg);
    background: var(--gradient-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: var(--shadow-green);
}

.auth-logo-icon ion-icon {
    font-size: 36px;
    color: var(--bg-primary);
}

.auth-logo h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 3px;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
}

.auth-form-group {
    margin-bottom: 16px;
}

.auth-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input-wrapper ion-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
    transition: var(--transition);
}

.auth-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 14px 14px 44px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.auth-input:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green-glow);
}

.auth-input:focus + ion-icon,
.auth-input:focus ~ ion-icon {
    color: var(--accent-green);
}

.auth-input::placeholder {
    color: var(--text-muted);
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: var(--gradient-green);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    box-shadow: var(--shadow-green);
    transform: translateY(-2px);
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-link a {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Auth Alerts */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}
.auth-alert.error {
    background: rgba(255, 23, 68, 0.1);
    border: 1px solid rgba(255, 23, 68, 0.3);
    color: var(--accent-red);
}
.auth-alert.success {
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: var(--accent-green);
}
.auth-alert ion-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* Auth Select */
.auth-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 40px !important;
}
.auth-select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 10px;
}

/* ---- Profile Page ---- */
.profile-banner {
    background: linear-gradient(135deg, #0a0e17, #1a2236);
    padding: 40px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.profile-banner::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle at 30% 50%, var(--accent-green-glow) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, var(--accent-blue-glow) 0%, transparent 50%);
    animation: profileBg 8s ease-in-out infinite;
}

@keyframes profileBg {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, -10px) rotate(2deg); }
    66% { transform: translate(-10px, 10px) rotate(-2deg); }
}

.profile-avatar-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--gradient-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    position: relative;
    z-index: 2;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 20px var(--accent-green-glow);
}

.profile-avatar-wrapper ion-icon {
    font-size: 44px;
    color: var(--bg-primary);
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.profile-email {
    font-size: 13px;
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 16px;
    margin-top: -30px;
    position: relative;
    z-index: 3;
    margin-bottom: 20px;
}

.profile-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    text-align: center;
}

.profile-stat-value {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-green);
}

.profile-stat-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.profile-menu-section {
    padding: 0 16px;
    margin-bottom: 16px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.profile-menu-item:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    transform: translateX(4px);
}

.profile-menu-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
}

.profile-menu-icon.green { background: rgba(0, 230, 118, 0.1); color: var(--accent-green); }
.profile-menu-icon.blue { background: rgba(41, 121, 255, 0.1); color: var(--accent-blue); }
.profile-menu-icon.red { background: rgba(255, 23, 68, 0.1); color: var(--accent-red); }
.profile-menu-icon.gold { background: rgba(255, 215, 64, 0.1); color: var(--accent-gold); }
.profile-menu-icon.cyan { background: rgba(0, 229, 255, 0.1); color: var(--accent-cyan); }
.profile-menu-icon.purple { background: rgba(124, 77, 255, 0.1); color: var(--accent-purple); }

.profile-menu-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.profile-menu-arrow {
    color: var(--text-muted);
    font-size: 18px;
}

/* ---- Withdraw Page ---- */
.withdraw-page {
    padding: 16px;
}

.withdraw-balance-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.withdraw-balance-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--accent-green-glow), transparent 60%);
    opacity: 0.5;
}

.withdraw-balance-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
}

.withdraw-balance-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--accent-green);
    position: relative;
    z-index: 2;
    margin: 8px 0;
}

.withdraw-form-group {
    margin-bottom: 16px;
}

.withdraw-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.withdraw-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 16px;
    outline: none;
    transition: var(--transition);
}

.withdraw-input:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green-glow);
}

/* ---- Custom Select (Dark Theme) ---- */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.custom-select-trigger:hover {
    border-color: var(--accent-green);
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green-glow);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-select-value {
    flex: 1;
}

.custom-select-value.placeholder {
    color: var(--text-muted);
}

.custom-select-arrow {
    font-size: 18px;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(180deg);
    color: var(--accent-green);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--accent-green);
    border-top: none;
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.custom-select-wrapper.open .custom-select-options {
    max-height: 260px;
    overflow-y: auto;
    opacity: 1;
}

.custom-select-option {
    padding: 12px 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    -webkit-tap-highlight-color: transparent;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: rgba(0, 230, 118, 0.1);
    color: var(--accent-green);
}

.custom-select-option:active {
    background: rgba(0, 230, 118, 0.2);
}

.custom-select-option.selected {
    background: rgba(0, 230, 118, 0.12);
    color: var(--accent-green);
    font-weight: 600;
}

.custom-select-option.selected::after {
    content: '\2713';
    margin-left: auto;
    color: var(--accent-green);
    font-weight: 700;
}

/* Also keep native select fix as fallback */
select.withdraw-input,
select.trade-input,
select.auth-input,
select.form-select {
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    cursor: pointer;
}

select option {
    background-color: #1a2236 !important;
    color: #ffffff !important;
    padding: 12px 14px;
}

.withdraw-method-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.withdraw-method-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.withdraw-method-card.selected {
    border-color: var(--accent-green);
    background: rgba(0, 230, 118, 0.05);
}

.withdraw-method-card:hover {
    border-color: var(--accent-green);
}

.withdraw-method-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.withdraw-method-name {
    font-size: 12px;
    font-weight: 600;
}

/* ---- Blog Page ---- */
.blog-page {
    padding: 16px;
}

.blog-header {
    margin-bottom: 20px;
}

.blog-header h4 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
    transition: var(--transition);
}

.blog-card:hover {
    border-color: var(--accent-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.blog-card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-image ion-icon {
    font-size: 40px;
    color: var(--text-muted);
}

.blog-card-body {
    padding: 14px;
}

.blog-card-category {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.blog-card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.blog-card-excerpt {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted);
}

.blog-card-meta ion-icon {
    font-size: 14px;
}

/* ---- Support Page ---- */
.support-header {
    text-align: center;
    padding: 30px 16px;
}

.support-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(0, 230, 118, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    animation: supportPulse 2s ease-in-out infinite;
}

@keyframes supportPulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--accent-green-glow); }
    50% { box-shadow: 0 0 20px 10px var(--accent-green-glow); }
}

.support-icon-wrapper ion-icon {
    font-size: 32px;
    color: var(--accent-green);
}

.support-channels {
    padding: 0 16px;
}

.support-channel-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.support-channel-card:hover {
    border-color: var(--accent-green);
    transform: translateX(4px);
    color: var(--text-primary);
}

.support-channel-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 14px;
}

/* ---- Animations ---- */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to { transform: scale(4); opacity: 0; }
}

/* Trading candle animation for backgrounds */
.candle-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.candle {
    position: absolute;
    width: 4px;
    background: var(--accent-green);
    opacity: 0.03;
    animation: candleDrift 15s linear infinite;
}

@keyframes candleDrift {
    0% { transform: translateY(100vh) rotate(0); }
    100% { transform: translateY(-100vh) rotate(180deg); }
}

/* ---- History Page ---- */
.history-page {
    padding: 16px;
}

.history-tabs {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 16px;
}

.history-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
}

.history-tab.active {
    background: var(--gradient-green);
    color: var(--bg-primary);
}

.history-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.history-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
}

.history-card.win::before { background: var(--accent-green); }
.history-card.loss::before { background: var(--accent-red); }
.history-card.pending::before { background: var(--accent-gold); }

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-pair {
    font-weight: 600;
    font-size: 14px;
}

.history-result {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
}

.history-result.win { color: var(--accent-green); }
.history-result.loss { color: var(--accent-red); }
.history-result.pending { color: var(--accent-gold); }

.history-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.history-detail {
    text-align: center;
}

.history-detail-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.history-detail-value {
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-display);
}

/* ---- Responsive ---- */
@media (max-width: 400px) {
    .header-balance {
        padding: 6px 12px;
    }
    
    .balance-amount {
        font-size: 11px;
    }
    
    .trading-chart {
        height: 320px;
    }
    
    .trade-buttons {
        gap: 6px;
        padding: 5px 16px;
    }
    
    .trade-btn {
        padding: 7px 8px;
    }
    
    .ticker-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .duration-bar {
        margin: 0 16px;
    }
}

@media (min-width: 768px) {
    .trading-chart {
        height: 500px;
    }
    
    .trade-buttons {
        gap: 10px;
        padding: 8px 16px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .trade-btn {
        padding: 10px 14px;
    }
    
    .trade-btn .btn-icon {
        font-size: 18px;
    }
    
    .trade-btn .btn-label {
        font-size: 13px;
    }
    
    .market-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .app-content {
        max-width: 480px;
        margin: 0 auto;
    }
    
    .bottom-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
}

/* ---- Utility ---- */
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-cyan { color: var(--accent-cyan); }
.text-gold { color: var(--accent-gold); }
.bg-green-soft { background: rgba(0, 230, 118, 0.1); }
.bg-red-soft { background: rgba(255, 23, 68, 0.1); }
