/* ==============================================
   CONNER ONLINE — Premium Dark Theme
   Gray/Black tones + glow + glassmorphism
   ============================================== */

/* =================== VARIABLES =================== */
:root {
    --bg-0: #08080c;
    --bg-1: #0e0e14;
    --bg-2: #141419;
    --bg-3: #1a1a22;
    --bg-4: #22222e;
    --bg-5: #2a2a38;

    --glass: rgba(20, 20, 28, 0.75);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-hover: rgba(30, 30, 42, 0.85);

    --border-1: rgba(255, 255, 255, 0.04);
    --border-2: rgba(255, 255, 255, 0.08);
    --border-3: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(99, 102, 241, 0.35);

    --text-1: #f0f0f8;
    --text-2: #b0b0c0;
    --text-3: #6e6e82;
    --text-4: #45455a;

    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --accent-dim: rgba(129, 140, 248, 0.12);
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-solid: #6366f1;

    --danger: #f87171;
    --danger-dim: rgba(248, 113, 113, 0.12);
    --success: #34d399;
    --success-dim: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;

    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.08);
    --shadow-glow-strong: 0 0 60px rgba(99, 102, 241, 0.15);

    --trans-fast: 0.15s ease;
    --trans: 0.25s ease;
    --trans-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --navbar-h: 60px;
    --sidebar-w: 260px;
    
    --robot-primary: #6366f1;
    --robot-accent: #a5b4fc;
}

[data-theme="light"] {
    --bg-0: #f5f5fa;
    --bg-1: #ffffff;
    --bg-2: #f9f9fc;
    --bg-3: #f0f0f5;
    --bg-4: #e8e8f0;
    --bg-5: #e0e0ea;

    --glass: rgba(255, 255, 255, 0.84);
    --glass-border: rgba(0, 0, 0, 0.04);
    --glass-hover: rgba(250, 250, 255, 0.9);

    --border-1: rgba(0, 0, 0, 0.05);
    --border-2: rgba(0, 0, 0, 0.08);
    --border-3: rgba(0, 0, 0, 0.12);
    --border-accent: rgba(99, 102, 241, 0.2);

    --text-1: #1a1a1e;
    --text-2: #4a4a5a;
    --text-3: #7e7e8e;
    --text-4: #9ea4b0;

    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-dim: rgba(79, 70, 229, 0.08);
    --accent-glow: rgba(79, 70, 229, 0.1);
    --accent-solid: #6366f1;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.12);
}

/* =================== RESET =================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-0);
    color: var(--text-1);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input,
textarea,
select {
    font-family: inherit;
}

/* =================== MATERIAL SYMBOLS =================== */
.material-symbols-rounded {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24;
  vertical-align: middle;
  line-height: 1;
}

/* Admin Badge & Crown - Elegant Glow Version */
.admin-badge {
    color: #ffca28;
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    background-clip: text; /* Standard property */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 20px !important;
    vertical-align: middle;
    margin-left: 6px;
    cursor: default;
    /* Static multi-layer glow */
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.6)) 
            drop-shadow(0 0 8px rgba(255, 140, 0, 0.4));
    user-select: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.admin-badge.premium-glow {
    /* Subtle breathing glow only, no movement */
    animation: crown-glow-soft 3s ease-in-out infinite;
}

@keyframes crown-glow-soft {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 8px rgba(255, 140, 0, 0.4)); }
    50% { filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 15px rgba(255, 140, 0, 0.6)); }
}

.admin-badge.clickable {
    cursor: pointer;
}

.admin-badge.clickable:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8)) !important;
}

.admin-badge.clickable:active {
    transform: scale(0.9);
}

/* Admin Status Dashboard */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6e6e82;
    position: relative;
    transition: all 0.3s ease;
}

.status-dot.online {
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
    animation: status-pulse-green 2s infinite;
}

.status-dot.offline {
    background: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.5);
    animation: status-pulse-red 2s infinite;
}

@keyframes status-pulse-green {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

@keyframes status-pulse-red {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

/* =================== AMBIENT BG =================== */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.06;
}

.glow-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-solid), transparent 70%);
    top: -200px;
    left: -150px;
    animation: orbDrift 25s ease-in-out infinite;
}

.glow-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #7c3aed, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation: orbDrift 30s ease-in-out infinite reverse;
}

