:root {
    /* Enhanced Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    /* Lighter bg for better perf */
    --glass-bg-hover: rgba(255, 255, 255, 0.14);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    /* Reduced shadow spread */
    --glass-shadow-lg: 0 10px 30px 0 rgba(0, 0, 0, 0.5);

    /* Vibrant Color Palette with Gradients */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);

    --primary-color: #667eea;
    --secondary-color: #00a8cc;
    --accent-color: #00f2fe;
    --accent-color-2: #f5576c;

    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --text-highlight: #64ffda;

    --success-color: #43e97b;
    --warning-color: #feca57;
    --error-color: #ff6b6b;

    /* Neon Glow Colors */
    --neon-blue: #00d2ff;
    --neon-purple: #4facfe;
    --neon-pink: #f64f59;
    --neon-cyan: #00f2fe;
    --text-color: #f0f0f0;
    --card-radius: 16px;
    /* Slightly reduced radius for cleaner rendering */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Cairo', sans-serif;
}

/* Hide number input spin buttons */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    /* Prevent horizontal scroll/zoom issues */
    -webkit-text-size-adjust: 100%;
    /* Prevent font zooming on rotation */
    touch-action: manipulation;
    /* Improve touch responsiveness */
}

body {
    background: #0a0a0f;
    color: var(--text-main);
    min-height: 100vh;
    min-height: 100dvh;
    /* Mobile viewport fix */
    position: relative;
    /* Ensure stacking context */
    transition: opacity 0.3s ease;
    /* Smooth transition base */
}

/* Fix for missing fade-out class causing lag perception */
body.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* --- Professional Wave Background (ENHANCED) --- */
.background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    /* Rich Professional Base - Deeper & Richer */
    background:
        radial-gradient(ellipse at 50% 50%, rgba(20, 30, 60, 1) 0%, rgba(10, 15, 30, 1) 70%),
        linear-gradient(180deg, #0a0f1e 0%, #141e3c 50%, #0a0f1e 100%);
    /* overflow: hidden; REMOVED - was clipping fixed pseudo-elements */
}

/* Wave Overlay - FIXED TO VIEWPORT CENTER & SEAMLESS */
.background::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 200vw;
    /* Wide enough to loop smoothly */
    height: 60vh;
    /* High Visibility Neon Waves - Perfectly Seamless */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='none'%3E%3C!-- Cyan Bright Wave --%3E%3Cpath fill='none' stroke='rgba(0,242,254,0.6)' stroke-width='3' d='M0,200 Q300,100 600,200 T1200,200'/%3E%3C!-- Purple Neon Wave --%3E%3Cpath fill='none' stroke='rgba(180,60,255,0.5)' stroke-width='3' d='M0,200 Q300,300 600,200 T1200,200'/%3E%3C!-- Pink Hot Wave --%3E%3Cpath fill='none' stroke='rgba(255,60,150,0.4)' stroke-width='2' d='M0,200 Q400,150 800,200 T1600,200'/%3E%3C/svg%3E");
    background-size: 50% 100%;
    /* Tiles 2 times horizontally */
    background-repeat: repeat-x;
    opacity: 1;
    animation: waveFlowSeamless 20s linear infinite;
    pointer-events: none;
}

@keyframes waveFlowSeamless {
    0% {
        transform: translateY(-50%) translateX(0);
    }

    100% {
        transform: translateY(-50%) translateX(-50%);
    }

    /* Move exactly 1 tile */
}

/* Central Glow - VIBRANT & ATTRACTIVE - FIXED TO VIEWPORT */
.background::after {
    content: '';
    position: fixed;
    /* Fixed to viewport */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:
        /* Central bright glow */
        radial-gradient(ellipse 60% 50% at 50% 50%, rgba(56, 189, 248, 0.2) 0%, transparent 60%),
        /* Top left accent - Cyan */
        radial-gradient(circle at 15% 20%, rgba(0, 212, 255, 0.25) 0%, transparent 35%),
        /* Top right accent - Purple */
        radial-gradient(circle at 85% 15%, rgba(139, 92, 246, 0.25) 0%, transparent 35%),
        /* Bottom center - Pink/Magenta */
        radial-gradient(circle at 50% 90%, rgba(236, 72, 153, 0.2) 0%, transparent 40%),
        /* Left side glow */
        radial-gradient(circle at 5% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 30%);
    pointer-events: none;
}

