/* ============================================
   Variables, Reset & Base Styles
   ============================================ */

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-panel: #1a1a2e;
    --bg-input: #16213e;
    --border: #2a2a4a;
    --primary: #e94560;
    --primary-dark: #c73550;
    --secondary: #0f3460;
    --accent: #533483;
    --gold: #f5c842;
    --green: #4ade80;
    --red: #ef4444;
    --blue: #3b82f6;
    --text: #e8e8e8;
    --text-dim: #8888aa;
    --text-muted: #555577;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --glow-primary: 0 0 20px rgba(233, 69, 96, 0.3);
    --glow-gold: 0 0 15px rgba(245, 200, 66, 0.25);
    --glow-green: 0 0 15px rgba(74, 222, 128, 0.25);
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--accent));
    --gradient-gold: linear-gradient(135deg, #f5c842, #ff9800);
    --gradient-dark: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-panel) 100%);
    --card-bg: #12121a;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    background-image: url("../assets/splash.jpg");
    background-size: cover;
    background-position: center;
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Safe area support for notched phones */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Improve scrolling on mobile */
.tab-content, .chat-messages, .modal-body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* ---- Screens ---- */
.screen { display: none; }
.screen.active { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

/* ---- Shared Keyframes ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.2); }
    50% { box-shadow: 0 0 10px 3px rgba(245, 158, 11, 0.2); }
}
