/* ===================================
   KUSEHAT PREMIERE RED: MASTER STYLE
   Unified, Non-Redundant, Premium
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
    /* --- RED THEME CORE --- */
    --primary-50: #fef2f2;
    --primary-100: #fee2e2;
    --primary-200: #fecaca;
    --primary-300: #fca5a5;
    --primary-400: #f87171;
    --primary-500: #ef4444;
    --primary-600: #dc2626;
    --primary-700: #b91c1c;
    --primary-800: #991b1b;
    --primary-900: #7f1d1d;

    /* --- BRAND COLORS --- */
    --blood-primary: #ef4444;
    --blood-dark: #7f1d1d;
    --blood-light: #fca5a5;

    /* --- SECONDARY/ACCENT --- */
    --accent-red: #f87171;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #f87171;

    /* --- DARK BACKGROUNDS --- */
    --bg-deep: #0a0a0a;
    --bg-darker: #050505;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.12);
    --border-glass-light: rgba(255, 255, 255, 0.2);

    /* --- TYPOGRAPHY --- */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --font-primary: 'Inter', sans-serif;
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-logo: 'Anton', sans-serif;

    /* --- GRADIENTS --- */
    --gradient-red: linear-gradient(135deg, #ef4444 0%, #7f1d1d 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    --gradient-light: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    --gradient-logo: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    --gradient-text: linear-gradient(135deg, #ffffff 0%, #fca5a5 50%, #ef4444 100%);

    /* --- EFFECTS --- */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(239, 68, 68, 0.3);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* --- CTA GRADIENTS --- */
    --gradient-cta: linear-gradient(135deg, #FF3D00 0%, #FF8F00 100%);
    --shadow-cta: 0 10px 30px -10px rgba(255, 61, 0, 0.5);
}

@keyframes pulse-gentle {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px -10px rgba(255, 61, 0, 0.5);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 15px 45px -10px rgba(255, 61, 0, 0.7);
    }
}

.animate-pulse-cta {
    animation: pulse-gentle 2s infinite ease-in-out;
}

.btn-cta-premium {
    background: var(--gradient-cta);
    color: white !important;
    box-shadow: var(--shadow-cta);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-cta-premium:hover {
    transform: translateY(-2px) scale(1.01);
    filter: brightness(1.1);
    box-shadow: 0 20px 50px -10px rgba(255, 61, 0, 0.6);
}

.btn-cta-premium::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0) 40%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0) 60%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(45deg);
    animation: shine 3s infinite ease-in-out;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    80% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background-color: #020202;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;

    /* ===================================
       MOBILE APP OPTIMIZATIONS (CLEANED)
       =================================== */

    /* Menghilangkan text selection pada UI (Opsional, matikan jika bermasalah) */
    /* user-select: none; */

    /* Support untuk Safe Area (Notch iPhone, Poni Android) */
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Global Background - DEEP RED SPOTLIGHT */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 30%, rgba(220, 38, 38, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(127, 29, 29, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #050505 0%, #1a0505 50%, #020202 100%);
    background-size: 200% 200%;
    animation: gradientFlow 15s ease infinite;
}

@keyframes gradientFlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ===================================
   MOBILE APP: ALLOW TEXT SELECTION
   Izinkan text selection pada elemen yang memerlukan
   =================================== */
input,
textarea,
select,
[contenteditable="true"],
.article-content,
.blog-content,
p.selectable,
code,
pre {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    cursor: text;
}

/* Tombol dan link tetap tidak bisa diselect */
button,
a,
.btn,
.nav-link,
.tool-card {
    user-select: none !important;
    -webkit-user-select: none !important;
    cursor: pointer;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* ===================================
   COMMON UI COMPONENTS
   =================================== */

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 12px 48px rgba(239, 68, 68, 0.25);
}

/* Gradient Utilities for Stat Icons - RED THEME SYNC */
.bmi-gradient {
    background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

.water-gradient {
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.calorie-gradient {
    background: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
    box-shadow: 0 4px 15px rgba(251, 113, 133, 0.3);
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    align-self: center;
}

@media (max-width: 768px) {
    .stat-divider {
        display: none;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-display);
}

.btn-primary {
    background: var(--gradient-red);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-primary:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

/* SVGs - UNIVERSAL FIX */
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.tool-icon,
.stat-icon,
.category-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon svg,
.stat-icon svg {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 4px 10px rgba(239, 68, 68, 0.4));
}

/* Force Red Theme on all Icons */
.tool-icon svg *,
.page-icon svg * {
    stroke: var(--primary-500) !important;
    fill: none;
}

.tool-icon svg [fill],
.page-icon svg [fill] {
    fill: var(--primary-500) !important;
}


/* ===================================
   GENERIC UTILITIES
   =================================== */
/* ===================================
   HEADER & NAVIGATION
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.875rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6));
}

.logo-text {
    font-family: var(--font-logo);
    font-size: 1.6rem;
    color: white;
    letter-spacing: 0.5px;
}

.logo-accent {
    background: var(--gradient-red);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Nav Menu */
.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-400);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.dropdown-menu {
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 240px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--primary-400);
}

/* ===================================
   DASHBOARD & STATISTICS
   =================================== */
.dashboard-header {
    padding: 10rem 0 2rem;
}

.greeting-title {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 6vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: white;
}

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

/* Dashboard Greeting */
.greeting-section {
    margin-bottom: 2rem;
}

.greeting-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Unified Stats Card - THE FIX */
.unified-stats-card {
    padding: 2.5rem 2rem;
    margin-top: 2rem;
    position: relative;
    border-radius: var(--radius-xl);
    background: rgba(13, 13, 13, 0.4);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 0.5rem 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.stats-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.15);
    color: var(--primary-400);
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.stats-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Stat Item Structure */
.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    padding: 1.5rem 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.stat-item:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
}