@keyframes waveFlow {
    0% {
        transform: translateY(-50%) translateX(0);
    }

    100% {
        transform: translateY(-50%) translateX(-50%);
    }
}

/* Hide animated shapes - they're not needed anymore */
.shape {
    display: none !important;
}

/* --- Enhanced Glass Navbar --- */
.glass-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: 75px;
    background: rgba(10, 10, 15, 0.75);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
    margin-bottom: 60px;
    /* Increased spacing as requested */
}

.glass-navbar::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0.3;
}

.nav-container {
    width: 90%;
    max-width: 1400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, var(--neon-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1.2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.5));
}

.logo ion-icon {
    font-size: 28px;
    color: var(--accent-color);
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 16px;
    transition: 0.3s;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover {
    color: #fff;
    transform: translateY(-2px);
}

.nav-links li.active a {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.nav-links li.active a::after {
    /* Prismatic Light Bar */
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10%;
    width: 80%;
    height: 4px;
    background: #fff;
    border-radius: 4px;

    /* Neon Glow + Prism Aura */
    box-shadow:
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(0, 242, 254, 0.6),
        0 0 40px rgba(67, 233, 123, 0.4);

    animation: prismPulse 3s ease-in-out infinite;
}

@keyframes prismPulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(0, 242, 254, 0.6);
        width: 80%;
        left: 10%;
    }

    50% {
        opacity: 0.8;
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.9), 0 0 30px rgba(0, 242, 254, 0.8);
        width: 85%;
        /* Slight expansion */
        left: 7.5%;
    }
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 15px var(--accent-color);
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 25px var(--accent-color);
    }
}

#lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#lang-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#lang-toggle-btn .flag-icon {
    width: 24px;
    height: 18px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* =================================
   LANGUAGE SELECTOR MODAL
   ================================= */

/* Overlay Background */
.lang-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    margin: 0 !important;
}

.lang-modal-overlay.active {
    display: flex !important;
    opacity: 1;
}

.glass-navbar,
.glass-card,
.panel {
    backdrop-filter: blur(16px);
    /* Optimized blur for performance */
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Modal Container - ULTIMATE CENTERING FIX */
.lang-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;

    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;

    width: 90vw;
    max-width: 800px;
    height: auto;
    max-height: 85vh;
    /* Safe height for mobile */
    overflow: hidden;

    padding: 0;
    margin: 0 !important;
    /* Reset inconsistent margins */

    box-shadow:
        0 50px 120px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);

    opacity: 0;
    z-index: 10002;
    /* Higher than sidebar */
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Flex Layout for Content */
    display: flex;
    flex-direction: column;
}

.lang-modal-overlay.active .lang-modal {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1;
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Header */
.lang-header {
    padding: 30px 40px;
    /* Larger padding */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

/* ... */
/* Search Bar */
.lang-search {
    padding: 25px 40px;
    position: relative;
    display: flex;
    align-items: center;
}

.lang-search input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 16px 20px 16px 50px;
    /* Space for icon */
    border-radius: 14px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.lang-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.lang-search input:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.lang-search ion-icon {
    position: absolute;
    left: 55px;
    /* 40px padding + 15px offset */
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: var(--text-muted);
    pointer-events: none;
    transition: 0.3s;
}

.lang-search input:focus+ion-icon,
.lang-search:focus-within ion-icon {
    color: var(--accent-color);
}

/* Close Button Styling */
.close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--error-color);
    background: rgba(255, 90, 90, 0.1);
    transform: rotate(90deg) scale(1.1);
}

