/* 
 * ThaiBo - Premium Design System (Responsive Edition)
 * Modern Dark Mode with Glassmorphism and Neon Accents
 */

:root {
    /* Color Palette */
    --bg-main: #0a0b10;
    --bg-card: rgba(22, 24, 35, 0.8);
    --bg-nav: rgba(10, 11, 16, 0.95);
    
    --primary: #00d2ff;
    --primary-glow: rgba(0, 210, 255, 0.5);
    --secondary: #9d50bb;
    --secondary-glow: rgba(157, 80, 187, 0.5);
    
    --success: #00ffa3;
    --danger: #ff4b5c;
    --warning: #ffb800;
    
    --text-main: #ffffff;
    --text-muted: #8e8e93;
    --text-dim: #5c5c5c;
    
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    /* Layout */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --sidebar-width: 260px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-padding: 40px;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Gradients */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.glow-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.1;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.circle-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -150px;
    left: -150px;
}

/* Glassmorphism */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass:hover {
    border-color: var(--border-hover);
}

/* Typography & Layout */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; }
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* Navigation */
.navbar {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--container-padding);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-auth {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Responsive Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-main);
    z-index: 1100;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 10px 20px -5px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

/* Form Elements */
.input-group { margin-bottom: 20px; }
.input-label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.9rem; }
.input-field {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 1rem;
    transition: var(--transition);
}

/* Grid & Layout Utilities */
.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Media Queries */

/* Tablet (iPad & Smaller Laptops) */
@media (max-width: 1024px) {
    :root {
        --container-padding: 20px;
    }
    
    .navbar { padding: 0 20px; }
    .nav-links { gap: 15px; font-size: 0.9rem; }
}

/* Mobile (Smartphones) */
@media (max-width: 768px) {
    .hamburger { display: block; }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-nav);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition);
        z-index: 1050;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    
    .nav-links.active { right: 0; }
    
    /* Hide specific nav items on mobile if needed */
    .nav-auth {
        gap: 10px;
    }
    
    .btn { padding: 8px 16px; font-size: 0.9rem; }
    
    .trade-layout {
        grid-template-columns: 1fr !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Stack charts and markets */
    .trade-col-left, .trade-col-mid, .trade-col-right {
        order: unset;
        height: auto !important;
    }
    
    .market-table-container {
        overflow-x: auto;
    }
    
    .hero-section {
        padding: 60px 20px;
        text-align: center;
    }
    
    h1 { font-size: 2.2rem !important; }
}

/* Small Mobile */
@media (max-width: 480px) {
    .navbar { height: 60px; }
    .logo h2 { font-size: 1.2rem !important; }
    #exchange-rate-ticker { display: none; }
    
    .btn { padding: 6px 12px; }
}
