/* MealQuest — Futuristic Dark Glassmorphism Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #0B0F19;
    --bg-card: rgba(30, 41, 59, 0.65);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --border-glass: rgba(255, 255, 255, 0.12);
    --border-glow: rgba(99, 102, 241, 0.4);
    
    --primary: #6366F1;
    --primary-gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    --accent-pink: #EC4899;
    --accent-pink-gradient: linear-gradient(135deg, #EC4899 0%, #F43F5E 100%);
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --text-dim: #64748B;
    
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
    --shadow-pink-glow: 0 0 25px rgba(236, 72, 153, 0.3);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(139, 92, 246, 0.12) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
}

/* Glassmorphic Container & Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px -10px rgba(99, 102, 241, 0.2);
}

.glass-card-interactive {
    cursor: pointer;
}

.glass-card-interactive:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.glass-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 16px 24px;
}

/* Buttons & Interactive Elements */
.btn-glow {
    background: var(--primary-gradient);
    color: #FFF;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
    color: #FFF;
}

.btn-pink {
    background: var(--accent-pink-gradient);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}

.btn-pink:hover {
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.6);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    color: #FFF;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.875rem;
    border-radius: 8px;
}

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
    background: rgba(15, 23, 42, 0.85);
}

/* Badges & Pills */
.badge-pill {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: #818CF8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Reward Active Banner */
.reward-active-banner {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
    border: 1px solid rgba(236, 72, 153, 0.4);
    border-radius: 16px;
    padding: 16px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-pink-glow);
    animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 15px rgba(236, 72, 153, 0.2); }
    100% { box-shadow: 0 0 30px rgba(236, 72, 153, 0.5); }
}

/* Game Arcade Container */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.game-card-view {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.game-card-view:hover {
    border-color: var(--accent-pink);
    transform: translateY(-5px);
    box-shadow: var(--shadow-pink-glow);
}

.game-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* Modal Dialog */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-dialog {
    background: #0F172A;
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    width: 100%;
    max-width: 520px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.modal-overlay.active .modal-dialog {
    transform: scale(1);
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.menu-item-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.menu-item-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.menu-item-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Tab Navigation */
.nav-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tab-item {
    padding: 10px 20px;
    color: var(--text-muted);
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    text-decoration: none;
}

.tab-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.tab-item.active {
    color: #FFF;
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FFF 0%, #A5B4FC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Confetti Container */
#confetti-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1050;
}
