/* ==========================================================================
   FlowTap - Core Design System & Global Styles
   ========================================================================== */

:root {
    --bg-main: #0a0f1d;
    --card-bg: #131b2e;
    --card-border: rgba(255, 255, 255, 0.08);
    --accent-color: #00f2ff;
    --accent-glow: rgba(0, 242, 255, 0.65);
    --water-core: #00f2ff;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --gold: #fbbf24;
    --gold-glow: rgba(251, 191, 36, 0.5);
    --danger: #f43f5e;
    --success: #10b981;
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 20px var(--accent-glow);
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 242, 255, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 100%, rgba(139, 92, 246, 0.03) 0%, transparent 60%);
    color: var(--text-primary);
    font-family: var(--font-main);
    transition: background-color 0.4s ease;
}

/* App Viewport Container */
.app-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 14px 18px;
    position: relative;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

/* Background Ambient Glow Orbs */
.bg-ambient {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0,0,0,0) 70%);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
    filter: blur(50px);
    transition: background 0.4s ease;
}

.bg-ambient-top {
    top: -80px;
    left: -80px;
}

.bg-ambient-bottom {
    bottom: -80px;
    right: -80px;
}

/* Canvas Viewport */
.canvas-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    min-height: 280px;
    padding: 8px;
}

#gameCanvas {
    display: block;
    touch-action: none;
    cursor: pointer;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Glassmorphism Panel Utility */
.glass-panel {
    background: rgba(19, 27, 46, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-soft);
}