.glow-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #4f46e5, transparent 70%);
    top: 40%;
    left: 50%;
    animation: orbDrift 20s ease-in-out infinite 5s;
}

@keyframes orbDrift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.05;
    }

    25% {
        transform: translate(40px, -60px) scale(1.15);
        opacity: 0.08;
    }

    50% {
        transform: translate(-30px, 40px) scale(0.9);
        opacity: 0.04;
    }

    75% {
        transform: translate(20px, 20px) scale(1.05);
        opacity: 0.07;
    }
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* =================== GLASS CARD =================== */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transition: border-color var(--trans), box-shadow var(--trans);
}

.glass-card:hover {
    border-color: var(--border-2);
}

/* =================== NAVBAR =================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--navbar-h);
    background: rgba(8, 8, 12, 0.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border-1);
}

.navbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-hex-sm {
    display: flex;
    align-items: center;
}

.nav-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: 0.04em;
}

.nav-brand em {
    font-style: normal;
    color: var(--accent);
}

.nav-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
}

.search-input {
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-full);
    color: var(--text-1);
    font-size: 13px;
    padding: 9px 16px 9px 38px;
    outline: none;
    transition: all var(--trans);
}

.search-input::placeholder {
    color: var(--text-4);
}

.search-input:focus {
    background: var(--bg-4);
    border-color: var(--border-accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* ===== GLOBAL ROBOT LOADER ===== */
.robot-loader-wrap {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(8, 8, 12, 0.6);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 1;
    transition: all 0.5s ease;
}

.robot-loader-wrap.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

.robot-loader-wrap::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    z-index: -1;
    animation: glowMove 4s ease-in-out infinite alternate;
}

@keyframes glowMove {
    from { transform: translate(-30px, -20px); }
    to { transform: translate(30px, 20px); }
}

.robot {
    width: 60px;
    height: 60px;
    position: relative;
    animation: robotFloat 2s ease-in-out infinite;
}

.robot-head {
    width: 50px;
    height: 40px;
    background: var(--robot-primary);
    border-radius: 12px;
    position: absolute;
    top: 5px;
    left: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    transition: all 0.3s;
}

.robot-eyes {
    display: flex;
    gap: 8px;
}

.eye {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: eyeBlink 4s infinite;
}

.robot-mouth {
    width: 15px;
    height: 3px;
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
    transition: all 0.3s;
}

.robot-antenna {
    width: 2px;
    height: 10px;
    background: var(--robot-accent);
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.robot-antenna::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-solid);
    border-radius: 50%;
    position: absolute;
    top: -4px;
    left: -2px;
    box-shadow: 0 0 10px var(--accent-solid);
    animation: pulse 1s infinite;
}

.robot.success .robot-head {
    background: var(--success);
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(52, 211, 153, 0.4);
}

.robot.success .robot-mouth {
    height: 8px;
    width: 15px;
    border-radius: 0 0 15px 15px;
    background: #fff;
    margin-top: -2px;
}

@keyframes robotFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes eyeBlink {
    0%, 45%, 55%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.1); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.loader-text {
    color: var(--text-1);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
    font-family: 'Space Grotesk', sans-serif;
}

.nav-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all var(--trans);
}

.nav-btn:hover {
    background: var(--bg-3);
    color: var(--text-1);
    border-color: var(--border-1);
}

.nav-btn.active {
    color: var(--accent);
}

.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.nav-avatar-wrap {
    position: relative;
}

.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-2);
    cursor: pointer;
    transition: border-color var(--trans);
    object-fit: cover;
}

.nav-avatar:hover {
    border-color: var(--accent);
}

.avatar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: all var(--trans);
    z-index: 200;
}

.avatar-dropdown.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: var(--radius-xs);
    color: var(--text-2);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: all var(--trans-fast);
    text-decoration: none;
}

.dropdown-item:hover {
    background: var(--bg-4);
    color: var(--text-1);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item.danger:hover {
    background: var(--danger-dim);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-1);
    margin: 4px 0;
}

