/* =================== BASE & VARIABLES =================== */
:root {
    --primary: #667eea;
    --primary-light: #8b9ef5;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --secondary-light: #9b6bc2;
    --success: #4caf50;
    --success-light: #81c784;
    --warning: #ff9800;
    --warning-light: #ffb74d;
    --danger: #f44336;
    --danger-light: #ef5350;
    --info: #2196f3;
    --info-light: #64b5f6;
    --dark: #1a202c;
    --dark-secondary: #2d3748;
    --light: #f7fafc;
    --light-secondary: #edf2f7;
    --gray: #a0aec0;
    --gray-light: #cbd5e0;
    --border: #e2e8f0;
    --bg: #f5f7fa;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.15);
}

[data-theme="dark"] {
    --bg: #0f1117;
    --white: #1a1d2e;
    --border: #2a2d3e;
    --dark: #e2e8f0;
    --gray: #94a3b8;
    --gray-light: #475569;
    --shadow: 0 2px 12px rgba(0,0,0,.35);
    --shadow-md: 0 4px 20px rgba(0,0,0,.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Common UI Components (Modals, Toasts, etc.) */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    z-index: 2000;
    padding: 16px;
}

.modal.show { display: flex; align-items: flex-end; }

.modal-content {
    background: var(--white);
    border-radius: 28px 28px 0 0;
    width: 100%; max-width: 520px;
    margin: auto; max-height: 90vh;
    overflow-y: auto;
}

.toast {
    position: fixed;
    bottom: 100px; left: 16px; right: 16px;
    background: var(--dark);
    color: white;
    padding: 16px 20px;
    border-radius: 16px;
    text-align: center;
    z-index: 3000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
