:root {
    /* --- DARK THEME (DEFAULT) --- */
    --bg-body: #0f1115;
    --bg-main: #0f1115;
    --bg-card: #16181d;
    --bg-overlay: rgba(22, 24, 29, 0.85);
    
    --border-color: rgba(255, 255, 255, 0.08); /* General borders */
    
    /* GLASSMORPHISM VARS */
    --glass-bg: rgba(17, 24, 39, 0.6);        /* Main glass background */
    --glass-border: rgba(255, 255, 255, 0.08); /* Glass border */
    --glass-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    --glass-inner-bg: rgba(31, 41, 55, 0.5);   /* Inner cards like stats */
    --glass-inner-border: rgba(255, 255, 255, 0.05);

    /* TEXT COLORS */
    --text-main: #ffffff;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* BRAND / ACCENT */
    --accent: #8b5cf6;       /* Violet-500 */
    --accent-hover: #7c3aed; /* Violet-600 */
    --accent-glow: rgba(139, 92, 246, 0.4);
    
    /* STATUS */
    --success: #22c55e;
    --danger: #ef4444;
    --info: #3b82f6;
    --warning: #f59e0b;
    
    --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --gap-md: 20px;
    --navbar-height: 70px;
}

[data-theme="light"] {
    /* --- LIGHT THEME --- */
    --bg-body: #f3f4f6;         /* Light Gray body */
    --bg-main: #f3f4f6;
    --bg-card: #ffffff;
    --bg-overlay: rgba(255, 255, 255, 0.95);

    --border-color: rgba(0, 0, 0, 0.1);

    /* GLASSMORPHISM VARS (Frosted White) */
    --glass-bg: rgba(255, 255, 255, 0.75);      /* White glass */
    --glass-border: rgba(0, 0, 0, 0.08);        /* Subtle dark border */
    --glass-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --glass-inner-bg: rgba(243, 244, 246, 0.8); /* Inner cards slight gray */
    --glass-inner-border: rgba(0, 0, 0, 0.05);

    /* TEXT COLORS */
    --text-main: #111827;       /* Gray-900 */
    --text-primary: #1f2937;    /* Gray-800 */
    --text-secondary: #4b5563;  /* Gray-600 */
    --text-muted: #9ca3af;      /* Gray-400 */

    /* BRAND / ACCENT */
    --accent: #7c3aed; 
    --accent-hover: #6d28d9;
    --accent-glow: rgba(124, 58, 237, 0.15);
}

/* --- UTILITY CLASSES --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    color: var(--text-main);
}

.text-main { color: var(--text-main) !important; }
.text-sec { color: var(--text-secondary) !important; }
.text-mut { color: var(--text-muted) !important; }
.bg-theme { background-color: var(--bg-body) !important; }
.border-theme { border-color: var(--border-color) !important; }

/* --- TEMEL AYARLAR (RESET) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-ui);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif; font-weight: 800; letter-spacing: -0.02em; }

.novel-blur-bg {
    filter: blur(40px) brightness(0.3);
    z-index: -1;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
}

/* Selection */
::selection {
    background: var(--accent);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--gap-md);
    width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   NAVBAR (HEADER)
   ========================================= */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 1000;
    background: var(--bg-card); 
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    flex-shrink: 0;
}

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a,
.nav-links button {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.nav-links a:hover, 
.nav-links a.active,
.nav-links button:hover,
.nav-links button.active {
    color: var(--text-main);
}

.nav-right-items {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Search */
.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-main); 
    border-radius: 50px;
    padding: 6px 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.search-form:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.search-form input {
    background: transparent;
    border: none;
    color: var(--text-main);
    width: 180px;
    outline: none;
    font-size: 0.9rem;
}

.search-form button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}
.search-form button:hover {
    color: var(--text-main);
}

.btn-login-nav {
    background: var(--accent);
    color: white !important;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-login-nav:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .btn-login-nav {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
    .btn-login-nav i {
        font-size: 0.85rem;
    }
}

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropbtn {
    cursor: pointer; display: flex; align-items: center; gap: 10px;
    color: var(--text-main); transition: opacity 0.2s;
}
.dropbtn:hover { opacity: 0.8; }

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 50px;
    background-color: var(--bg-card);
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    z-index: 1001;
    overflow: hidden;
    padding: 8px 0;
}

.dropdown-content.show { display: block; animation: slideIn 0.2s ease; }

