:root {
    /* --- Pitch Black & Emerald Theme --- */
    /* Brand Colors */
    --primary: 16, 185, 129;
    /* #10B981 (Vibrant Emerald) */
    --primary-glow: 52, 211, 153;
    /* #34D399 (Mint Glow) */
    --secondary: 6, 78, 59;
    /* #064E3B (Deep Forest for gradients) */

    /* Accents */
    --accent: 52, 211, 153;
    /* #34D399 (Mint) */
    --accent-dark: 4, 120, 87;
    /* #047857 */
    --accent-light: 16, 185, 129;
    /* #10B981 */

    /* Backgrounds */
    --bg-deep: 0, 0, 0;
    /* #000000 (Pitch Black) */
    --bg-card: 10, 10, 10;
    /* #0A0A0A (Very Dark Gray/Black) */

    /* Glass Effects (Dark Mode) */
    --glass-bg: rgba(10, 10, 10, 0.85);
    --glass-border: 20, 20, 20;
    /* Dark Borders first */
    --glass-border-highlight: 16, 185, 129;
    /* Emerald Highlight Border */
    --glass-highlight: rgba(255, 255, 255, 0.05);
    --glass-shimmer: rgba(255, 255, 255, 0.1);

    /* Text */
    --text-main: 249, 250, 251;
    /* #F9FAFB (White/Near White) */
    --text-muted: 156, 163, 175;
    /* #9CA3AF (Gray 400) */
    --text-success: 52, 211, 153;
    /* #34D399 */

    /* Shadows */
    --shadow-color: 0, 0, 0;
    --shadow-glow: 16, 185, 129;
    /* Emerald Glow */

    /* Layout */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;

    --nav-height: 70px;

    /* Animations */
    --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: hsl(var(--bg-deep));
    color: rgb(var(--text-main));
    line-height: 1.6;
    overflow-x: hidden;
}

.main-content {
    padding-top: 160px;
    /* Prevent navbar overlap with fixed header */
    min-height: 100vh;
}

/* --- Background Animation (Subtle for Light Mode) --- */
/* --- Background Animation (Vivid & Alive) --- */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
    /* Central light */
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
    mix-blend-mode: multiply;
    /* Natural vibrant blending */
}

/* --- Background Animation (Pitch Black Mode) --- */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: #000000;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
    mix-blend-mode: screen;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, transparent 70%);
    /* Emerald */
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.3) 0%, transparent 70%);
    /* Mint */
    animation-delay: -5s;
}

.blob-3 {
    top: 30%;
    left: 30%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(6, 78, 59, 0.5) 0%, transparent 70%);
    /* Forest */
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    100% {
        transform: translate(40px, 60px) scale(1.1) rotate(5deg);
    }
}

/* Hide mobile-only elements by default */
.mobile-search-btn,
.mobile-logout-btn {
    display: none;
}

/* --- Glass Components --- */
.glass-nav {
    position: fixed;
    /* Changed from sticky */
    top: 0;
    left: 0;
    width: 100%;
    /* Full width */
    height: var(--nav-height);
    background: #68d382;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    /* Bottom border instead of full border */
    border-radius: 0;
    /* No radius for header */
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 40px rgba(var(--shadow-color), 0.05);
    transition: all 0.4s var(--ease-out);
}

.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 40px rgba(var(--shadow-color), 0.1);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid #1F2937;
    /* Dark Border */
    border-top: 1px solid #374151;
    /* Slightly lighter top highlight */
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow:
        0 4px 20px rgba(var(--shadow-color), 0.08),
        0 2px 8px rgba(var(--primary), 0.05);
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

/* Removed overlay for cleaner look */
.glass-card::before {
    display: none;
}

.glass-card:hover {
    transform: translateY(-5px) scale(1.005);
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.5),
        0 5px 15px rgba(16, 185, 129, 0.2);
    border-color: #10B981;
    /* Emerald border on hover */
}

