/*
 * QSO Log Map - Base Styles
 * CSS variables (dark theme), reset, layout, sidebar
 */

:root {
    /* Core palette - deeper, richer blacks */
    --bg-primary: #050507;
    --bg-secondary: rgba(12, 12, 15, 0.85);
    --bg-tertiary: rgba(22, 22, 28, 0.7);
    --bg-elevated: rgba(30, 30, 38, 0.6);
    --bg-hover: rgba(45, 45, 55, 0.5);
    --bg-glass: rgba(15, 15, 20, 0.75);

    /* Text - warmer whites */
    --text-primary: #f0f0f2;
    --text-secondary: #9898a4;
    --text-muted: #6e6e7e;

    /* Accent - warm amber/gold (vintage radio dial) */
    --accent: #f0b429;
    --accent-secondary: #22d3ee;
    --accent-dim: #c9930a;
    --accent-glow: rgba(240, 180, 41, 0.12);
    --accent-glow-strong: rgba(240, 180, 41, 0.25);

    /* Band colors - slightly desaturated for elegance */
    --band-160m: #e25555;
    --band-80m: #e8803a;
    --band-60m: #d4a832;
    --band-40m: #7ab82e;
    --band-30m: #2eb87a;
    --band-20m: #2eb8a8;
    --band-17m: #2ea8d4;
    --band-15m: #4a8be8;
    --band-12m: #8a6ae8;
    --band-10m: #c84adf;
    --band-6m: #df4a8a;
    --band-2m: #e85a6a;
    --band-70cm: #e87a8a;
    --band-unknown: #6a6a78;

    /* Borders - subtle glass edges */
    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-default: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(240, 180, 41, 0.25);
    --border-glass: rgba(255, 255, 255, 0.06);

    /* Shadows - deeper, more dramatic */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    --shadow-glow: 0 0 30px var(--accent-glow);

    /* Spacing */
    --sidebar-width: 300px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition-fast: 120ms cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-normal: 200ms cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-slow: 350ms cubic-bezier(0.25, 0.1, 0.25, 1);

    /* Blur */
    --blur-sm: 8px;
    --blur-md: 16px;
    --blur-lg: 24px;

    /* Map tile filter */
    --map-filter: none;
    --map-tiles: 'dark';
}

/* Hidden attribute override */
[hidden] {
    display: none !important;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* App Container */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(240, 180, 41, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(34, 211, 238, 0.02) 0%, transparent 50%),
        var(--bg-primary);
}

/* ========================================
   SIDEBAR - Glassmorphism
   ======================================== */

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100%;
    background: var(--bg-glass);
    backdrop-filter: blur(var(--blur-lg));
    -webkit-backdrop-filter: blur(var(--blur-lg));
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: var(--shadow-inset), 4px 0 24px rgba(0, 0, 0, 0.3);
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px 18px;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 100%);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    color: var(--accent);
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(240, 180, 41, 0.1) 100%);
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    position: relative;
    z-index: 1;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
    line-height: inherit;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

/* Sidebar Content */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-content::-webkit-scrollbar {
    width: 5px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.sidebar-footer-links {
    display: flex;
    gap: 10px;
}

.sidebar-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}

.sidebar-footer-links a:hover {
    color: var(--accent);
}