/* =================== AUTH PAGE =================== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-container {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 960px;
    min-height: 600px;
    margin: 20px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg), var(--shadow-glow-strong);
    animation: authSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes authSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-brand {
    flex: 1;
    background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-4) 100%);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-1);
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 70%, rgba(99, 102, 241, 0.08), transparent 60%);
}

.brand-content {
    position: relative;
    z-index: 1;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.logo-hex {
    animation: hexGlow 4s ease-in-out infinite;
}

@keyframes hexGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.6));
    }
}

.brand-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-1);
}

.brand-name .accent {
    color: var(--accent);
}

.brand-tagline {
    font-size: 14px;
    color: var(--text-3);
    margin-bottom: 32px;
    letter-spacing: 0.08em;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-md);
    transition: all var(--trans);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-2);
    transform: translateX(4px);
}

.feature-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-item strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 2px;
}

.feature-item p {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.4;
}

/* Auth Form */
.auth-form-panel {
    flex: 1;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-form-wrap {
    width: 100%;
    max-width: 360px;
}

.auth-form {
    animation: formFadeIn 0.3s ease;
}

@keyframes formFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 4px;
}

.form-sub {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-4);
    transition: color var(--trans);
    pointer-events: none;
}

.input-wrap:focus-within .input-icon {
    color: var(--accent);
}

.form-input {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-size: 14px;
    padding: 11px 12px 11px 38px;
    outline: none;
    transition: all var(--trans);
}

.form-input::placeholder {
    color: var(--text-4);
}

.form-input:focus {
    background: var(--bg-3);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim), var(--shadow-glow);
}

textarea.form-input {
    padding-left: 12px;
    resize: vertical;
    min-height: 60px;
}

.toggle-pass {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-4);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    transition: color var(--trans-fast);
}

.toggle-pass:hover {
    color: var(--text-2);
}

/* Password strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.strength-bar {
    flex: 1;
    height: 3px;
    background: var(--bg-4);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: all var(--trans);
}

.strength-fill.weak {
    width: 33%;
    background: var(--danger);
}

.strength-fill.medium {
    width: 66%;
    background: var(--warning);
}

.strength-fill.strong {
    width: 100%;
    background: var(--success);
}

.strength-text {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-3);
    min-width: 40px;
}

/* Form Row */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-3);
}

.checkbox-wrap input {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    background: var(--bg-2);
    border: 1px solid var(--border-3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--trans-fast);
}

.checkbox-wrap input:checked+.checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-wrap input:checked+.checkmark::after {
    content: '✓';
    font-size: 10px;
    color: #fff;
    font-weight: 700;
}

.form-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    transition: color var(--trans-fast);
}

.form-link:hover {
    color: var(--accent-hover);
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-solid), #7c3aed);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--trans);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: opacity var(--trans);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4), 0 0 40px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loader {
    display: flex;
}

.btn-loader.hidden {
    display: none;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-text {
    /* for hiding during loading */
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-2);
}

.divider span {
    font-size: 11px;
    color: var(--text-4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.btn-google {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    padding: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--trans);
}

.btn-google:hover {
    background: var(--bg-3);
    border-color: var(--border-3);
    color: var(--text-1);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-3);
}

/* =================== FEED LAYOUT =================== */
.main-feed {
    position: relative;
    z-index: 1;
    padding-top: calc(var(--navbar-h) + 20px);
    padding-bottom: 40px;
}

.feed-layout {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr var(--sidebar-w);
    gap: 24px;
    padding: 0 20px;
    align-items: start;
}

/* =================== SIDEBAR =================== */
.sidebar {
    position: sticky;
    top: calc(var(--navbar-h) + 20px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-card {
    padding: 16px;
}

.user-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.user-mini-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-2);
    object-fit: cover;
}

.user-mini-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
}

.user-mini-email {
    font-size: 11px;
    color: var(--text-3);
}

.sidebar-stats {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-1);
}

.stat {
    flex: 1;
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-1);
}

.stat-label {
    display: block;
    font-size: 10px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 12px;
}

.sidebar-link {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    color: var(--text-3);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--trans-fast);
    text-decoration: none;
}

.sidebar-link:hover {
    background: var(--bg-4);
    color: var(--text-1);
}

.sidebar-link.active {
    background: var(--accent-dim);
    color: var(--accent);
}

/* =================== CREATE POST =================== */
.create-post {
    padding: 20px;
    margin-bottom: 20px;
}

.create-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.create-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-2);
    flex-shrink: 0;
    object-fit: cover;
}

.create-input-wrap {
    flex: 1;
}

.create-textarea {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-size: 14px;
    padding: 10px 14px;
    resize: none;
    outline: none;
    min-height: 44px;
    max-height: 200px;
    transition: all var(--trans);
}