/* ... */
/* Language Grid - SCROLLABLE AREA */
/* Language Grid - SCROLLABLE AREA */
.lang-grid {
    /* Layout & Sizing - 3 columns × 4 rows visible */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 180px;
    gap: 15px;
    align-content: start;
    width: 100%;

    /* Flex Behavior */
    flex: 1 1 auto;

    /* Height Calculation for 4 Rows: (180*4) + (15*3) + 20 + 25 = 810px */
    max-height: 810px;
    min-height: auto;

    /* Scrolling & Spacing */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 25px 25px 25px;
}

/* Responsive Columns - Adjusted for modal width */
@media (max-width: 700px) {
    .lang-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 500px) {
    .lang-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Custom Scrollbar */
.lang-grid::-webkit-scrollbar {
    width: 6px;
}

.lang-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin: 10px 0;
}

.lang-grid::-webkit-scrollbar-thumb {
    background: rgba(168, 192, 255, 0.3);
    border-radius: 10px;
    transition: background 0.3s;
}

.lang-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 192, 255, 0.5);
}

/* Language Item Card */
/* Language Item Card */
.lang-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    /* Larger radius */
    padding: 20px 15px;
    /* More padding */
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    /* More gap */
    position: relative;
    overflow: hidden;
    min-height: 100px;
    height: 100%;
    /* Fill the grid row */
    justify-content: center;
    flex-shrink: 0;
}

.lang-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(168, 192, 255, 0), rgba(168, 192, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s;
}

.lang-item:hover::before {
    opacity: 1;
}

.lang-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.lang-item .flag {
    width: 80px;
    /* Slightly adjusted */
    height: 53px;
    /* 3:2 Ratio */
    object-fit: contain;
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4));
    border-radius: 6px;
    margin-bottom: 8px;
}

.lang-item .name {
    font-size: 22px;
    /* Larger font for better clarity */
    font-weight: 700;
    /* Bolder */
    color: #fff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.lang-item .native {
    font-size: 16px;
    /* Larger font */
    color: var(--text-highlight);
    /* Brighter color for clarity */
    opacity: 0.8;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}


.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar-mini {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 6px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-bar-mini input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    width: 150px;
    margin-right: 8px;
    font-size: 14px;
}

.action-icon {
    font-size: 22px;
    cursor: pointer;
    position: relative;
    color: var(--text-muted);
    transition: 0.3s;
}

.action-icon:hover {
    color: #fff;
}

.notif .dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: red;
    border-radius: 50%;
}

.user-avatar-mini {
    width: 38px;
    height: 38px;
    background: #ddd url('https://i.pravatar.cc/150?img=12') center/cover;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

/* --- Layout Structure --- */
.main-container {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
    align-items: start;
}

/* --- iOS Liquid Glass Design --- */
/* --- iOS Liquid Glass Design v2.0 (Ultra-Premium) --- */
/* --- iOS Liquid Glass Design v3.0 (Hyper-Glass) --- */
/* --- iOS Liquid Glass Design v4.0 (Prismatic Crystal) --- */
.glass-card {
    /* Pure Crystal Base */
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);

    /* Diamond-Cut Borders */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    /* Top catchlight */
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 32px;

    padding: 32px;
    margin-bottom: 25px;

    /* Soft Ambient Occlusion + Prism Glow */
    box-shadow:
        0 20px 40px -10px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        /* Inner rim */
        inset 0 0 40px rgba(100, 200, 255, 0.03);
    /* Cyan tint deep inside */

    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Top Specular Highlight Band */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.5) 20%,
            rgba(255, 255, 255, 0.8) 50%,
            rgba(255, 255, 255, 0.5) 80%,
            transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Inner Volume Glow - Disabled to prevent rendering artifacts */
/* .glass-card::after removed */

/* Hover State - Simplified to prevent visual glitches */
.glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow:
        0 25px 50px -10px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.4);
}

/* --- Sidebar Styles --- */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.big-avatar {
    width: 80px;
    height: 80px;
    background: #ddd url('https://i.pravatar.cc/150?img=12') center/cover;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
    position: relative;
}

.online-status {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 14px;
    height: 14px;
    background: var(--success-color);
    border: 2px solid #302b63;
    border-radius: 50%;
}