.glass-input {
    width: 100%;
    background: rgb(22 22 22);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 12px 24px;
    color: #fcfcfc;
    /* Black text for visibility on light bg */
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s var(--ease-out);
}

.glass-input:focus {
    outline: none;
    background: rgba(75, 66, 66, 0.95);
    border-color: hsla(var(--primary), 0.6);
    box-shadow: 0 0 0 4px hsla(var(--primary), 0.15);
}

.glass-input::placeholder {
    color: rgba(172, 155, 155, 0.4);
}

/* --- Form Elements --- */
.visibility-select {
    padding: 8px 15px;
    font-size: 0.9rem;
    width: auto;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    padding-right: 30px;
    transition: all 0.3s ease;
}

.visibility-select:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.4);
}

.visibility-select option {
    background: #111;
    color: white;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: rgb(var(--text-main));
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-decoration: none;
    color: hsla(var(--primary));
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    background: linear-gradient(135deg, hsla(var(--primary)) 0%, hsla(var(--secondary)) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Layout Utils --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 10px;
}

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

.nav-item {
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.nav-item:hover,
.nav-item.active {
    color: hsla(var(--primary));
    background: rgba(var(--primary), 0.08);
}

.nav-item i {
    font-size: 1.1rem;
}

/* --- Buttons --- */
.btn-primary {
    background: linear-gradient(135deg, rgb(var(--secondary)) 0%, rgb(var(--primary)) 100%);
    /* #16A34A to #22C55E */
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s var(--ease-elastic);
    box-shadow: 0 8px 20px -5px rgba(var(--primary), 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px -5px rgba(var(--accent), 0.6);
    /* Lime Green Glow */
    background: linear-gradient(135deg, rgb(var(--primary)) 0%, rgb(var(--accent)) 100%);
    /* Emerald to Lime shift */
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.6);
    color: rgb(var(--text-main));
    border: 1px solid rgb(var(--glass-border));
    /* #86EFAC */
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: white;
    border-color: rgb(var(--primary));
    color: rgb(var(--primary));
    box-shadow: 0 5px 15px rgba(var(--primary), 0.1);
}

/* --- Profile Specifics --- */
.profile-header {
    border-radius: 0 0 40px 40px;
    margin-bottom: 6rem;
    position: relative;
}

.profile-cover {
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    border-radius: 0 0 40px 40px;
    position: relative;
    overflow: hidden;
}

.profile-info-container {
    position: absolute;
    bottom: -80px;
    left: 50px;
    display: flex;
    align-items: flex-end;
    gap: 30px;
    z-index: 10;
}

.profile-avatar-large {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    padding: 5px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 40px rgba(var(--shadow-color), 0.15);
}

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

.profile-username {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 5px;
    color: rgb(var(--text-main));
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
}

.profile-stats-bar {
    display: flex;
    gap: 25px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 10px 25px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    margin-top: 15px;
    color: rgb(var(--text-main));
    box-shadow: 0 5px 15px rgba(var(--shadow-color), 0.05);
}

/* --- Utilities --- */
.animate-fade-up {
    animation: fadeUp 0.8s var(--ease-out) forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

/* Image Safety */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.nav-avatar-container {
    margin-right: 5px;
}

.nav-avatar {
    border: 2px solid rgba(0, 0, 0, 0.1);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    transition: border-color 0.3s;
}

.profile-nav-link:hover .nav-avatar {
    border-color: hsla(var(--primary));
}

/* --- Special Suggestions Section --- */
.suggestion-card:hover {
    border-color: #34D399 !important;
    /* Fresh Mint Border */
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.1) !important;
    transform: translateY(-5px);
}

.btn-suggestion-primary:hover {
    background: #059669 !important;
    /* Rich Green Hover */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Ensure global buttons match Emerald theme */
.btn-primary {
    background: #10B981;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    border: none;
}

.btn-primary:hover {
    background: #059669;
    /* Rich Green */
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}