.create-textarea::placeholder {
    color: var(--text-4);
}

.create-textarea:focus {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
    min-height: 80px;
}

.create-image-preview {
    position: relative;
    margin: 0 0 12px;
    border-radius: var(--radius-md);
    overflow: hidden;
    max-height: 300px;
}

.create-image-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--trans-fast);
}

.remove-image:hover {
    background: var(--danger);
}

.create-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-1);
}

.create-actions {
    display: flex;
    gap: 6px;
}

.create-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--border-1);
    border-radius: var(--radius-full);
    color: var(--text-3);
    font-size: 12px;
    font-weight: 500;
    padding: 7px 14px;
    cursor: pointer;
    transition: all var(--trans-fast);
}

.create-action-btn:hover {
    background: var(--bg-4);
    border-color: var(--border-2);
    color: var(--text-1);
}

.btn-post {
    background: var(--accent-solid);
    border: none;
    border-radius: var(--radius-full);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--trans);
}

.btn-post:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.btn-post:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =================== POST CARD =================== */
.post-card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
    overflow: hidden;
    transition: all var(--trans);
    animation: postSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes postSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card:hover {
    border-color: var(--border-2);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px 0;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-2);
    cursor: pointer;
    transition: border-color var(--trans-fast);
    object-fit: cover;
}

.post-avatar:hover {
    border-color: var(--accent);
}

.post-author-info {
    flex: 1;
}

.post-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    cursor: pointer;
}

.post-author:hover {
    color: var(--accent);
}

.post-time {
    font-size: 11px;
    color: var(--text-4);
}

.post-menu-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-xs);
    color: var(--text-4);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--trans-fast);
}

.post-menu-btn:hover {
    background: var(--bg-4);
    color: var(--text-2);
}

.post-content {
    padding: 12px 18px;
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-image-wrap {
    margin: 0 18px 12px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    max-height: 500px;
}

.post-image-wrap img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    transition: transform var(--trans-slow);
}

.post-image-wrap:hover img {
    transform: scale(1.02);
}

.post-actions-bar {
    display: flex;
    align-items: center;
    padding: 8px 18px 14px;
    gap: 4px;
}

.post-action {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-3);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    cursor: pointer;
    transition: all var(--trans-fast);
}

.post-action:hover {
    background: var(--bg-4);
    color: var(--text-1);
}

.post-action.liked {
    color: var(--danger);
}

.post-action.liked:hover {
    background: var(--danger-dim);
}

.post-action.report {
    color: var(--danger);
    opacity: 0.5;
    padding: 8px;
    filter: drop-shadow(0 0 2px rgba(248, 113, 113, 0));
    transition: all var(--trans);
}

.post-action.report:hover {
    background: var(--danger-dim);
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(248, 113, 113, 0.4));
    transform: translateY(-1px);
}

.post-action.report .material-symbols-rounded {
    transition: transform var(--trans-fast);
}

.post-action.report:hover .material-symbols-rounded {
    transform: scale(1.1) rotate(5deg);
}

.post-action svg {
    transition: transform var(--trans-fast);
}

.post-action:hover svg {
    transform: scale(1.15);
}

.post-action .action-count {
    font-variant-numeric: tabular-nums;
}

/* =================== SKELETON LOADING =================== */
.post-skeleton {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}

.skeleton-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    background: var(--bg-4);
    border-radius: var(--radius-full);
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-lines {
    flex: 1;
}

.skeleton-line {
    height: 10px;
    background: var(--bg-4);
    border-radius: 4px;
    margin-bottom: 6px;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-line.w100 {
    width: 100%;
}

.skeleton-line.w80 {
    width: 80%;
}

.skeleton-line.w60 {
    width: 60%;
}

.skeleton-line.w40 {
    width: 40%;
}

.skeleton-body {
    margin-bottom: 16px;
}

.skeleton-image {
    height: 200px;
    background: var(--bg-4);
    border-radius: var(--radius-md);
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

/* =================== EMPTY STATE =================== */
.empty-feed {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-2);
}

.empty-sub {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 4px;
}

.btn-load-more {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--bg-3);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--trans);
}

.btn-load-more:hover {
    background: var(--bg-4);
    border-color: var(--border-2);
    color: var(--text-1);
}