.stat-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

@media (max-width: 768px) {
    .stats-grid {
        flex-direction: column;
        gap: 2rem;
    }

    .stat-divider {
        display: none;
    }
}

.stat-card {
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-info h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.stat-unit {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dim);
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-red);
    border-radius: 10px;
    transition: width 1s ease;
}

/* ===================================
   TOOLS & CALCULATORS
   =================================== */
.section-header {
    text-align: center;
    margin: 4rem 0 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    padding: 2rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.tool-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem;
    color: white;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.feature-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-300);
    background: rgba(239, 68, 68, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.tool-cta {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-400);
}

.tool-cta svg {
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-cta svg {
    transform: translateX(4px);
}

/* Page Headers for Tools */
.page-header {
    padding: 10rem 0 4rem;
    text-align: center;
    border-bottom: 1px solid var(--border-glass);
    background: radial-gradient(circle at 50% 100%, rgba(239, 68, 68, 0.08) 0%, transparent 60%);
}

.page-icon {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.page-icon svg {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.5));
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===================================
   CALORIE CALCULATOR SPECIFICS
   =================================== */
.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 3rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1.5px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    transition: var(--transition);

    /* Izinkan text selection pada input */
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.form-input:focus {
    border-color: var(--primary-500);
    outline: none;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Gender Selector - Premium Red */
.gender-selector {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.gender-option {
    flex: 1;
    cursor: pointer;
    position: relative;
}

.gender-option input {
    display: none;
}

.gender-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--border-glass);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.gender-option input:checked+.gender-box {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--primary-500);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

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

.gender-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.gender-option input:checked+.gender-box .gender-label {
    color: white;
}

/* Range Slider Styles */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 4px solid var(--primary-500);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

/* Goal Selector Styles */
.goal-selector {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.goal-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--border-glass);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.goal-selector input[type="radio"] {
    display: none;
}

.goal-selector input[type="radio"]:checked+.goal-option {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--primary-500);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

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

.goal-option span:last-child {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.goal-selector input[type="radio"]:checked+.goal-option span:last-child {
    color: white;
}

/* Activity Selector Styles */
.activity-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--border-glass);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.activity-selector input[type="radio"] {
    display: none;
}

.activity-selector input[type="radio"]:checked+.activity-option {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--primary-500);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

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

.activity-info {
    display: flex;
    flex-direction: column;
}

.activity-info strong {
    font-size: 0.95rem;
    color: white;
}

.activity-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.macro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.macro-item {
    padding: 1.25rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.macro-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.macro-name {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* ===================================
   MODALS & OVERLAYS
   =================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: #1a1a1a;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-glass);
    overflow: hidden;
}

/* ===================================
   BOTTOM NAVIGATION (MOBILE)
   =================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    z-index: 1000;
    background: rgba(13, 13, 13, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);
    display: none;
    padding: 0 1rem;
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-dim);
    transition: var(--transition);
}

.bottom-nav-item.active {
    color: var(--primary-400);
}

.bottom-nav-item svg {
    width: 24px;
    height: 24px;
}

.bottom-nav-item span {
    font-size: 0.7rem;
    font-weight: 600;
}

/* ===================================
   RESPONSIVE OPTIMIZATIONS
   =================================== */
@media (max-width: 1024px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0.75rem 0;
    }

    .nav {
        display: none;
    }

    .bottom-nav {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        padding: 8rem 0 3rem;
    }

    .page-title {
        font-size: 2.25rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .macro-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   ANIMATIONS & UTILITIES
   =================================== */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.glow-red {
    filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.4));
}

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

/* Hide Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-700);
}