.dropdown-header {
    padding: 8px 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-content a {
    color: var(--text-secondary);
    padding: 10px 20px;
    display: flex; align-items: center; gap: 12px;
    font-size: 0.95rem; font-weight: 500;
}

.dropdown-content a:hover {
    background-color: var(--bg-main);
    color: var(--text-main);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   AUTH PAGES
   ========================================= */
.auth-container {
    max-width: 400px;
    margin: 80px auto;
    padding: 40px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.auth-container h2 {
    margin-bottom: 24px;
    font-size: 1.8rem;
    color: var(--text-main);
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
}
.auth-form input:focus {
    border-color: var(--accent);
    outline: none;
}

.auth-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 8px;
}
.auth-form button[type="submit"]:hover {
    background: var(--accent-hover);
}

/* =========================================
   NOVEL DETAIL PAGE
   ========================================= */
.novel-detail-banner {
    position: relative;
    min-height: 500px;
    padding: 80px 0;
    overflow: hidden;
}

.banner-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    filter: blur(40px) brightness(0.3);
    z-index: 1; transform: scale(1.1);
}

.novel-banner-content {
    position: relative; z-index: 3;
    display: flex; gap: 50px;
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
}

.novel-cover-wrapper {
    flex-shrink: 0;
    width: 260px;
    max-width: 100%;
}

.novel-cover {
    width: 100%; height: 390px; object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    background-color: var(--bg-card);
    color: #a0a0a0;
    display: flex; align-items: center; justify-content: center;
    text-align: center; font-size: 0.9rem;
    overflow: hidden;
}

.novel-info { flex: 1; color: white; /* Banner text is always white due to dark overlay */ }

.novel-title {
    font-size: 3rem; font-weight: 800; line-height: 1.1;
    margin-bottom: 20px; text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.meta-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }

.meta-tag {
    padding: 6px 16px; border-radius: 50px; font-size: 0.85rem; font-weight: 600;
    background: rgba(255, 255, 255, 0.1); color: #e0e0e0;
    backdrop-filter: blur(5px); border: 1px solid rgba(255, 255, 255, 0.1);
}
.author-tag { background: var(--accent); color: white; border: none; }

.action-buttons { display: flex; gap: 16px; margin-top: 30px; }

.btn-action {
    padding: 12px 28px; border-radius: 50px; font-weight: 700; font-size: 1rem;
    display: flex; align-items: center; gap: 10px; border: none; cursor: pointer;
    transition: transform 0.2s;
}

.btn-read {
    background: var(--accent); color: white;
    box-shadow: 0 10px 30px var(--accent-glow);
}
.btn-read:hover { transform: translateY(-3px); }

.btn-library {
    background: rgba(255, 255, 255, 0.1); color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-library:hover { background: rgba(255, 255, 255, 0.2); }

.novel-desc {
    font-size: 1.05rem; line-height: 1.7; color: #d1d5db;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
    overflow: hidden;
}
.novel-desc.expanded { -webkit-line-clamp: unset; }

.btn-read-more {
    background: none; border: none; color: var(--accent);
    font-weight: 600; cursor: pointer; margin-top: 8px;
    font-size: 0.9rem;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .navbar { padding: 0 20px; }
    .nav-links, .search-form { display: none; }
    
    .novel-banner-content { flex-direction: column; align-items: center; text-align: center; }
    .novel-title { font-size: 2.2rem; }
    .meta-tags { justify-content: center; }
    .action-buttons { justify-content: center; width: 100%; }
}

/* =========================================
   TOOLTIPS
   ========================================= */
.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 1; /* High opacity */
    background-color: #111827; /* Solid dark background */
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    pointer-events: none;
    transition: opacity 0.2s;
}

/* End of global styles */

/* =========================================
   RESPONSIVE FIXES (TABLET & MOBILE)
   ========================================= */

/* 1. Tablet Header Fix (Break at 1100px) */
/* Prevent Header Overlap on Tablet (1000px - 1280px) */
@media (max-width: 1280px) {
    /* Switch to static flex layout to prevent overlap */
    .nav-links {
        position: static;
        transform: none;
        gap: 15px;
        margin: 0 15px; /* Minimal spacing */
    }
    
    /* Show 'İstekler' link again */
    .nav-links .nav-item {
        display: block !important;
    }

    /* Shrink elements to fit */
    .nav-links a {
        font-size: 0.85rem;
    }
    .search-form input {
        width: 120px;
    }
    .logo {
        font-size: 1.3rem;
    }
}

/* 1. Tablet Header Fix (Break at 992px) */
@media (max-width: 992px) {
    .navbar { 
        padding: 0 20px;
        /* Allow wrapping if needed, but mostly we want to switch to mobile view earlier */
    }
    
    /* Forces mobile menu view earlier */
    .nav-links, 
    .search-form { 
        display: none !important; 
    }
    
    .mobile-only {
        display: block !important;
    }
    
    .desktop-only {
        display: none !important;
    }
}

/* 2. Footer Fix */
@media (max-width: 768px) {
    footer .container {
        display: flex;
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    footer .container > div {
        display: flex;
        flex-direction: column;
        gap: 15px;
        justify-content: center;
    }
    
    footer a {
        display: block;
        padding: 5px;
    }
}

/* 3. Profile Comments Overflow Fix */
@media (max-width: 768px) {
    .comment-container,
    .profile-comments,
    .comment-text {
        max-width: 100%;
        overflow-x: hidden;
        word-wrap: break-word;
        word-break: break-word;
    }
}

/* 4. General Mobile Touch Targets */
@media (max-width: 768px) {
    button,
    .btn,
    .nav-btn,
    .menu-btn,
    #sidebar-toggle {
        min-width: 44px;
        min-height: 44px;
        font-size: 1rem;
    }
    
    /* Better spacing for mobile navbar */
    .navbar {
        height: auto;
        min-height: 70px;
        padding: 10px 15px;
    }
    
    .nav-right-items {
        gap: 15px;
    }
    
    /* Hero Buttons Center on Mobile */
    .hero-actions {
        justify-content: center;
    }
}

/* Glassmorphism Search Bar (Explore Page) */
.glass-search-container {
    background: var(--glass-inner-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    width: 100%;
}

.glass-search-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    transform: translateY(-2px);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .glass-search-container {
        padding: 6px 15px; /* Thinner on mobile */
    }
    .glass-search-input {
        font-size: 0.95rem; /* Slightly smaller text */
    }
}

.glass-search-input {
    flex: 1;
    min-width: 0; /* CRITICAL: Fix flexbox overflow */
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 1rem;
    padding: 8px 0;
}

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

.glass-search-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 5px;
}


