/* ============================================
   ZipChats.online — Base Styles (Shared)
   ============================================ */

/* ---------- CSS Variables (Design System) ---------- */
:root {
    /* Backgrounds - Deep, Rich Tones */
    --bg-primary: #080a0c;
    --bg-secondary: #0d1117;
    --bg-tertiary: #161b22;
    --bg-card: rgba(22, 27, 34, 0.6);
    --bg-glass: rgba(13, 17, 23, 0.85);
    --bg-input: rgba(0, 0, 0, 0.4);
    --bg-hover: rgba(255, 255, 255, 0.05);
    
    /* Borders & Glows */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-active: rgba(5, 150, 105, 0.4);
    --glow-accent: rgba(5, 150, 105, 0.2);
    
    /* Text - High Contrast / Readability */
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #57606a;
    
    /* Accent Palette - Emerald Core */
    --accent: #10b981;
    --accent-dark: #059669;
    --accent-light: #34d399;
    --accent-glow: rgba(16, 185, 129, 0.15);
    
    /* Feedback Colors */
    --success: #2ea043;
    --warning: #d29922;
    --danger: #f85149;
    --info: #388bfd;
    
    /* Identity Colors */
    --male: #58a6ff;
    --female: #f69ad7;
    
    /* Spatial System */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.2);
    
    /* Layout */
    --sidebar-width: 360px;
    --header-height: 60px;
    --nav-height: 64px;
    
    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-brand: 'Inter', system-ui, sans-serif;
}

/* ---------- Light Theme Overrides ---------- */
[data-theme="light"] {
    --bg-primary: #f6f8fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f2f5;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.9);
    --bg-input: rgba(0, 0, 0, 0.03);
    --bg-hover: rgba(0, 0, 0, 0.04);
    
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-active: rgba(16, 185, 129, 0.4);
    
    --text-primary: #1f2328;
    --text-secondary: #636c76;
    --text-muted: #8c959f;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ---------- Global Reset ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 10px;
    opacity: 0.3;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ---------- View Management ---------- */
.view {
    display: none;
    height: 100vh;
    height: 100dvh;
}

.view.active {
    display: flex;
    flex-direction: column;
}

/* ---------- Modals (Glass Overlays) ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes messageFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseGlow { 0%, 100% { box-shadow: 0 0 10px var(--accent); } 50% { box-shadow: 0 0 20px var(--accent-light); } }

.hidden { display: none !important; }