.profile-header h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.profile-header p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.profile-stats {
    width: 100%;
    margin-bottom: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

.stat-row:last-child {
    border-bottom: none;
}

.profile-progress {
    width: 100%;
    margin-bottom: 20px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 5px;
    opacity: 0.8;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: var(--success-color);
    border-radius: 3px;
}

.view-profile-btn {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.category-list {
    list-style: none;
}

.category-list li {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.category-list li:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(5px);
}

.category-list li.active {
    /* Prismatic Jelly Pill - Simplified */
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0.03) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.25);

    /* Clean internal lighting */
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
        0 8px 20px -5px rgba(0, 0, 0, 0.3);

    color: #fff;
    font-weight: 700;
    padding: 12px 24px;
    margin-bottom: 8px;
}



.category-list li span {
    font-size: 13px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* --- Main Content Styles --- */
/* Hero search inherits glass-card background now */
.hero-search {
    /* Background removed to use glass-card style */
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-search h1 {
    font-size: 30px;
    margin-bottom: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--neon-cyan) 70%, var(--neon-purple) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
    text-shadow: 0 0 30px rgba(0, 242, 254, 0.3);
}

.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-container input {
    flex: 1;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.03);
    /* Liquid Input */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.search-container input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(0, 242, 254, 0.2);
    transform: translateY(-1px);
}

.search-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg,
            rgba(67, 233, 123, 0.4) 0%,
            rgba(67, 233, 123, 0.1) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 15px 30px -5px rgba(67, 233, 123, 0.4),
        inset 0 0 20px rgba(67, 233, 123, 0.2);

    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.search-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle,
            rgba(255, 255, 255, 0.4) 0%,
            transparent 60%);
    transform: scale(0);
    transition: transform 0.4s ease;
}

.search-btn:hover::after {
    transform: scale(1);
}

.search-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(67, 233, 123, 0.5);
}

.search-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.quick-tags {
    font-size: 13px;
    color: var(--text-muted);
}

.quick-tags a {
    color: var(--accent-color);
    text-decoration: none;
    margin: 0 5px;
}

.section-title {
    margin: 25px 0 18px;
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, var(--neon-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-color);
}

/* --- Enhanced Job Cards --- */
/* --- Enhanced Job Cards (Liquid Compatible) --- */
.job-card {
    position: relative;
    /* Removed border-left to fit rounded liquid shape */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.job-card::after {
    /* Glow indicator instead of flat strip */
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--accent-gradient);
    border-radius: 4px;
    opacity: 0;
    transition: all 0.4s ease;
    filter: blur(4px);
}

.job-card:hover {
    /* Use Glass Hover from main class, just add glow */
    border-color: var(--accent-color);
    box-shadow:
        0 20px 60px -10px rgba(0, 0, 0, 0.6),
        inset 0 0 20px rgba(0, 242, 254, 0.1),
        /* Cyan tint on hover */
        0 0 30px rgba(0, 242, 254, 0.15);
    /* External glow */
}

.job-card:hover::after {
    opacity: 1;
    height: 70%;
    filter: blur(8px);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.job-title {
    font-size: 19px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-highlight) 0%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.job-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-highlight);
    transition: width 0.3s ease;
}

.job-title:hover::after {
    width: 100%;
}

.save-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.save-btn::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.3), transparent);
    transition: all 0.5s ease;
}

.save-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-color);
    color: #fff;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.save-btn.saved {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-color: #ff6b6b;
    color: #fff;
    animation: heartBeat 0.6s ease;
}

.save-btn.saved::before {
    width: 100%;
    height: 100%;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.25);
    }

    50% {
        transform: scale(1.1);
    }

    75% {
        transform: scale(1.2);
    }
}

.job-meta {
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--text-muted);
}

.price-tag {
    color: #fff;
    font-weight: 700;
    margin-left: 10px;
}

.level-tag {
    margin-left: 10px;
}

.time-posted {
    opacity: 0.7;
}

.job-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #e0e0e0;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background: rgba(255, 255, 255, 0.06);
    padding: 7px 14px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 500;
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tag::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.tag:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 242, 254, 0.3);
}

.tag:hover::before {
    width: 200%;
    height: 200%;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    color: var(--text-muted);
}

