/* ============================================
   Calquate - Calorie Calculator & Tracker
   Modern Dark Theme with Electric Accents
   ============================================ */

:root {
    /* Color Palette - Electric Energy Theme */
    --primary: #fbbf24;
    --primary-dark: #f59e0b;
    --primary-light: #fcd34d;
    --secondary: #a855f7;
    --secondary-light: #c084fc;
    --accent-blue: #3b82f6;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-cyan: #06b6d4;
    
    /* Neutrals - Deep Space */
    --bg-dark: #09090b;
    --bg-card: #18181b;
    --bg-card-hover: #27272a;
    --bg-input: #18181b;
    --bg-elevated: #1f1f23;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border: #27272a;
    --border-light: #3f3f46;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    --gradient-secondary: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    --gradient-hero: linear-gradient(135deg, #fbbf24 0%, #a855f7 100%);
    --gradient-glow: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.15) 0%, transparent 70%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(251, 191, 36, 0.3);
    --shadow-glow-purple: 0 0 40px rgba(168, 85, 247, 0.3);
    
    /* Spacing */
    --nav-height: 70px;
    --container-max: 1200px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% -20%, rgba(251, 191, 36, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Grid Pattern Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(251, 191, 36, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(251, 191, 36, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-light);
}

/* ============================================
   Logo
   ============================================ */

.logo-mark {
    position: relative;
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.logo-mark.small {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.logo-c {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--bg-dark);
    line-height: 1;
}

.logo-mark.small .logo-c {
    font-size: 1.1rem;
}

.logo-bolt {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 0.875rem;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.8));
}

.logo-mark.small .logo-bolt {
    font-size: 0.7rem;
    bottom: -3px;
    right: -3px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-text {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-link-logout {
    color: var(--accent-red);
}

.nav-link-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.btn-nav {
    background: var(--gradient-primary);
    color: var(--bg-dark) !important;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
}

.btn-nav:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        width: 100%;
        padding: 1rem;
        text-align: center;
    }
}

/* ============================================
   Flash Messages
   ============================================ */

.flash-container {
    position: fixed;
    top: calc(var(--nav-height) + 1rem);
    right: 1rem;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

.flash {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
    border: 1px solid;
}

.flash-success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.flash-error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.flash-warning {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    color: var(--primary-light);
}

.flash-info {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.flash-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================================
   Main Content
   ============================================ */

.main-content {
    margin-top: var(--nav-height);
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: var(--container-max);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--border-light);
}

.card-glow:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ============================================
   Forms
   ============================================ */

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-input,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    cursor: pointer;
}

.form-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* Radio & Checkbox */
.form-radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.form-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-radio input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--accent-red);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Progress Bars & Stats
   ============================================ */

.progress-container {
    background: var(--bg-input);
    border-radius: var(--radius-full);
    height: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.progress-calories { background: var(--gradient-primary); }
.progress-protein { background: linear-gradient(90deg, #a855f7, #c084fc); }
.progress-carbs { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.progress-fat { background: linear-gradient(90deg, #ef4444, #f87171); }

.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-value {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-value-gold {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-value-purple {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   Grid System
   ============================================ */

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Tables
   ============================================ */

.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

tr:hover td {
    background: var(--bg-card);
}

tr:last-child td {
    border-bottom: none;
}

/* ============================================
   Food Search & Results
   ============================================ */

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-input {
    width: 100%;
    padding: 1.25rem 1.5rem 1.25rem 3.5rem;
    font-size: 1.125rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.25rem;
}

.food-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    cursor: pointer;
}

.food-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.food-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--bg-input);
}

.food-info {
    flex: 1;
}

.food-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.food-brand {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.food-macros {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.macro-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.macro-calories { color: var(--primary-light); }
.macro-protein { color: var(--secondary-light); }
.macro-carbs { color: #60a5fa; }
.macro-fat { color: #f87171; }

/* ============================================
   Modal
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 1px solid var(--border);
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ============================================
   Barcode Scanner
   ============================================ */

.scanner-container {
    max-width: 500px;
    margin: 0 auto;
}

.scanner-preview {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px dashed var(--border);
}

.scanner-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-frame {
    width: 70%;
    aspect-ratio: 3/1;
    border: 3px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

.scanner-line {
    position: absolute;
    left: 15%;
    right: 15%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0%, 100% { top: 35%; }
    50% { top: 65%; }
}

/* ============================================
   Dashboard
   ============================================ */

.dashboard-header {
    margin-bottom: 2rem;
}

.greeting {
    color: var(--text-muted);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.calorie-ring {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
}

.calorie-ring svg {
    transform: rotate(-90deg);
}

.calorie-ring-bg {
    fill: none;
    stroke: var(--bg-input);
    stroke-width: 12;
}

.calorie-ring-progress {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
}

.calorie-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.calorie-remaining {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.calorie-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================
   Meal Section
   ============================================ */

.meal-section {
    margin-bottom: 1.5rem;
}

.meal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
}

.meal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.meal-icon {
    font-size: 1.5rem;
}

.meal-calories {
    color: var(--primary-light);
    font-weight: 600;
}

.meal-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 1rem;
}

.meal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.meal-item:hover {
    border-color: var(--border);
}

.meal-item-info {
    flex: 1;
}

.meal-item-name {
    font-weight: 500;
}

.meal-item-serving {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.meal-item-calories {
    color: var(--text-secondary);
    margin-right: 1rem;
}

.meal-item-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.meal-item-delete:hover {
    color: var(--accent-red);
}

/* ============================================
   Hero Section (Home)
   ============================================ */

.hero {
    text-align: center;
    padding: 4rem 1rem 6rem;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 1.5rem;
    line-height: 1;
}

.hero-title .highlight {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.hero-stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
}

.feature-card {
    text-align: left;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.feature-desc {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   Auth Pages
   ============================================ */

.auth-container {
    max-width: 440px;
    margin: 2rem auto;
}

.auth-card {
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-title {
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-muted);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
}

/* ============================================
   Loading States
   ============================================ */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Empty States
   ============================================ */

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-title {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================
   Utilities
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.hidden { display: none; }

/* Text Colors */
.text-gold { color: var(--primary); }
.text-purple { color: var(--secondary); }
.text-blue { color: var(--accent-blue); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 640px) {
    .main-content {
        padding: 1rem;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .hero {
        padding: 2rem 1rem 4rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .hero-stat-value {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .calorie-ring {
        width: 160px;
        height: 160px;
    }
    
    .calorie-remaining {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
}