/* =========================================
   FLUID UX & ANIMATIONS (PREMIUM FEEL)
   ========================================= */

/* 1. Keyframes Definitions */
@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes staggerFadeUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* 2. Context-Aware Applications */

/* Navbar / Header */
.navbar, header {
    animation: slideInDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
}

/* Sidebar */
#sidebar, .profile-sidebar {
    animation: slideInLeft 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
}

/* Nobel Cards & Chapter Items (Domino Effect) */
.novel-card, .chapter-item, .listing-card {
    animation: staggerFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    will-change: transform, opacity;
}

/* Stagger Delay for first 10 items */
.novel-card:nth-child(1), .chapter-item:nth-child(1) { animation-delay: 0ms; }
.novel-card:nth-child(2), .chapter-item:nth-child(2) { animation-delay: 50ms; }
.novel-card:nth-child(3), .chapter-item:nth-child(3) { animation-delay: 100ms; }
.novel-card:nth-child(4), .chapter-item:nth-child(4) { animation-delay: 150ms; }
.novel-card:nth-child(5), .chapter-item:nth-child(5) { animation-delay: 200ms; }
.novel-card:nth-child(6), .chapter-item:nth-child(6) { animation-delay: 250ms; }
.novel-card:nth-child(7), .chapter-item:nth-child(7) { animation-delay: 300ms; }
.novel-card:nth-child(8), .chapter-item:nth-child(8) { animation-delay: 350ms; }
.novel-card:nth-child(9), .chapter-item:nth-child(9) { animation-delay: 400ms; }
.novel-card:nth-child(10), .chapter-item:nth-child(10) { animation-delay: 450ms; }

/* 3. Micro-Interactions (Haptic Feedback) */

/* Buttons */
.btn:active, button:active, .btn-action:active {
    transform: scale(0.96);
    transition: transform 0.1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Cards & Links Hover (Lift) */
.novel-card:hover, 
.chapter-item:hover,
a.card-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px -10px rgba(139, 92, 246, 0.3); /* Accent shadow */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Input Focus Glow */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25) !important;
    border-color: var(--accent) !important;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* 4. Performance & Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01s !important;
        scroll-behavior: auto !important;
    }
}




