/* CSS Variables & Core Design System */
:root {
    /* Dark Theme (Default) Palette */
    --bg-gradient: radial-gradient(circle at 15% 15%, #131927 0%, #0b0e14 100%);
    --card-bg: rgba(23, 31, 46, 0.75);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-glow: rgba(0, 230, 153, 0.15);

    --primary-accent: #00e699;
    --primary-glow: rgba(0, 230, 153, 0.35);
    --secondary-accent: #f5b027;
    --gold-glow: rgba(245, 176, 39, 0.3);

    --text-main: #f0f4f8;
    --text-muted: #8e9bb0;
    --text-inverse: #0b0e14;

    --buy-color: #00e699;
    --sell-color: #ff5252;

    --font-family: 'Kantumruy Pro', 'Outfit', sans-serif;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Overrides - High Contrast & Crisp Readability */
body.light-theme {
    --bg-gradient: linear-gradient(135deg, #eef2f6 0%, #e2e8f0 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(0, 0, 0, 0.1);
    --card-glow: rgba(0, 168, 107, 0.15);

    --primary-accent: #008756; /* Rich emerald green for light bg */
    --primary-glow: rgba(0, 135, 86, 0.2);
    --secondary-accent: #d97706; /* Rich warm amber */
    --gold-glow: rgba(217, 119, 6, 0.2);

    --text-main: #0f172a; /* Deep charcoal black for sharp legibility */
    --text-muted: #475569; /* Slate gray for secondary text */
    --text-inverse: #ffffff;

    --buy-color: #059669; /* Clear buy rate green */
    --sell-color: #dc2626; /* Clear sell rate red */
}

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

body {
    font-family: var(--font-family);
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

.app-container {
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header Styles */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f5b027, #e67e22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    box-shadow: 0 0 20px var(--gold-glow);
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, var(--text-main), var(--primary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text .subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(0, 135, 86, 0.1);
    border: 1px solid rgba(0, 135, 86, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary-accent);
    font-weight: 600;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-accent);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* Layout Grid */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1fr;
    gap: 24px;
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Glass Panel Component */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel.highlight-border {
    border-color: rgba(0, 135, 86, 0.25);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12), 0 0 30px rgba(0, 135, 86, 0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 14px;
}

.card-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

.card-header h2 i {
    color: var(--primary-accent);
}

.timestamp {
    font-size: 0.78rem;
    color: var(--text-muted);
}
