@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Roboto+Mono&display=swap');

:root {
    --bg-color: #08090a;
    --surface-color: #121417;
    --surface-hover: #1c1f24;
    --accent-blue: #3b82f6;
    --accent-emerald: #10b981;
    --accent-neon: #00f2ff;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(18, 20, 23, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Components */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
}

/* Dashboard Widgets */
.grid-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-value {
    font-family: 'Roboto Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.change-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.change-up { color: var(--accent-emerald); }
.change-down { color: #ef4444; }

/* Table Styling */
.table-container {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-color);
}

th {
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem;
}

tr:hover td {
    background: var(--surface-hover);
}

/* Header & Nav */
header {
    height: 72px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(8, 9, 10, 0.7);
    backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

header.scrolled {
    height: 64px;
    background: rgba(8, 9, 10, 0.9);
    border-bottom: 1px solid var(--accent-blue);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-blue);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: white;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
    color: white;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-fade { animation: fadeIn 0.8s ease-out forwards; }
.animate-slide { animation: slideUp 0.6s ease-out forwards; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 1024px) {
    .charts-row { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
    .container { padding: 0 1.25rem; }
    
    header { height: 64px; }
    .nav-links { display: none; }
    #mobile-menu-toggle { display: block !important; }
    
    .hero h1 { font-size: 2.5rem !important; }
    .hero p { font-size: 1rem !important; }
    
    .grid-dashboard { 
        grid-template-columns: 1fr !important; 
        gap: 1rem;
    }
    
    .dashboard { margin-top: 0 !important; }
    
    footer .container {
        grid-template-columns: 1fr !important;
        gap: 2.5rem;
        text-align: center;
    }
    
    footer .logo { justify-content: center; }
    
    .stat-value { font-size: 1.5rem; }
    
    .logo-wrapper .logo { font-size: 1rem; }
    .logo-wrapper span:last-child { display: none; } /* Hide "Official Data Source" on very small screens if needed */
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem !important; }
    .btn { width: 100%; justify-content: center; }
    .hero .search-container { margin-bottom: 2rem !important; }
}