.verified-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
}

.verified-badge ion-icon {
    color: var(--success-color);
    font-size: 16px;
}

.verified-badge.unverified ion-icon {
    color: var(--text-muted);
}

.client-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.client-rating ion-icon {
    color: var(--warning-color);
    font-size: 12px;
}

.client-rating strong {
    color: #fff;
    margin: 0 5px;
}

.location {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive */
@media (max-width: 900px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .sidebar-col {
        display: none;
        /* Hide sidebar on small screens for now or replace with toggle */
    }

    .nav-links {
        display: none;
    }
}

/* --- Job Details Page Styles --- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 14px;
    transition: 0.2s;
}

.back-link:hover {
    color: var(--accent-color);
}

.detail-section h2 {
    margin-bottom: 15px;
    font-size: 22px;
    color: #fff;
}

.detail-text {
    margin-bottom: 25px;
    line-height: 1.8;
    color: #e0e0e0;
    font-size: 15px;
}

.proposal-form .form-group {
    margin-bottom: 20px;
}

.proposal-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.proposal-form input,
.proposal-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    outline: none;
    font-family: inherit;
}

.proposal-form textarea {
    resize: vertical;
    min-height: 120px;
}

.proposal-form input:focus,
.proposal-form textarea:focus {
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.4);
}

.submit-btn {
    background: var(--success-gradient);
    color: #fff;
    border: none;
    padding: 14px 35px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(67, 233, 123, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-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 ease, height 0.6s ease;
}

.submit-btn:hover::before {
    width: 300%;
    height: 300%;
}

.submit-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(67, 233, 123, 0.5);
}

.submit-btn:active {
    transform: translateY(-1px);
}

/* --- Profile Page Styles --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.portfolio-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
    border: 1px solid var(--glass-border);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.portfolio-img {
    height: 160px;
    background: #333;
    background-size: cover;
    background-position: center;
}

.portfolio-info {
    padding: 15px;
}

.portfolio-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.portfolio-info p {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- Messages Page Styles --- */
.messages-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 80vh;
    gap: 20px;
}

.chat-list {
    overflow-y: auto;
    padding-right: 5px;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-item:hover,
.chat-item.active {
    background: rgba(255, 255, 255, 0.1);
}

.chat-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #555;
    background-size: cover;
}

.chat-info h4 {
    font-size: 14px;
    margin-bottom: 3px;
}

.chat-info p {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 180px;
}

.chat-area {
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

.message.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border-bottom-right-radius: 4px;
}

.message.sent {
    align-self: flex-end;
    background: var(--secondary-color);
    color: #fff;
    border-bottom-left-radius: 4px;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    color: #fff;
    outline: none;
}

.send-btn {
    background: var(--accent-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: #000;
    cursor: pointer;
}

/* --- Post Job Styles --- */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
}

.step.active {
    opacity: 1;
    font-weight: bold;
    color: var(--accent-color);
}

.step-num {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Page Transitions --- */
body {
    opacity: 0;
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Note: Language modal styles are now defined at the top of this file (lines 253-500) */


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
        filter: blur(10px);
    }
}

/* ========================================
   RESPONSIVE DESIGN (Mobile & Tablet)
   ======================================== */