/* =========================================
   CHAPTER LIST REDESIGN (GLASSMORPHISM)
   ========================================= */
.chapter-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.chapter-item {
    display: flex; /* Flex layout for icon + content */
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;

    /* 1. GLASSMORPHISM BASE */
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid transparent; /* Prepare for hover effect */
}

/* 2. HOVER EFFECTS */
.chapter-item:hover {
    background: rgba(255, 255, 255, 0.08); /* Lighter bg */
    border-color: rgba(255, 255, 255, 0.15); /* Lighter border */
    border-left-color: var(--accent); /* Purple accent line */
    transform: translateX(5px); /* Slide right */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}



/* 4. TYPOGRAPHY & CONTENT */
.chapter-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.chapter-number {
    font-size: 0.85rem; /* Slightly larger */
    font-weight: 800;   /* Extra bold */
    text-transform: uppercase;
    color: var(--accent); /* Make it accent color by default for pop */
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.chapter-item:hover .chapter-number {
    color: var(--accent-hover);
}

.chapter-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chapter-item:hover .chapter-title {
    color: var(--text-main);
}

.chapter-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* New/Locked Indicators (Optional extensions) */
.chapter-badge-new {
    font-size: 0.65rem;
    background: var(--accent);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

/* =========================================
   MOBILE POLISH (AVATAR & HAMBURGER PATCH)
   ========================================= */
@media (max-width: 900px) {
    /* Mobile Bottom Nav Profile Avatar (32-36px) */
    .md\:hidden.fixed.bottom-0 .avatar-frame-wrapper .avatar-img,
    .md\:hidden.fixed.bottom-0 img.avatar-img,
    .md\:hidden.fixed.bottom-0 a[href*="profile"] img {
        width: 34px !important;
        height: 34px !important;
        max-width: 34px !important;
        max-height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        object-fit: cover !important;
    }

    /* Active Profile Frame Outer Glow Control in Mobile Nav */
    .md\:hidden.fixed.bottom-0 .avatar-frame-wrapper {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: visible !important;
        isolation: isolate;
    }

    /* Control the scale of pseudo elements for cosmetic frames in bottom nav */
    .md\:hidden.fixed.bottom-0 .avatar-frame-wrapper::before,
    .md\:hidden.fixed.bottom-0 .avatar-frame-wrapper::after {
        inset: -3px !important;
        transform: scale(0.78) !important;
        opacity: 0.8 !important;
    }

    .md\:hidden.fixed.bottom-0 .avatar-frame-wrapper .avatar-img {
        position: relative;
        z-index: 2;
        border-width: 1px !important;
    }

    .md\:hidden.fixed.bottom-0 a[href*="profile"] {
        min-width: 0;
        gap: 2px !important;
    }

    .md\:hidden.fixed.bottom-0 a[href*="profile"] > span:last-child {
        line-height: 1;
    }

    /* Mobile Drawer Profile Avatar Fix */
    .md\:hidden .avatar-frame-wrapper .avatar-img {
        max-width: 40px !important;
        max-height: 40px !important;
    }

    /* Mobile Hamburger Menu Fix (40-44px hitbox, 18-20px icon) */
    .navbar button.md\:hidden {
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
    }
    
    .navbar button.md\:hidden i.fa-bars {
        font-size: 20px !important;
    }

    /* Mobile Drawer Scroll Fix */
    .mobile-drawer-root {
        position: fixed;
        inset: 0;
        z-index: 9998;
        overflow: hidden;
        height: 100vh;
        height: 100svh;
        height: 100dvh;
        max-height: 100dvh;
        pointer-events: none;
    }

    .mobile-drawer-root > * {
        pointer-events: auto;
    }

    .mobile-drawer-panel {
        display: flex !important;
        flex-direction: column !important;
        height: 100vh !important;
        height: 100svh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        min-height: 0 !important;
        overflow: hidden !important;
        overscroll-behavior: contain;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .mobile-drawer-header,
    .mobile-drawer-search,
    .mobile-drawer-footer {
        flex: 0 0 auto !important;
    }

    .mobile-drawer-scroll {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
        padding-bottom: 18px !important;
    }

    .mobile-drawer-footer {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
    }
}