/* =================== PROFILE =================== */
.main-profile {
    position: relative;
    z-index: 1;
    padding-top: var(--navbar-h);
}

.profile-cover {
    height: 200px;
    background: linear-gradient(135deg, var(--bg-3), var(--bg-5));
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.cover-edit {
    position: absolute;
    bottom: 16px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--trans-fast);
    z-index: 10;
}

.cover-edit:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-2px);
}

.cover-edit .material-symbols-rounded {
    font-size: 18px;
}

.cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(124, 58, 237, 0.08), transparent);
    animation: coverShift 8s ease-in-out infinite;
}

@keyframes coverShift {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
        background-position: 100% 50%;
    }
}

.profile-header-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.profile-header-inner {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-top: -50px;
    flex-wrap: wrap;
}

.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 112px;
    height: 112px;
    border-radius: var(--radius-full);
    border: 4px solid var(--bg-0);
    box-shadow: var(--shadow-md), 0 0 30px rgba(99, 102, 241, 0.2);
    object-fit: cover;
}

.avatar-edit {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 30px;
    height: 30px;
    background: var(--accent-solid);
    border: 2px solid var(--bg-0);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: all var(--trans-fast);
}

.avatar-edit:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.profile-info {
    flex: 1;
    padding-bottom: 8px;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-1);
}

.profile-bio {
    font-size: 13px;
    color: var(--text-3);
    margin: 4px 0 12px;
}

.profile-stats {
    display: flex;
    gap: 24px;
}

.profile-actions {
    padding-bottom: 8px;
}

.btn-edit-profile {
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    cursor: pointer;
    transition: all var(--trans);
}

.btn-edit-profile:hover {
    background: var(--bg-4);
    border-color: var(--border-3);
    color: var(--text-1);
    transform: translateY(-1px);
}

/* Profile Tabs */
.profile-tabs {
    max-width: 800px;
    margin: 24px auto 0;
    padding: 0 20px;
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-1);
}

.profile-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-3);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 20px;
    cursor: pointer;
    transition: all var(--trans);
}

.profile-tab:hover {
    color: var(--text-1);
}

.profile-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.profile-content {
    max-width: 800px;
    margin: 20px auto 0;
    padding: 0 20px 40px;
}

/* =================== MODALS =================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    max-width: 480px;
    width: 100%;
    padding: 24px;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.95) translateY(10px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-1);
}

.modal-close {
    width: 32px;
    height: 32px;
    background: var(--bg-4);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-full);
    color: var(--text-2);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--trans-fast);
}

.modal-close:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.modal-backdrop {
    position: absolute;
    inset: 0;
}

.modal-image-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
}

.modal-image-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7);
}

.modal-image-content .modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 2;
}

/* Comments */
.comment-modal-content {
    max-width: 520px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
    min-height: 100px;
    max-height: 400px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-2) transparent;
}

.comment-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-1);
    animation: fadeIn 0.3s ease;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-author {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-1);
}

.btn-delete-comment {
    background: transparent;
    border: none;
    color: var(--text-4);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    transition: all var(--trans);
}

.btn-delete-comment:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.comment-text {
    font-size: 13px;
    color: var(--text-2);
    margin-top: 2px;
    line-height: 1.5;
}

.comment-time {
    font-size: 10px;
    color: var(--text-4);
    margin-top: 2px;
}

.comment-input-wrap {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-1);
    margin-top: 8px;
}

.comment-input {
    flex: 1;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-full);
    color: var(--text-1);
    font-size: 13px;
    padding: 9px 14px;
    outline: none;
    transition: all var(--trans);
}

.comment-input::placeholder {
    color: var(--text-4);
}

.comment-input:focus {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.btn-comment-send {
    width: 38px;
    height: 38px;
    background: var(--accent-solid);
    border: none;
    border-radius: var(--radius-full);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--trans-fast);
    flex-shrink: 0;
}

.btn-comment-send:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

/* Emoji Picker */
.emoji-picker {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.emoji-btn {
    background: transparent;
    border: none;
    font-size: 22px;
    padding: 6px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--trans-fast);
}

.emoji-btn:hover {
    background: var(--bg-4);
    transform: scale(1.2);
}

