:root {
    /* Enhanced Color Palette - Vibrant & Cohesive */

    /* Primary - Electric Blue/Indigo */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;

    /* Secondary - Hot Pink/Magenta */
    --secondary-color: #ec4899;
    --secondary-hover: #db2777;
    --secondary-light: #f472b6;

    /* Accent - Purple/Violet */
    --accent-color: #8b5cf6;
    --accent-hover: #7c3aed;
    --accent-light: #a78bfa;

    /* Semantic Colors - Fitness Themed */
    --steps-color: #3b82f6;
    /* Blue - Movement */
    --calories-color: #f97316;
    /* Orange - Energy */
    --water-color: #06b6d4;
    /* Cyan - Hydration */
    --activity-color: #10b981;
    /* Green - Activity */
    --meals-color: #f59e0b;
    /* Amber - Nutrition */

    /* Background Colors */
    --background-dark: #0a0e1a;
    /* Deeper dark */
    --background-card: #1a1f35;
    /* Rich card background */
    --background-elevated: #252b42;
    /* Elevated elements */

    /* Text Colors */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dimmed: #64748b;

    /* Status Colors */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    /* Enhanced Gradients - More Vibrant */
    --gradient-main: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-purple: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
    --gradient-pink: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
    --gradient-blue: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    --gradient-orange: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    --gradient-cyan: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    --gradient-green: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    --gradient-amber: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-glow: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.25), transparent 70%);
    --gradient-glow-pink: radial-gradient(circle at 50% 0%, rgba(236, 72, 153, 0.25), transparent 70%);

    /* Glassmorphism */
    --glass-bg: rgba(26, 31, 53, 0.75);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);

    /* Spacing & Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;

    /* Enhanced Shadows with Color */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.5);
    --shadow-glow-pink: 0 0 30px rgba(236, 72, 153, 0.5);
    --shadow-glow-blue: 0 0 30px rgba(59, 130, 246, 0.5);
    --shadow-glow-orange: 0 0 30px rgba(249, 115, 22, 0.5);
    --shadow-glow-cyan: 0 0 30px rgba(6, 182, 212, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: var(--background-dark);
    background-image: var(--gradient-glow);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Typography with animations */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.025em;
    animation: slideUp 0.6s ease-out;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Enhanced Navigation with Glassmorphism */
.navbar,
nav {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.5s ease-out;
}

.brand,
nav .logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.brand:hover,
nav .logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    white-space: nowrap;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Enhanced Profile Avatar with Glow */
.profile-avatar-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.profile-avatar-nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.profile-avatar-nav::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--gradient-main);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(10px);
}

.profile-avatar-nav:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-glow);
}

.profile-avatar-nav:hover::before {
    opacity: 0.7;
}

.font-mono {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

nav ul.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul.nav-links li {
    margin: 0;
}

nav ul.nav-links li a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    white-space: nowrap;
}

nav ul.nav-links li a:hover,
nav ul.nav-links li a.active {
    color: var(--primary-color);
}

nav ul.nav-links li .btn-logout {
    background: transparent;
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

nav ul.nav-links li .btn-logout:hover {
    background: var(--danger-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

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

/* Enhanced Cards with Glassmorphism */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-main);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border-color: rgba(99, 102, 241, 0.3);
}

.card:hover::before {
    transform: scaleX(1);
}

/* Enhanced Buttons with Ripple Effect */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

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

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 0.5rem;
}

/* Enhanced Profile Styles */
.profile-section {
    display: grid;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease-out;
}

.profile-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid transparent;
    background: var(--gradient-main);
    background-clip: padding-box;
    transition: all 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.profile-info h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
}

.profile-info p {
    margin: 0 0 0.5rem 0;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(99, 102, 241, 0.3);
    transform: scale(1.05);
}

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

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    animation: countUp 1s ease-out;
}

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

/* Enhanced Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.form-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.danger-zone {
    border: 2px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.danger-zone h3 {
    color: var(--danger-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Enhanced Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 25%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 75%);
    background-size: 2000px 100%;
    animation: shimmer 2s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-circle {
    border-radius: 50%;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Enhanced Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

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

.modal {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 2rem;
    border-radius: var(--radius-xl);
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
}

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

/* Progress Circle Enhancement */
.progress-circle {
    position: relative;
    transition: all 0.3s ease;
}

.progress-circle:hover {
    transform: scale(1.05);
}

/* ============================================
   BOTTOM NAVIGATION (Mobile Only)
   ============================================ */
.bottom-nav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--glass-border);
    display: none;
    /* Hidden by default, shown on mobile */
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 0.75rem 0;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    min-width: 60px;
    border-radius: var(--radius-md);
}

.bottom-nav-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: all 0.3s ease;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.bottom-nav-item.active svg {
    transform: scale(1.1);
}

.bottom-nav-item span {
    white-space: nowrap;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

/* Extra Small Mobile (320px - 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .navbar,
    nav {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .brand {
        font-size: 1.25rem;
    }

    .container {
        padding: 0.75rem;
    }

    /* Hide clock on very small screens */
    #live-clock {
        display: none;
    }

    /* Smaller buttons */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.875rem;
    }

    /* Compact cards */
    .card {
        padding: 1rem;
    }

    /* Profile avatar smaller */
    .profile-avatar-nav {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    /* Bottom nav more compact */
    .bottom-nav-item {
        padding: 0.4rem 0.75rem;
        min-width: 50px;
    }

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

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

    /* Hide top nav links on very small mobile */
    .navbar .nav-links,
    nav .nav-links,
    .nav-links {
        display: none !important;
    }

    /* Show bottom nav */
    .bottom-nav {
        display: flex !important;
    }
}