/* Unified Tablet & Mobile Navbar Layout (< 1250px) */
@media (max-width: 1250px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .sidebar-col {
        display: none;
        /* Sidebar hidden by default on mobile/tablet */
    }

    /* Navbar Tablet/Mobile Overhaul */
    .glass-navbar {
        height: auto;
        padding: 5px 0;
        margin-bottom: 20px;
    }

    .nav-container {
        flex-wrap: wrap;
        padding: 5px 15px;
        gap: 10px;
        justify-content: space-between;
    }

    .logo {
        font-size: 16px;
        /* Smaller font for mobile */
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .logo ion-icon {
        font-size: 22px;
        color: var(--accent-color);
    }

    .logo span {
        display: inline-block !important;
        /* Force show text */
        white-space: nowrap;
    }

    /* Action Buttons Group (Profile, Notif, Lang) */
    .nav-actions {
        order: 2;
        gap: 6px;
        flex-shrink: 0;
        margin-left: auto;
        /* Push to right */
    }

    #lang-toggle-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .user-avatar-mini {
        width: 32px;
        height: 32px;
    }

    /* Navigation Links - Full Width Row on Mobile */
    .nav-links {
        order: 3;
        width: 100%;
        display: flex !important;
        justify-content: flex-start;
        gap: 0;
        overflow-x: auto;
        padding: 10px 0 5px;
        /* Adjust padding */
        margin-top: 5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        mask-image: linear-gradient(to right, transparent, black 15px, black 85%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 15px, black 85%, transparent);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        /* Separator */
    }

    .nav-links::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .nav-links a {
        font-size: 13px;
        padding: 8px 14px;
        white-space: nowrap;
        flex-shrink: 0;
        margin-right: 4px;
        background: rgba(255, 255, 255, 0.03);
    }

    .nav-links img {
        display: none;
        /* Hide particles/images in nav links on mobile if any */
    }

    /* Main Layout */
    .main-container {
        grid-template-columns: 1fr;
        width: 95%;
        gap: 15px;
        margin: 15px auto;
    }

    .sidebar-col {
        display: none;
    }

    /* Hero Search */
    .hero-search {
        padding: 25px 20px;
    }

    .hero-search h1 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .search-container {
        flex-direction: column;
        gap: 10px;
    }

    .search-container input {
        width: 100%;
        padding: 14px 18px;
        font-size: 14px;
    }

    .search-btn {
        width: 100%;
        height: 50px;
        border-radius: 15px;
    }

    .quick-tags {
        font-size: 11px;
    }

    /* Glass Cards */
    .glass-card {
        padding: 20px;
        border-radius: 20px;
        margin-bottom: 15px;
    }

    /* Job Cards */
    .job-header {
        flex-direction: column;
        gap: 10px;
    }

    .job-title {
        font-size: 16px;
    }

    .save-btn {
        align-self: flex-end;
        width: 36px;
        height: 36px;
    }

    .job-meta {
        font-size: 12px;
    }

    .job-desc {
        font-size: 13px;
    }

    .job-tags {
        gap: 6px;
    }

    .tag {
        padding: 5px 10px;
        font-size: 11px;
    }

    .client-info {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 11px;
    }

    /* Messages */
    .messages-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .chat-list {
        display: none;
    }

    .messages-container.show-list .chat-list {
        display: block;
    }

    .messages-container.show-list .chat-area {
        display: none;
    }

    /* Post Job Form */
    .post-job-container {
        margin: 15px auto;
        padding: 0 10px 30px;
    }

    .post-job-header h1 {
        font-size: 24px;
    }

    .post-job-card {
        padding: 20px 15px;
        border-radius: 18px;
    }

    .section-header {
        margin-bottom: 18px;
        padding-bottom: 12px;
    }

    .section-header h2 {
        font-size: 16px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 13px;
    }

    .category-grid,
    .category-grid-post {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .category-card {
        padding: 12px 8px;
    }

    .category-card .cat-icon {
        font-size: 22px;
    }

    .category-card h4 {
        font-size: 11px;
    }

    .budget-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .budget-inputs {
        grid-template-columns: 1fr;
    }

    .budget-inputs.hourly {
        grid-template-columns: 1fr 1fr;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-next,
    .btn-cancel {
        width: 100%;
        justify-content: center;
    }



    .lang-header {
        padding: 20px;
    }

    .lang-search {
        padding: 15px 20px;
    }

    .lang-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 140px;
        padding: 15px;
        gap: 10px;
    }

    .lang-item {
        padding: 15px 10px;
    }

    .lang-item .flag {
        width: 50px;
        height: 33px;
    }

    .lang-item .name {
        font-size: 16px;
    }

    .lang-item .native {
        font-size: 12px;
    }

    /* Profile Card in Panel */
    .profile-header h3 {
        font-size: 16px;
    }

    .profile-header p {
        font-size: 12px;
    }

    .big-avatar {
        width: 60px;
        height: 60px;
    }

    .stat-row {
        font-size: 12px;
    }

    /* Section Titles */
    .section-title {
        font-size: 18px;
    }

    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Mobile Small (480px and below) */
@media (max-width: 480px) {

    /* Navbar Extra Small */
    .nav-container {
        padding: 8px 10px;
    }

    .logo {
        font-size: 16px;
    }

    .nav-links {
        gap: 3px;
    }

    .nav-links a {
        font-size: 10px;
        padding: 6px 8px;
    }

    .nav-actions {
        gap: 6px;
    }

    #lang-toggle-btn {
        padding: 4px 8px;
        font-size: 10px;
        gap: 6px;
    }

    #lang-toggle-btn ion-icon {
        font-size: 12px;
    }

    .action-icon {
        font-size: 18px;
    }

    .user-avatar-mini {
        width: 28px;
        height: 28px;
    }

    /* Main Content */
    .main-container {
        width: 100%;
        padding: 0 10px;
        margin: 10px auto;
    }

    /* Hero */
    .hero-search {
        padding: 20px 15px;
    }

    .hero-search h1 {
        font-size: 18px;
        line-height: 1.3;
    }

    .search-container input {
        padding: 12px 14px;
        font-size: 13px;
    }

    .search-btn {
        height: 45px;
    }

    /* Cards */
    .glass-card {
        padding: 15px;
        border-radius: 16px;
    }

    /* Job Cards */
    .job-title {
        font-size: 14px;
    }

    .job-desc {
        font-size: 12px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .tag {
        padding: 4px 8px;
        font-size: 10px;
    }

    .client-info {
        font-size: 10px;
        gap: 8px;
    }

    /* Post Job */
    .post-job-header h1 {
        font-size: 20px;
        flex-direction: column;
        gap: 8px;
    }

    .post-job-header h1 ion-icon {
        font-size: 28px;
    }

    .post-job-card {
        padding: 15px 12px;
    }

    .section-header h2 {
        font-size: 14px;
    }

    .section-header ion-icon {
        font-size: 20px;
    }

    .category-grid,
    .category-grid-post {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-card {
        padding: 10px 6px;
    }

    .category-card .cat-icon {
        font-size: 20px;
    }

    .category-card .cat-img {
        width: 28px;
        height: 28px;
    }

    .category-card h4 {
        font-size: 10px;
    }

    .skills-container {
        gap: 6px;
    }

    .skill-tag {
        padding: 4px 10px;
        font-size: 11px;
    }

    .suggested-skills {
        padding: 10px;
    }

    .suggested-skill {
        padding: 4px 8px;
        font-size: 10px;
    }

    .budget-option {
        padding: 14px;
    }

    .budget-option ion-icon {
        font-size: 22px;
    }

    .budget-option h4 {
        font-size: 12px;
    }

    .budget-option p {
        font-size: 10px;
    }

    .budget-inputs input {
        padding: 10px 12px 10px 30px;
        font-size: 13px;
    }

    .tips-section {
        padding: 12px 14px;
    }

    .tips-section h5 {
        font-size: 12px;
    }

    .tips-section p {
        font-size: 11px;
    }

    .btn-next {
        padding: 12px 25px;
        font-size: 13px;
    }

    .btn-cancel {
        padding: 10px 20px;
        font-size: 12px;
    }



    .lang-header {
        padding: 15px;
    }

    .lang-search {
        padding: 10px 15px;
    }

    .lang-search input {
        padding: 12px 15px 12px 40px;
        font-size: 14px;
    }

    .lang-search ion-icon {
        left: 30px;
        font-size: 18px;
    }

    .lang-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 120px;
        padding: 10px;
        gap: 8px;
    }

    .lang-item {
        padding: 10px 8px;
        gap: 8px;
    }

    .lang-item .flag {
        width: 40px;
        height: 27px;
    }

    .lang-item .name {
        font-size: 13px;
    }

    .lang-item .native {
        font-size: 10px;
    }

    /* Messages */
    .chat-input {
        padding: 10px;
    }

    .chat-input input {
        padding: 10px 15px;
        font-size: 13px;
    }

    .send-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .message {
        max-width: 85%;
        padding: 10px 14px;
        font-size: 13px;
    }

    /* Breadcrumb */
    .category-breadcrumb {
        gap: 4px;
    }

    .breadcrumb-item {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* Extra Small (360px and below) */
@media (max-width: 360px) {
    .nav-links a {
        font-size: 9px;
        padding: 5px 6px;
    }

    .hero-search h1 {
        font-size: 16px;
    }

    .category-grid,
    .category-grid-post {
        grid-template-columns: 1fr 1fr;
    }

    .lang-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 110px;
    }
}

/* Landscape Mode for Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .glass-navbar {
        height: 50px;
        margin-bottom: 10px;
    }

    .nav-links {
        padding: 5px 0;
    }

    .hero-search {
        padding: 15px;
    }

    .hero-search h1 {
        font-size: 18px;
        margin-bottom: 10px;
    }



    .lang-grid {
        grid-auto-rows: 100px;
        max-height: 70vh;
    }
}

/* --- Mobile Sidebar & Hamburger Menu --- */

/* Default state (Desktop): Hide hamburger and sidebar */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
}

.mobile-sidebar {
    display: none;
}

.mobile-sidebar-overlay {
    display: none;
}

/* Mobile Styles */
@media (max-width: 768px) {

    /* Hide desktop nav links */
    .nav-links {
        display: none !important;
    }

    /* Show Hamburger */
    .menu-toggle {
        display: block;
    }

    /* Sidebar Container */
    .mobile-sidebar {
        display: flex;
        /* Activate flex layout */
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden off-canvas */
        width: 280px;
        /* Sidebar width */
        height: 100dvh;
        background: rgba(15, 15, 25, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 10001;
        /* Above everything */
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 20px;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    }

    .mobile-sidebar.active {
        right: 0;
    }

    /* Sidebar Header */
    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 40px;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar-header .logo {
        font-size: 20px;
    }

    .sidebar-close {
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: #fff;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 18px;
        transition: all 0.2s ease;
    }

    .sidebar-close:active {
        background: var(--error-color);
        transform: scale(0.9);
    }

    /* Sidebar Links */
    .sidebar-links {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .sidebar-links li a {
        display: flex;
        align-items: center;
        width: 100%;
        /* Ensure full width clickability */
        padding: 12px 15px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
        border-radius: 12px;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.03);
    }

    .sidebar-links li.active a,
    .sidebar-links li a:active {
        background: rgba(0, 242, 254, 0.15);
        color: var(--accent-color);
        box-shadow: 0 4px 15px rgba(0, 242, 254, 0.1);
        border: 1px solid rgba(0, 242, 254, 0.2);
    }

    /* Overlay */
    .mobile-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 10000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .mobile-sidebar-overlay.active {
        opacity: 1;
        pointer-events: all;
    }
}

/* =========================================
   FINAL MODAL OVERRIDE (ULTIMATE FIX)
   ========================================= */
/* Ensure Overlay centers the children */
.lang-modal-overlay {
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
}

.lang-modal-overlay.active {
    display: flex !important;
}

/* Reset any lingering fixed positioning or transforms on the modal */
.lang-modal {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: scale(0.9);
    margin: auto !important;

    /* Box Model */
    width: 90vw !important;
    max-width: 800px !important;
    height: auto !important;
    max-height: 85dvh !important;
    overflow: hidden !important;

    /* Appearance */
    background: rgba(20, 20, 30, 0.95) !important;
    border-radius: 24px !important;

    /* Flex Layout */
    display: flex !important;
    flex-direction: column !important;
}

.lang-modal-overlay.active .lang-modal {
    transform: scale(1) !important;
    opacity: 1 !important;
}

/* =========================================
   TOP ALIGNMENT ADJUSTMENT
   ========================================= */
.lang-modal-overlay {
    align-items: flex-start !important;
    /* Move to top */
    padding-top: 8vh !important;
    /* Visual offset */
}

.lang-modal {
    margin: 0 auto !important;
    /* Center horizontally */
}