/* =================== TOAST =================== */
.toast-container {
    position: fixed;
    top: calc(var(--navbar-h) + 12px);
    right: 20px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.auth-page .toast-container {
    top: 20px;
}

.toast {
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: all;
    max-width: 320px;
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

.toast.info {
    border-left: 3px solid var(--accent);
}

.toast.hiding {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* =================== UTILS =================== */
.hidden {
    display: none !important;
}

.text-muted {
    color: var(--text-3);
}

.text-sm {
    font-size: 12px;
}

.text-center {
    text-align: center;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trending-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px 0;
}

.trending-rank {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent);
    min-width: 22px;
}

.trending-text {
    font-size: 12px;
    color: var(--text-2);
}

/* Mobile Nav Styles */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(14, 14, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-1);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1000;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-3);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    background: none;
    border: none;
    padding: 8px;
    transition: all var(--trans);
}

.mobile-nav-link .material-symbols-rounded {
    font-size: 24px;
}

.mobile-nav-link.active {
    color: var(--accent);
}

.mobile-post-plus {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-solid), #7c3aed);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-top: -24px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.mobile-search-content {
    width: 90%;
    max-width: 400px;
    padding: 20px;
}

.mobile-search-body {
    padding-top: 15px;
}

.nav-search.mobile {
    display: block !important;
    max-width: none;
    width: 100%;
}

/* =================== RESPONSIVE =================== */

@media (max-width: 1100px) {
    .navbar-inner {
        max-width: 800px;
    }
    
    .feed-layout {
        grid-template-columns: 1fr;
        max-width: 680px;
        margin: 0 auto;
        padding-top: calc(var(--navbar-h) + 16px);
    }

    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-h: 56px;
    }

    .navbar-inner {
        padding: 0 16px;
    }

    .nav-search {
        display: none;
    }

    .mobile-nav {
        display: flex;
    }

    .main-feed {
        padding-bottom: 80px; /* Space for mobile nav */
    }

    .feed-layout {
        max-width: 100%;
        padding: 12px;
        padding-top: calc(var(--navbar-h) + 12px);
    }

    .create-post {
        margin-bottom: 12px;
        border-radius: var(--radius-md);
    }

    .create-action-btn span:last-child {
        display: none;
    }

    .post-card {
        margin-bottom: 12px;
        border-radius: var(--radius-md);
    }

    /* Auth Responsive */
    .auth-container {
        flex-direction: column;
        max-width: 450px;
        min-height: auto;
    }

    .auth-brand {
        padding: 30px;
        border-right: none;
        border-bottom: 1px solid var(--border-1);
        display: flex;
        justify-content: center;
        text-align: center;
    }

    .brand-logo {
        justify-content: center;
    }

    .brand-features {
        display: none;
    }

    .brand-tagline {
        margin-bottom: 0;
    }

    .auth-form-panel {
        padding: 30px 20px 40px;
    }

    /* Profile Responsive */
    .profile-cover {
        height: 160px;
    }

    .cover-edit {
        bottom: 12px;
        right: 12px;
        padding: 6px 10px;
    }

    .cover-edit span:last-child {
        display: none; /* Hide text on mobile, just icon */
    }

    .profile-header-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -60px;
    }

    .profile-stats {
        justify-content: center;
        gap: 30px;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
        margin-bottom: 10px;
    }

    .profile-name {
        font-size: 20px;
    }

    .profile-bio {
        margin-bottom: 16px;
    }

    .profile-stats {
        justify-content: center;
        gap: 20px;
    }

    .profile-tab {
        padding: 10px 12px;
        font-size: 12px;
    }

    /* Modal Responsive */
    .modal-overlay {
        padding: 12px;
    }

    .modal-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .nav-brand {
        font-size: 15px;
    }

    .post-content {
        font-size: 14px;
    }

    .post-action {
        padding: 8px 12px;
        font-size: 12px;
    }

    .create-post {
        padding: 16px;
    }

    .post-card {
        padding: 16px;
    }
}


/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-4);
}

/* Pinned Post Styles */
.pinned-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 12px;
    padding: 4px 8px;
    background: var(--accent-dim);
    border-radius: var(--radius-sm);
    width: fit-content;
}

.btn-pin {
    background: transparent;
    border: none;
    color: var(--text-4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: var(--radius-full);
    transition: all var(--trans);
}

.btn-pin:hover {
    background: var(--bg-4);
    color: var(--accent);
}

.btn-pin.active {
    color: var(--accent);
    background: var(--accent-dim);
}

.post-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}