/* Mobile & Small Tablets (481px - 768px) */
@media (max-width: 768px) {

    /* Show bottom nav, hide top nav links */
    .bottom-nav {
        display: flex !important;
    }

    /* Hide top navigation links with maximum specificity */
    .navbar .nav-links,
    nav .nav-links,
    div.nav-links,
    .nav-links {
        display: none !important;
    }

    /* Hide individual nav-link items except logout */
    .navbar .nav-link:not(.nav-logout),
    nav .nav-link:not(.nav-logout),
    a.nav-link:not(.nav-logout) {
        display: none !important;
    }

    /* Style logout button for mobile - keep it visible */
    .nav-logout {
        display: inline-block !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.85rem !important;
        border: 1px solid var(--danger-color) !important;
        border-radius: 0.5rem !important;
        background: transparent !important;
        transition: all 0.3s ease !important;
    }

    .nav-logout:hover {
        background: var(--danger-color) !important;
        color: white !important;
    }

    .navbar,
    nav {
        padding: 1rem;
        gap: 1rem;
    }

    .nav-right {
        gap: 1rem;
    }

    .container {
        padding: 1rem;
        padding-bottom: 5rem;
        /* Space for bottom nav */
    }

    h1 {
        font-size: 2rem;
    }

    /* Single column grids */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Profile page adjustments */
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

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

    /* Form adjustments */
    .form-group input {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    /* Larger touch targets */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
    }

    /* Card hover effects disabled on touch */
    .card:hover {
        transform: none;
    }
}

/* Tablets & Small Laptops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 900px;
        padding: 1.5rem;
    }

    /* Show top nav, hide bottom nav */
    .bottom-nav {
        display: none;
    }

    .nav-links {
        display: flex;
        gap: 1.25rem;
    }

    /* 2-column layout for 3-column grids */
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Adjust font sizes */
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    /* Navbar adjustments */
    .navbar,
    nav {
        padding: 1rem 1.5rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }
}

/* Standard Laptops & Desktops (1025px - 1440px) */
@media (min-width: 1025px) {

    /* Default styles apply */
    .bottom-nav {
        display: none;
    }

    .nav-links {
        display: flex;
    }
}

/* Large Desktops (1441px+) */
@media (min-width: 1441px) {
    .container {
        max-width: 1400px;
        padding: 2.5rem;
    }

    h1 {
        font-size: 2.75rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    .navbar,
    nav {
        padding: 1.25rem 2.5rem;
    }

    .card {
        padding: 2rem;
    }

    /* More generous spacing */
    .grid {
        gap: 2rem;
    }

    /* Larger profile avatar */
    .profile-avatar {
        width: 120px;
        height: 120px;
    }

    .avatar-placeholder {
        font-size: 3rem;
    }
}

/* Fluid Typography with clamp() for smooth scaling */
@media (min-width: 320px) {
    h1 {
        font-size: clamp(1.75rem, 5vw, 2.75rem);
    }

    h2 {
        font-size: clamp(1.25rem, 3vw, 1.75rem);
    }

    h3 {
        font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    }

    .brand {
        font-size: clamp(1.25rem, 3vw, 1.5rem);
    }
}

/* Print Styles */
@media print {

    .navbar,
    .bottom-nav,
    .btn,
    nav {
        display: none;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-content {
    background: var(--glass-bg, rgba(23, 23, 23, 0.8));
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 1.5rem;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(to right, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-body {
    margin-bottom: 2rem;
}

.modal-input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: #fff;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.modal-input:focus {
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

/* ========================================
   Modern Modal System (modals.js)
   ======================================== */

.modern-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

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

.modern-modal {
    background: linear-gradient(145deg, rgba(26, 31, 53, 0.95), rgba(15, 18, 30, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modern-modal .modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.modern-modal .modal-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
}

.modern-modal .modal-icon {
    width: 56px;
    height: 56px;
    padding: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.modern-modal .modal-icon.success {
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
}

.modern-modal .modal-icon.error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.modern-modal .modal-icon.warning {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

.modern-modal .modal-icon.info {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
}

.modern-modal .modal-body {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modern-modal .modal-body p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.modern-modal .modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.modern-modal .modal-actions .btn {
    flex: 1;
    max-width: 140px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.modern-modal .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.modern-modal .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.modern-modal .btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    color: #fff;
}

.modern-modal .btn-danger:hover {
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

/* Prompt Modal Form Styles */
.modern-modal .modal-form {
    text-align: left;
}

.modern-modal .modal-field {
    margin-bottom: 1rem;
}

.modern-modal .modal-field label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.modern-modal .modal-field input,
.modern-modal .modal-field select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.modern-modal .modal-field input:focus,
.modern-modal .modal-field select:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.modern-modal .modal-field input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Mobile Adjustments for Modals */
@media (max-width: 480px) {
    .modern-modal {
        padding: 1.5rem;
        border-radius: 1.25rem;
        margin: 1rem;
    }

    .modern-modal .modal-header h3 {
        font-size: 1.2rem;
    }

    .modern-modal .modal-icon {
        width: 48px;
        height: 48px;
        padding: 10px;
    }

    .modern-modal .modal-actions {
        flex-direction: column;
    }

    .modern-modal .modal-actions .btn {
        max-width: 100%;
    }
}