﻿/**, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --primary-soft: rgba(59, 130, 246, 0.1);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --gray-900: #1e293b;
    --gray-800: #334155;
    --gray-700: #475569;
    --gray-600: #64748b;
    --gray-500: #94a3b8;
    --gray-400: #cbd5e1;
    --gray-300: #e2e8f0;
    --gray-200: #f1f5f9;
    --gray-100: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --radius-full: 9999px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 30%, #e0f2fe 70%, #ffffff 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.home-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px;
    min-height: 100vh;
}

.home-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #1d4ed8 100%);
    padding: 48px 20px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.3);
}

.home-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-header h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--white);
    letter-spacing: -0.5px;
}

.home-header-btn {
    padding: 14px 28px;
    background: var(--white);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

    .home-header-btn:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.3);
    }

.timeline-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.post-card {
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

    .post-card:hover {
        background: linear-gradient(90deg, rgba(59, 130, 246, 0.03) 0%, transparent 100%);
    }

.post-wrapper {
    display: flex;
    gap: 16px;
}

.post-avatar-col {
    flex-shrink: 0;
}

.post-avatar, .post-avatar-fallback {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--gray-200);*/ /* Placeholder color until load */
/*}

.post-avatar-fallback {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.post-body {
    flex: 1;
    min-width: 0;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.post-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
}

.post-handle, .post-time {
    font-size: 0.95rem;
    color: var(--gray-500);
    text-decoration: none;
}

.post-separator {
    color: var(--gray-400);
    font-size: 0.9rem;
}

.post-more {
    margin-left: auto;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
}

    .post-more svg {
        width: 20px;
        height: 20px;
        display: block;
    }

.post-content {
    font-size: 1.05rem;
    color: var(--gray-800);
    line-height: 1.75;
    margin-bottom: 16px;
    word-wrap: break-word;
}

.post-media {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--gray-200);
    background-color: var(--gray-100);*/ /* Placeholder background */
/*}

    .post-media img, .post-media video {
        width: 100%;
        max-height: 400px;
        object-fit: cover;
        display: block;
    }*/

/* انیمیشن لود رسانه ها */
/*.fade-in-media {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

    .fade-in-media.loaded {
        opacity: 1;
    }

.post-empty {
    text-align: center;
    padding: 80px 40px;
}

.post-empty-icon {
    font-size: 5rem;
    margin-bottom: 24px;
    opacity: 0.6;
}

.post-empty h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
}

.post-empty p {
    font-size: 1.1rem;
    color: var(--gray-500);
}*/

/* استایل‌های اسپینر لودینگ */
/*.loading-container {
    text-align: center;
    padding: 30px;
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid var(--primary-soft);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 1024px) {
    .home-wrapper {
        grid-template-columns: 1fr;
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .home-header {
        padding: 32px 16px;
    }

    .home-wrapper {
        padding: 16px;
    }

    .post-card {
        padding: 16px;
    }

    .post-avatar, .post-avatar-fallback {
        width: 48px;
        height: 48px;
    }
}*/
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --primary-soft: rgba(59, 130, 246, 0.08);
    --dark: #0f172a;
    --gray-900: #1e293b;
    --gray-800: #334155;
    --gray-700: #475569;
    --gray-600: #64748b;
    --gray-500: #94a3b8;
    --gray-400: #cbd5e1;
    --gray-300: #e2e8f0;
    --gray-200: #f1f5f9;
    --gray-100: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --radius-full: 9999px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 30%, #e0f2fe 70%, #ffffff 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════
        BACKGROUND EFFECTS
        ═══════════════════════════════════════════════════════════════ */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 30%, #e0f2fe 70%, #ffffff 100%);
}

.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.8;
    background: radial-gradient(ellipse at 10% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%), radial-gradient(ellipse at 90% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 50%), radial-gradient(ellipse at 50% 50%, rgba(96, 165, 250, 0.05) 0%, transparent 60%);
    animation: meshFloat 15s ease-in-out infinite;
    will-change: transform;
}

@keyframes meshFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.02);
    }
}

/* Floating Bubbles */
.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(96, 165, 250, 0.2) 100%);
    border-radius: 50%;
    animation: rise linear infinite;
    border: 1px solid rgba(59, 130, 246, 0.15);
    will-change: transform, opacity;
}

    .bubble::before {
        content: '';
        position: absolute;
        top: 15%;
        left: 20%;
        width: 30%;
        height: 30%;
        background: rgba(255, 255, 255, 0.7);
        border-radius: 50%;
    }

    .bubble:nth-child(1) {
        left: 5%;
        width: 35px;
        height: 35px;
        animation-duration: 18s;
        animation-delay: 0s;
    }

    .bubble:nth-child(2) {
        left: 12%;
        width: 22px;
        height: 22px;
        animation-duration: 22s;
        animation-delay: 2s;
    }

    .bubble:nth-child(3) {
        left: 20%;
        width: 45px;
        height: 45px;
        animation-duration: 16s;
        animation-delay: 4s;
    }

    .bubble:nth-child(4) {
        left: 28%;
        width: 28px;
        height: 28px;
        animation-duration: 20s;
        animation-delay: 1s;
    }

    .bubble:nth-child(5) {
        left: 36%;
        width: 38px;
        height: 38px;
        animation-duration: 24s;
        animation-delay: 3s;
    }

    .bubble:nth-child(6) {
        left: 44%;
        width: 18px;
        height: 18px;
        animation-duration: 19s;
        animation-delay: 5s;
    }

    .bubble:nth-child(7) {
        left: 52%;
        width: 42px;
        height: 42px;
        animation-duration: 21s;
        animation-delay: 2s;
    }

    .bubble:nth-child(8) {
        left: 60%;
        width: 30px;
        height: 30px;
        animation-duration: 17s;
        animation-delay: 4s;
    }

    .bubble:nth-child(9) {
        left: 68%;
        width: 25px;
        height: 25px;
        animation-duration: 23s;
        animation-delay: 1s;
    }

    .bubble:nth-child(10) {
        left: 76%;
        width: 48px;
        height: 48px;
        animation-duration: 20s;
        animation-delay: 3s;
    }

    .bubble:nth-child(11) {
        left: 84%;
        width: 20px;
        height: 20px;
        animation-duration: 25s;
        animation-delay: 6s;
    }

    .bubble:nth-child(12) {
        left: 92%;
        width: 55px;
        height: 55px;
        animation-duration: 15s;
        animation-delay: 0s;
    }

@keyframes rise {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-110vh) translateX(30px) rotate(360deg);
        opacity: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════
        MAIN LAYOUT - DESKTOP
        ═══════════════════════════════════════════════════════════════ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════
        SIDEBAR
        ═══════════════════════════════════════════════════════════════ */
.sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(59, 130, 246, 0.1);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    z-index: 100;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(59, 130, 246, 0.08);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
}

    .logo:hover {
        transform: scale(1.08) rotate(-3deg);
        box-shadow: 0 8px 25px var(--primary-glow);
    }

    .logo svg {
        width: 32px;
        height: 32px;
        fill: #ffffff;
    }

.nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-radius: var(--radius-full);
    color: var(--gray-600);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

    .nav-item:hover {
        color: var(--primary);
        background: var(--primary-soft);
    }

    .nav-item.active {
        background: var(--primary-soft);
        color: var(--primary);
        box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.2);
    }

    .nav-item svg {
        width: 26px;
        height: 26px;
        fill: currentColor;
        flex-shrink: 0;
        transition: transform 0.3s ease;
    }

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

.user-menu {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .user-info:hover {
        background: var(--primary-soft);
    }

.user-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.user-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 32px;
    margin-top: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px var(--primary-glow);
}

    .post-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px var(--primary-glow);
    }

.main-wrapper {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.desktop-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.05);
}

    .desktop-header h1 {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--dark);
        letter-spacing: -0.5px;
    }

    .desktop-header svg {
        width: 24px;
        height: 24px;
        fill: var(--gray-400);
        cursor: pointer;
        transition: all 0.3s ease;
    }

        .desktop-header svg:hover {
            fill: var(--primary);
            transform: rotate(90deg);
        }

.content-area {
    flex: 1;
    padding: 20px;
}

.mobile-header {
    display: none;
}

.fab-btn {
    display: none;
}

.bottom-nav {
    display: none;
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }

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

.sidebar {
    animation: fadeInUp 0.5s ease forwards;
}

.nav-item {
    opacity: 0;
    animation: fadeIn 0.4s ease forwards;
}

    .nav-item:nth-child(1) {
        animation-delay: 0.1s;
    }

    .nav-item:nth-child(2) {
        animation-delay: 0.15s;
    }

    .nav-item:nth-child(3) {
        animation-delay: 0.2s;
    }

.post-btn {
    opacity: 0;
    animation: fadeInUp 0.5s ease 0.3s forwards;
}

.desktop-header {
    animation: fadeInUp 0.4s ease forwards;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 88px;
        padding: 16px 8px;
    }

    .logo {
        width: 52px;
        height: 52px;
        margin: 0 auto 28px;
    }

        .logo svg {
            width: 28px;
            height: 28px;
        }

    .nav-item {
        padding: 14px;
        justify-content: center;
        border-radius: var(--radius-md);
    }

        .nav-item span {
            display: none;
        }

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

    .user-info {
        justify-content: center;
        padding: 8px;
    }

    .user-name {
        display: none;
    }

    .post-btn {
        padding: 14px;
        margin-top: 16px;
    }

        .post-btn span {
            display: none;
        }

    .main-wrapper {
        margin-left: 88px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-wrapper {
        margin-left: 0;
        padding-bottom: 100px;
    }

    .desktop-header {
        display: none;
    }

    .mobile-header {
        display: block;
        position: sticky;
        top: 0;
        z-index: 50;
        padding: 12px 16px;
        animation: fadeInUp 0.4s ease forwards;
    }

    .mobile-header-pill {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: var(--radius-full);
        padding: 12px 20px;
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1), 0 0 0 1px rgba(59, 130, 246, 0.1);
    }

    .mobile-header h1 {
        font-size: 1.1rem;
        font-weight: 800;
        color: var(--dark);
    }

    .mobile-header-icon {
        width: 36px;
        height: 36px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px var(--primary-glow);
    }

        .mobile-header-icon svg {
            width: 18px;
            height: 18px;
            fill: #ffffff;
        }

    .content-area {
        padding: 16px;
    }

    .fab-btn {
        display: flex;
        position: fixed;
        bottom: 125px;
        right: 20px;
        width: 60px;
        height: 60px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 25px var(--primary-glow);
        z-index: 90;
        text-decoration: none;
    }

        .fab-btn svg {
            width: 28px;
            height: 28px;
            fill: #ffffff;
        }

    .bottom-nav {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        padding: 0 16px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        animation: slideUp 0.5s ease 0.2s forwards;
        opacity: 0;
    }

    .bottom-nav-container {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: var(--radius-lg);
        padding: 8px;
        box-shadow: 0 -4px 25px rgba(59, 130, 246, 0.1), inset 0 1px 0 #fff;
    }

    .bottom-nav-items {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 10px 16px;
        color: var(--gray-600);
        text-decoration: none;
        border-radius: var(--radius-md);
        transition: all 0.3s ease;
    }

        .bottom-nav-item.active {
            color: var(--primary);
            background: var(--primary-soft);
        }

        .bottom-nav-item svg {
            width: 26px;
            height: 26px;
            fill: currentColor;
        }

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

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 3px;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #f1f5f9;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --gray-600: #475569;
    --gray-400: #94a3b8;
    --gray-200: #e2e8f0;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
}

/* ============================================
       COVER BANNER
       ============================================ */
.profile-cover {
    height: 280px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #3730a3 100%);
    position: relative;
    overflow: hidden;
}

    .profile-cover::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        opacity: 0.5;
    }

    .profile-cover::after {
        content: '';
        position: absolute;
        bottom: -50px;
        left: 0;
        right: 0;
        height: 100px;
        background: linear-gradient(to top, #f8fafc, transparent);
    }

/* ============================================
       MAIN CONTAINER
       ============================================ */
.profile-container {
    max-width: 900px;
    margin: -120px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* ============================================
       PROFILE CARD
       ============================================ */
.profile-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    position: relative;
}

.profile-header {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* ============================================
       AVATAR
       ============================================ */
.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-lg), 0 0 0 6px var(--white), 0 0 0 8px var(--primary-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

    .profile-avatar:hover {
        transform: scale(1.05);
        box-shadow: var(--shadow-xl), 0 0 0 6px var(--white), 0 0 0 10px var(--primary);
    }

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

.profile-avatar-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 36px;
    height: 36px;
    background: var(--success);
    border-radius: 50%;
    border: 4px solid var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: var(--shadow-md);
}

/* ============================================
       PROFILE INFO
       ============================================ */
.profile-info {
    flex: 1;
    min-width: 250px;
}

.profile-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.profile-username {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 12px;
}

.profile-bio {
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.7;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
    margin: 16px 0;
}

/* ============================================
       STATS
       ============================================ */
.profile-stats {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.profile-stat {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    text-align: center;
    min-width: 110px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

    .profile-stat:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .profile-stat .count {
        font-size: 1.75rem;
        font-weight: 800;
        color: var(--primary);
        display: block;
    }

    .profile-stat .label {
        font-size: 0.85rem;
        color: var(--gray-400);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

/* ============================================
       ACTIONS
       ============================================ */
.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.profile-btn {
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
}

.profile-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

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

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

.profile-btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 2px solid var(--gray-200);
}

    .profile-btn-secondary:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: rgba(99, 102, 241, 0.05);
    }

.profile-btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

    .profile-btn-success:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    }

.profile-btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

    .profile-btn-outline:hover {
        background: var(--primary);
        color: var(--white);
    }

/* ============================================
       POSTS SECTION
       ============================================ */
.posts-section {
    margin-top: 40px;
}

.posts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.posts-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

    .posts-title::before {
        content: '';
        width: 4px;
        height: 28px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        border-radius: 2px;
    }

.posts-count {
    background: var(--secondary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
}

/* ============================================
       POST CARD
       ============================================ */
.post-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .post-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    }

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

.post-content {
    font-size: 1.05rem;
    color: var(--dark);
    line-height: 1.8;
    padding: 20px;
    background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
    border-radius: var(--radius-sm);
    word-wrap: break-word;
}

.post-media {
    margin-top: 20px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.post-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
    transition: transform 0.3s ease;
}

    .post-image:hover {
        transform: scale(1.02);
    }

.post-video {
    width: 100%;
    max-height: 450px;
    border-radius: var(--radius-sm);
    background: var(--dark);
}

.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.post-time {
    font-size: 0.9rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-actions {
    display: flex;
    gap: 10px;
}

.post-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    border: none;
}

.post-btn-edit {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

    .post-btn-edit:hover {
        background: var(--primary);
        color: var(--white);
    }

.post-btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

    .post-btn-delete:hover {
        background: var(--danger);
        color: var(--white);
    }

/* ============================================
       EMPTY STATE
       ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.1rem;
    color: var(--gray-400);
    font-weight: 500;
}

/* ============================================
       RESPONSIVE
       ============================================ */
@media (max-width: 768px) {
    .profile-cover {
        height: 200px;
    }

    .profile-container {
        margin-top: -80px;
    }

    .profile-card {
        padding: 24px;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-avatar {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }

    .profile-name {
        font-size: 1.6rem;
    }

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

    .profile-stat {
        padding: 12px 18px;
        min-width: 95px;
    }

        .profile-stat .count {
            font-size: 1.4rem;
        }

    .profile-actions {
        flex-direction: column;
        width: 100%;
    }

    .profile-btn {
        justify-content: center;
        width: 100%;
    }

    .posts-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .post-footer {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .post-actions {
        width: 100%;
    }

    .post-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ============================================
       ANIMATIONS
       ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.profile-card {
    animation: fadeInUp 0.5s ease forwards;
}

.post-card {
    animation: fadeInUp 0.5s ease forwards;
}

    .post-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .post-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .post-card:nth-child(3) {
        animation-delay: 0.3s;
    }

    .post-card:nth-child(4) {
        animation-delay: 0.4s;
    }

    .post-card:nth-child(5) {
        animation-delay: 0.5s;
    }
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --primary-soft: rgba(59, 130, 246, 0.08);
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.1);
    --dark: #0f172a;
    --gray-900: #1e293b;
    --gray-800: #334155;
    --gray-700: #475569;
    --gray-600: #64748b;
    --gray-500: #94a3b8;
    --gray-400: #cbd5e1;
    --gray-300: #e2e8f0;
    --gray-200: #f1f5f9;
    --gray-100: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --radius-full: 9999px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 30%, #e0f2fe 70%, #ffffff 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   BACKGROUND EFFECTS
   ═══════════════════════════════════════════════════════════════ */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 30%, #e0f2fe 70%, #ffffff 100%);
}

.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.8;
    background: radial-gradient(ellipse at 10% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%), radial-gradient(ellipse at 90% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 50%), radial-gradient(ellipse at 50% 50%, rgba(96, 165, 250, 0.05) 0%, transparent 60%);
    animation: meshFloat 15s ease-in-out infinite;
}

@keyframes meshFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.02);
    }
}

/* Floating Bubbles */
.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(96, 165, 250, 0.2) 100%);
    border-radius: 50%;
    animation: rise linear infinite;
    border: 1px solid rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(2px);
}

    .bubble::before {
        content: '';
        position: absolute;
        top: 15%;
        left: 20%;
        width: 30%;
        height: 30%;
        background: rgba(255, 255, 255, 0.7);
        border-radius: 50%;
    }

    .bubble:nth-child(1) {
        left: 5%;
        width: 35px;
        height: 35px;
        animation-duration: 18s;
        animation-delay: 0s;
    }

    .bubble:nth-child(2) {
        left: 12%;
        width: 22px;
        height: 22px;
        animation-duration: 22s;
        animation-delay: 2s;
    }

    .bubble:nth-child(3) {
        left: 20%;
        width: 45px;
        height: 45px;
        animation-duration: 16s;
        animation-delay: 4s;
    }

    .bubble:nth-child(4) {
        left: 28%;
        width: 28px;
        height: 28px;
        animation-duration: 20s;
        animation-delay: 1s;
    }

    .bubble:nth-child(5) {
        left: 36%;
        width: 38px;
        height: 38px;
        animation-duration: 24s;
        animation-delay: 3s;
    }

    .bubble:nth-child(6) {
        left: 44%;
        width: 18px;
        height: 18px;
        animation-duration: 19s;
        animation-delay: 5s;
    }

    .bubble:nth-child(7) {
        left: 52%;
        width: 42px;
        height: 42px;
        animation-duration: 21s;
        animation-delay: 2s;
    }

    .bubble:nth-child(8) {
        left: 60%;
        width: 30px;
        height: 30px;
        animation-duration: 17s;
        animation-delay: 4s;
    }

    .bubble:nth-child(9) {
        left: 68%;
        width: 25px;
        height: 25px;
        animation-duration: 23s;
        animation-delay: 1s;
    }

    .bubble:nth-child(10) {
        left: 76%;
        width: 48px;
        height: 48px;
        animation-duration: 20s;
        animation-delay: 3s;
    }

    .bubble:nth-child(11) {
        left: 84%;
        width: 20px;
        height: 20px;
        animation-duration: 25s;
        animation-delay: 6s;
    }

    .bubble:nth-child(12) {
        left: 92%;
        width: 55px;
        height: 55px;
        animation-duration: 15s;
        animation-delay: 0s;
    }

@keyframes rise {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-110vh) translateX(30px) rotate(360deg);
        opacity: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.page-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 32px 20px;
    min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER BANNER
   ═══════════════════════════════════════════════════════════════ */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #1d4ed8 100%);
    padding: 48px 20px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.3);
    animation: headerPulse 4s ease-in-out infinite;
}

@keyframes headerPulse {
    0%, 100% {
        box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.3);
    }

    50% {
        box-shadow: var(--shadow-lg), 0 0 50px rgba(59, 130, 246, 0.5);
    }
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.page-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatGlow 6s ease-in-out infinite;
}

@keyframes floatGlow {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.8;
    }
}

.page-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--white);
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

    .header-icon svg {
        width: 28px;
        height: 28px;
        fill: var(--white);
    }

/* ═══════════════════════════════════════════════════════════════
   MAIN CARD
   ═══════════════════════════════════════════════════════════════ */
.main-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.08);
    overflow: hidden;
    animation: fadeInUp 0.6s ease forwards;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.card-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 16px;
}

.card-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.card-header-text h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2px;
}

.card-header-text span {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ═══════════════════════════════════════════════════════════════
   TEXTAREA
   ═══════════════════════════════════════════════════════════════ */
.editor-wrapper {
    padding: 20px 28px;
}

.editor-textarea {
    width: 100%;
    min-height: 180px;
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-family: inherit;
    resize: vertical;
    line-height: 1.75;
    color: var(--gray-800);
    transition: all 0.3s ease;
    background: var(--gray-100);
}

    .editor-textarea:focus {
        outline: none;
        border-color: var(--primary);
        background: var(--white);
        box-shadow: 0 0 0 4px var(--primary-soft);
    }

    .editor-textarea::placeholder {
        color: var(--gray-400);
    }

/* ═══════════════════════════════════════════════════════════════
   UPLOAD SECTION
   ═══════════════════════════════════════════════════════════════ */
.upload-section {
    padding: 0 28px 20px;
}

.upload-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

    .upload-box:hover {
        border-color: var(--primary);
        background: var(--primary-soft);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px var(--primary-soft);
    }

    .upload-box.error {
        border-color: var(--danger);
        background: var(--danger-soft);
    }

.upload-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.3s ease;
}

.upload-box:hover .upload-icon {
    transform: scale(1.1) rotate(5deg);
}

.upload-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--white);
}

.upload-text {
    flex: 1;
}

    .upload-text strong {
        display: block;
        color: var(--dark);
        font-size: 0.95rem;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .upload-text span {
        color: var(--gray-500);
        font-size: 0.8rem;
    }

.upload-btn {
    padding: 10px 20px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-full);
    color: var(--dark);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

    .upload-btn:hover {
        background: var(--primary);
        color: var(--white);
        border-color: var(--primary);
        box-shadow: 0 4px 15px var(--primary-glow);
    }

.upload-input {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════
   MEDIA PREVIEW
   ═══════════════════════════════════════════════════════════════ */
.media-preview {
    margin: 0 28px 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    position: relative;
    display: none;
    box-shadow: var(--shadow-md);
}

    .media-preview.active {
        display: block;
        animation: fadeInUp 0.3s ease;
    }

    .media-preview img,
    .media-preview video {
        width: 100%;
        max-height: 350px;
        object-fit: cover;
        display: block;
    }

.media-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .media-remove:hover {
        background: var(--danger);
        transform: scale(1.1) rotate(90deg);
    }

    .media-remove svg {
        width: 18px;
        height: 18px;
        fill: var(--white);
    }

/* ═══════════════════════════════════════════════════════════════
   MESSAGE
   ═══════════════════════════════════════════════════════════════ */
.message {
    margin: 0 28px 20px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 600;
    display: none;
    animation: shake 0.5s ease;
}

    .message.active {
        display: block;
    }

    .message.success {
        background: var(--success-soft);
        color: var(--success);
        border: 1px solid rgba(16, 185, 129, 0.3);
    }

    .message.error {
        background: var(--danger-soft);
        color: var(--danger);
        border: 1px solid rgba(239, 68, 68, 0.3);
    }

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ═══════════════════════════════════════════════════════════════
   SUBMIT BUTTON
   ═══════════════════════════════════════════════════════════════ */
.submit-section {
    padding: 0 28px 28px;
}

.submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px var(--primary-glow);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .submit-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        transition: left 0.5s ease;
    }

    .submit-btn:hover::before {
        left: 100%;
    }

    .submit-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px var(--primary-glow);
    }

    .submit-btn:active {
        transform: translateY(-1px);
    }

    .submit-btn svg {
        width: 22px;
        height: 22px;
        fill: var(--white);
    }

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.page-header {
    animation: fadeInUp 0.5s ease forwards;
}

.main-card {
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
    }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 16px;
    }

    .page-header {
        padding: 32px 16px;
        border-radius: var(--radius-md);
    }

        .page-header h1 {
            font-size: 1.6rem;
        }

    .header-icon {
        width: 48px;
        height: 48px;
    }

        .header-icon svg {
            width: 24px;
            height: 24px;
        }

    .main-card {
        border-radius: var(--radius-md);
    }

    .card-header {
        padding: 20px;
    }

    .editor-wrapper {
        padding: 16px 20px;
    }

    .upload-section {
        padding: 0 20px 16px;
    }

    .upload-box {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .upload-btn {
        width: 100%;
    }

    .media-preview {
        margin: 0 20px 16px;
    }

    .message {
        margin: 0 20px 16px;
    }

    .submit-section {
        padding: 0 20px 20px;
    }

    .submit-btn {
        padding: 14px 24px;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* هدر */
.editprofile-hero {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    padding: 50px 20px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

    .editprofile-hero::before {
        content: '';
        position: absolute;
        top: -40%;
        right: -5%;
        width: 250px;
        height: 250px;
        background: rgba(255,255,255,0.08);
        border-radius: 50%;
    }

    .editprofile-hero::after {
        content: '';
        position: absolute;
        bottom: -25%;
        left: -5%;
        width: 180px;
        height: 180px;
        background: rgba(255,255,255,0.05);
        border-radius: 50%;
    }

.editprofile-container {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.editprofile-header h1 {
    font-size: 2.8rem;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* کانتینر */
.editprofile-page {
    max-width: 600px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

/* کارت‌ها */
.editprofile-card {
    background: #fff;
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

    .editprofile-card h2 {
        color: #1e293b;
        font-size: 1.3rem;
        font-weight: 700;
        margin-bottom: 25px;
        display: flex;
        align-items: center;
        gap: 10px;
        padding-bottom: 15px;
        border-bottom: 2px solid #f1f5f9;
    }

/* پیام */
.editprofile-message {
    padding: 14px 18px;
    margin-bottom: 25px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
}

    .editprofile-message.success {
        background: #f0fdf4;
        color: #16a34a;
        border: 1px solid #bbf7d0;
    }

    .editprofile-message.error {
        background: #fef2f2;
        color: #dc2626;
        border: 1px solid #fecaca;
    }

/* آواتار */
.avatar-section {
    text-align: center;
    margin-bottom: 30px;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e2e8f0;
    margin-bottom: 15px;
    display: inline-block;
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 4px dashed #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 3rem;
}

.avatar-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.avatar-input {
    display: none;
}

.avatar-label {
    display: inline-block;
    padding: 10px 24px;
    background: #2563eb;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .avatar-label:hover {
        background: #1d4ed8;
        transform: translateY(-2px);
    }

.avatar-delete-btn {
    padding: 10px 24px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .avatar-delete-btn:hover {
        background: #dc2626;
        color: white;
    }

.avatar-hint {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 5px;
}

/* فرم */
.editprofile-form .form-group {
    margin-bottom: 20px;
}

.editprofile-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

.editprofile-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

    .editprofile-form input:focus {
        outline: none;
        border-color: #2563eb;
        background: #fff;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    }

    .editprofile-form input:disabled {
        background: #e2e8f0;
        color: #64748b;
        cursor: not-allowed;
    }

.email-field {
    background: #f1f5f9;
    border: 2px dashed #e2e8f0;
}

.email-hint {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 5px;
}

/* دکمه‌ها */
.editprofile-submit {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

    .editprofile-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    }

.editprofile-back {
    display: block;
    text-align: center;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    padding: 14px;
    margin-top: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

    .editprofile-back:hover {
        background: #f1f5f9;
        color: #1e293b;
    }

/* ریسپانسیو */
@media (max-width: 768px) {
    .editprofile-header h1 {
        font-size: 2rem;
    }

    .editprofile-card {
        padding: 25px;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

.editpost-hero {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    padding: 50px 20px;
    margin-bottom: 50px;
}

    .editpost-hero h1 {
        font-size: 2.8rem;
        color: #fff;
        text-align: center;
    }

.editpost-page {
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.editpost-card {
    background: #fff;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

    .editpost-card h2 {
        color: #1e293b;
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

/* پیام */
.editpost-message {
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
}

    .editpost-message.success {
        background: #f0fdf4;
        color: #16a34a;
        border: 1px solid #bbf7d0;
    }

    .editpost-message.error {
        background: #fef2f2;
        color: #dc2626;
        border: 1px solid #fecaca;
    }

/* ویرایشگر */
.editor-toolbar {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    flex-wrap: wrap;
}

    .editor-toolbar button {
        width: 36px;
        height: 36px;
        border: 1px solid #e2e8f0;
        background: #fff;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1rem;
        transition: all 0.2s;
    }

        .editor-toolbar button:hover {
            background: #2563eb;
            color: #fff;
            border-color: #2563eb;
        }

    .editor-toolbar .sep {
        width: 1px;
        background: #e2e8f0;
        margin: 0 5px;
    }

.color-picker {
    display: flex;
    gap: 5px;
}

.color-btn {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.editor-textarea {
    width: 100%;
    min-height: 180px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    line-height: 1.6;
}

    .editor-textarea:focus {
        outline: none;
        border-color: #2563eb;
    }

/* رسانه فعلی */
.current-media {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #f1f5f9;
}

    .current-media h3 {
        font-size: 1.1rem;
        color: #1e293b;
        margin-bottom: 15px;
    }

.media-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

    .media-item img {
        width: 100%;
        max-height: 300px;
        object-fit: contain;
        border-radius: 8px;
    }

    .media-item video {
        width: 100%;
        max-height: 300px;
        border-radius: 8px;
    }

    .media-item .media-actions {
        display: flex;
        gap: 10px;
        margin-top: 10px;
    }

    .media-item .delete-btn {
        padding: 8px 16px;
        background: #fef2f2;
        color: #dc2626;
        border: 1px solid #fecaca;
        border-radius: 8px;
        text-decoration: none;
        font-size: 0.9rem;
    }

        .media-item .delete-btn:hover {
            background: #dc2626;
            color: #fff;
        }

/* آپلود جدید */
.upload-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #f1f5f9;
}

    .upload-section h3 {
        font-size: 1.1rem;
        color: #1e293b;
        margin-bottom: 15px;
    }

.upload-box {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.upload-item {
    flex: 1;
    min-width: 200px;
}

    .upload-item label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #1e293b;
    }

    .upload-item input[type="file"] {
        width: 100%;
        padding: 12px;
        border: 2px dashed #e2e8f0;
        border-radius: 10px;
        background: #f8fafc;
        cursor: pointer;
    }

        .upload-item input[type="file"]:hover {
            border-color: #2563eb;
        }

.file-hint {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 5px;
    display: block;
}

/* دکمه‌ها */
.editpost-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.editpost-submit {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
    transition: all 0.3s;
}

    .editpost-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(37,99,235,0.3);
    }

.editpost-back {
    color: #64748b;
    text-decoration: none;
    padding: 14px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
}

    .editpost-back:hover {
        background: #f1f5f9;
    }

@media (max-width: 768px) {
    .editpost-hero h1 {
        font-size: 2rem;
    }

    .editpost-card {
        padding: 25px;
    }

    .editpost-actions {
        flex-direction: column;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
}

.delete-hero {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    padding: 50px 20px;
    margin-bottom: 50px;
}

    .delete-hero h1 {
        font-size: 2.8rem;
        color: #fff;
        text-align: center;
    }

.delete-page {
    max-width: 500px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.delete-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    text-align: center;
}

.delete-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.delete-card h2 {
    color: #1e293b;
    margin-bottom: 15px;
}

.delete-card p {
    color: #64748b;
    margin-bottom: 30px;
}

.delete-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.delete-btn {
    padding: 14px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.delete-btn-yes {
    background: #dc2626;
    color: #fff;
}

    .delete-btn-yes:hover {
        background: #b91c1c;
    }

.delete-btn-no {
    background: #f1f5f9;
    color: #1e293b;
}

    .delete-btn-no:hover {
        background: #e2e8f0;
    }

@media (max-width: 768px) {
    .delete-hero h1 {
        font-size: 2rem;
    }

    .delete-actions {
        flex-direction: column;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.home-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #1d4ed8 100%);
    padding: 48px 20px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.3);
    animation: headerPulse 4s ease-in-out infinite;
}

@keyframes headerPulse {
    0%, 100% {
        box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.3);
    }

    50% {
        box-shadow: var(--shadow-lg), 0 0 50px rgba(59, 130, 246, 0.5);
    }
}

.home-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.home-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatGlow 6s ease-in-out infinite;
}
/* هدر */
.admin-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 60px 20px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

    .admin-hero::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -5%;
        width: 300px;
        height: 300px;
        background: rgba(37, 99, 235, 0.15);
        border-radius: 50%;
    }

    .admin-hero::after {
        content: '';
        position: absolute;
        bottom: -30%;
        left: -5%;
        width: 200px;
        height: 200px;
        background: rgba(37, 99, 235, 0.1);
        border-radius: 50%;
    }

    .admin-hero .admin-container {
        max-width: 1100px;
        margin: 0 auto;
        position: relative;
        z-index: 1;
    }

    .admin-hero .admin-header h1 {
        font-size: 2.8rem;
        color: #fff;
        font-weight: 700;
    }

        .admin-hero .admin-header h1 span {
            color: #2563eb;
        }

    .admin-hero .admin-welcome {
        color: #94a3b8;
        font-size: 1.1rem;
        margin-top: 10px;
    }

/* لینک پروفایل در هدر */
.admin-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    margin-top: 15px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .admin-profile-link:hover {
        background: rgba(255,255,255,0.2);
        transform: translateY(-2px);
    }

    .admin-profile-link .username {
        color: #60a5fa;
    }

/* کانتینر اصلی */
.admin-page {
    max-width: 1100px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

/* کارت خوش‌آمدگویی */
.admin-welcome-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

    .admin-welcome-card .welcome-text h2 {
        color: #1e293b;
        font-size: 1.4rem;
        margin-bottom: 8px;
    }

    .admin-welcome-card .welcome-text p {
        color: #64748b;
    }

    .admin-welcome-card .welcome-text strong {
        color: #2563eb;
    }

    /* لینک پروفایل در کارت */
    .admin-welcome-card .view-profile-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 12px 24px;
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        color: #fff;
        text-decoration: none;
        border-radius: 10px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

        .admin-welcome-card .view-profile-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
        }

.admin-exit-btn {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #dc2626;
}

    .admin-exit-btn:hover {
        background: #dc2626;
        color: #fff;
    }

/* منوی ادمین */
.admin-panel-menu {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

    .admin-panel-menu h3 {
        color: #1e293b;
        font-size: 1.3rem;
        margin-bottom: 25px;
        padding-bottom: 15px;
        border-bottom: 2px solid #e2e8f0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .admin-panel-menu h3::before {
            content: '⚙️';
        }

    .admin-panel-menu ul {
        list-style: none;
    }

    .admin-panel-menu li {
        margin-bottom: 12px;
    }

        .admin-panel-menu li a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 18px;
            background: #f8fafc;
            color: #1e293b;
            text-decoration: none;
            border-radius: 10px;
            font-weight: 500;
            transition: all 0.3s ease;
            border: 1px solid #e2e8f0;
        }

            .admin-panel-menu li a:hover {
                background: #2563eb;
                color: #fff;
                border-color: #2563eb;
                transform: translateX(5px);
            }

            .admin-panel-menu li a::before {
                content: '➜';
                font-size: 0.9rem;
            }

            .admin-panel-menu li a:hover::before {
                content: '→';
            }

/* دکمه خروج */
.admin-exit-panel {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e2e8f0;
}

    .admin-exit-panel .exit-btn {
        display: block;
        text-align: center;
        padding: 14px;
        background: #fef2f2;
        color: #dc2626;
        text-decoration: none;
        border-radius: 10px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

        .admin-exit-panel .exit-btn:hover {
            background: #dc2626;
            color: #fff;
        }

/* ایمیل کاربر */
.admin-user-info {
    background: #eff6ff;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid #bfdbfe;
}

    .admin-user-info p {
        color: #1e293b;
        font-weight: 500;
    }

    .admin-user-info strong {
        color: #2563eb;
    }

/* ریسپانسیو */
@media (max-width: 768px) {
    .admin-hero .admin-header h1 {
        font-size: 2rem;
    }

    .admin-welcome-card {
        flex-direction: column;
        text-align: center;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* هدر */
.register-hero {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    padding: 50px 20px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

    .register-hero::before {
        content: '';
        position: absolute;
        top: -40%;
        right: -5%;
        width: 250px;
        height: 250px;
        background: rgba(255,255,255,0.08);
        border-radius: 50%;
    }

    .register-hero::after {
        content: '';
        position: absolute;
        bottom: -25%;
        left: -5%;
        width: 180px;
        height: 180px;
        background: rgba(255,255,255,0.05);
        border-radius: 50%;
    }

    .register-hero .register-container {
        max-width: 1100px;
        margin: 0 auto;
        position: relative;
        z-index: 1;
    }

    .register-hero .register-header h1 {
        font-size: 2.8rem;
        color: #fff;
        font-weight: 700;
        text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

/* کارت ثبت‌نام */
.register-page {
    max-width: 420px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.register-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

    .register-card h2 {
        text-align: center;
        color: #1e293b;
        font-size: 1.6rem;
        font-weight: 700;
        margin-bottom: 30px;
    }

/* پیام‌ها */
.register-message {
    padding: 14px 18px;
    margin-bottom: 25px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
}

    .register-message.error {
        background: #fef2f2;
        color: #dc2626;
        border: 1px solid #fecaca;
    }

    .register-message.success {
        background: #f0fdf4;
        color: #16a34a;
        border: 1px solid #bbf7d0;
    }

/* فرم */
.register-form .form-group {
    margin-bottom: 20px;
}

.register-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

.register-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

    .register-form input:focus {
        outline: none;
        border-color: #2563eb;
        background: #fff;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    }

    .register-form input::placeholder {
        color: #94a3b8;
    }

.register-form .password-hint {
    font-size: 0.8em;
    color: #64748b;
    margin-top: 6px;
}

/* دکمه */
.register-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 10px;
}

    .register-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    }

/* لینک‌ها */
.register-links {
    text-align: center;
    margin-top: 25px;
}

    .register-links a {
        color: #2563eb;
        text-decoration: none;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }

        .register-links a:hover {
            color: #1d4ed8;
            text-decoration: underline;
        }

    .register-links p {
        color: #64748b;
        font-size: 0.9rem;
    }

/* ریسپانسیو */

.register-hero .register-header h1 {
    font-size: 2rem;
}

.register-card {
    padding: 30px 25px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* هدر */
.manage-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 50px 20px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

    .manage-hero::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -5%;
        width: 300px;
        height: 300px;
        background: rgba(37, 99, 235, 0.15);
        border-radius: 50%;
    }

    .manage-hero::after {
        content: '';
        position: absolute;
        bottom: -30%;
        left: -5%;
        width: 200px;
        height: 200px;
        background: rgba(37, 99, 235, 0.1);
        border-radius: 50%;
    }

    .manage-hero .manage-container {
        max-width: 1100px;
        margin: 0 auto;
        position: relative;
        z-index: 1;
    }

    .manage-hero .manage-header h1 {
        font-size: 2.8rem;
        color: #fff;
        font-weight: 700;
    }

        .manage-hero .manage-header h1 span {
            color: #2563eb;
        }

/* کانتینر اصلی */
.manage-page {
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

/* باکس ایمیل کاربر */
.manage-user-box {
    background: #eff6ff;
    padding: 18px 24px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #bfdbfe;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .manage-user-box::before {
        content: '👤';
        font-size: 1.2rem;
    }

    .manage-user-box p {
        color: #1e293b;
        font-weight: 500;
    }

    .manage-user-box strong {
        color: #2563eb;
    }

/* کارت منو */
.manage-card {
    background: #fff;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

    .manage-card h3 {
        color: #1e293b;
        font-size: 1.3rem;
        margin-bottom: 25px;
        padding-bottom: 15px;
        border-bottom: 2px solid #e2e8f0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .manage-card h3::before {
            content: '⚙️';
        }

    .manage-card ul {
        list-style: none;
    }

    .manage-card li {
        margin-bottom: 15px;
    }

        .manage-card li a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 16px 20px;
            background: #f8fafc;
            color: #1e293b;
            text-decoration: none;
            border-radius: 12px;
            font-weight: 500;
            transition: all 0.3s ease;
            border: 1px solid #e2e8f0;
        }

            .manage-card li a:hover {
                background: #2563eb;
                color: #fff;
                border-color: #2563eb;
                transform: translateX(5px);
            }

            .manage-card li a::before {
                content: '🔑';
                font-size: 1rem;
            }

        .manage-card li:nth-child(2) a::before {
            content: '👤';
        }

/* ریسپانسیو */
.manage-hero .manage-header h1 {
    font-size: 2rem;
}

.manage-card {
    padding: 25px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* هدر */
.login-hero {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    padding: 50px 20px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

    .login-hero::before {
        content: '';
        position: absolute;
        top: -40%;
        right: -5%;
        width: 250px;
        height: 250px;
        background: rgba(255,255,255,0.08);
        border-radius: 50%;
    }

    .login-hero::after {
        content: '';
        position: absolute;
        bottom: -25%;
        left: -5%;
        width: 180px;
        height: 180px;
        background: rgba(255,255,255,0.05);
        border-radius: 50%;
    }

    .login-hero .login-container {
        max-width: 1100px;
        margin: 0 auto;
        position: relative;
        z-index: 1;
    }

    .login-hero .login-header h1 {
        font-size: 2.8rem;
        color: #fff;
        font-weight: 700;
        text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

/* کارت لاگین */
.login-page {
    max-width: 420px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

    .login-card h2 {
        text-align: center;
        color: #1e293b;
        font-size: 1.6rem;
        font-weight: 700;
        margin-bottom: 30px;
    }

/* پیام‌ها */
.login-message {
    padding: 14px 18px;
    margin-bottom: 25px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
}

    .login-message.error {
        background: #fef2f2;
        color: #dc2626;
        border: 1px solid #fecaca;
    }

    .login-message.success {
        background: #f0fdf4;
        color: #16a34a;
        border: 1px solid #bbf7d0;
    }

/* فرم */
.login-form .form-group {
    margin-bottom: 22px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

    .login-form input:focus {
        outline: none;
        border-color: #2563eb;
        background: #fff;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    }

    .login-form input::placeholder {
        color: #94a3b8;
    }

/* دکمه */
.login-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 10px;
}

    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    }

/* لینک‌ها */
.login-links {
    text-align: center;
    margin-top: 25px;
}

    .login-links a {
        color: #2563eb;
        text-decoration: none;
        font-size: 0.9rem;
        transition: all 0.3s ease;
    }

        .login-links a:hover {
            color: #1d4ed8;
            text-decoration: underline;
        }

    .login-links p {
        color: #64748b;
        font-size: 0.9rem;
        margin-top: 15px;
    }

.forgot-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #64748b;
    font-size: 0.85rem;
}

    .forgot-link:hover {
        color: #2563eb;
    }

/* ریسپانسیو */
.login-hero .login-header h1 {
    font-size: 2rem;
}

.login-card {
    padding: 30px 25px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --text: #0f172a;
    --text-soft: #475569;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-soft: rgba(37, 99, 235, 0.10);
    --danger: #e11d48;
    --danger-soft: rgba(225, 29, 72, 0.10);
    --success: #059669;
    --success-soft: rgba(5, 150, 105, 0.10);
    --warning: #d97706;
    --warning-soft: rgba(217, 119, 6, 0.10);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 10px;
    --radius-full: 999px;
    --container: 1080px;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.55;
    overflow-x: hidden;
}

.home-wrapper {
    max-width: var(--container);
    margin: 0 auto;
    padding: 12px 16px 40px;
    min-height: 100vh;
}

.timeline-container {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.posts-list {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.post-card {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    transition: background-color .2s ease;
    width: 100%;
}

    .post-card:last-child {
        border-bottom: none;
    }

    .post-card:hover {
        background: #fbfdff;
    }

.reposted-by-line {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 12px;
    padding-inline-start: 64px;
}

.post-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    width: 100%;
}

.post-avatar-col {
    flex: 0 0 auto;
}

.post-avatar,
.post-avatar-fallback,
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
    display: block;
}

.avatar {
    cursor: pointer;
    border: 1px solid var(--border);
}

.post-avatar-fallback,
.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: var(--primary);
    font-size: 1.05rem;
    font-weight: 800;
    border: 1px solid #bfdbfe;
    cursor: pointer;
}

.post-body {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.post-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.author-name,
.post-name,
.quoted-author {
    font-size: 0.98rem;
    font-weight: 750;
    color: var(--text);
    text-decoration: none;
}

.author-username,
.post-time,
.quoted-username,
.quoted-time {
    color: var(--text-muted);
    font-size: 0.92rem;
    text-decoration: none;
}

.dot {
    color: #cbd5e1;
    font-size: 0.8rem;
}

.clickable-inline {
    cursor: pointer;
}

.post-type-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.repost-icon {
    color: var(--success);
}

.quote-icon {
    color: var(--warning);
}

.post-content {
    font-size: 1rem;
    color: var(--text-soft);
    line-height: 1.85;
    margin-bottom: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-media {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

    .post-media img,
    .post-media video,
    .post-image,
    .post-video,
    .quoted-image,
    .quoted-video {
        width: 100%;
        display: block;
        max-height: 520px;
        object-fit: cover;
        background: #000;
    }

.quoted-post {
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease;
    overflow: hidden;
}

    .quoted-post:hover {
        border-color: var(--border-strong);
        background: #f8fbff;
    }

.quoted-header {
    margin-bottom: 8px;
}

.quoted-author-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.quoted-content {
    color: var(--text-soft);
    line-height: 1.75;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
    margin-top: 12px;
    padding-top: 8px;
    width: 100%;
}

.post-action-btn {
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    padding: 10px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all .2s ease;
    font-size: 0.92rem;
    font-weight: 650;
    min-height: 40px;
    line-height: 1;
    flex: 1 1 0;
    min-width: 0;
}

    .post-action-btn:hover {
        background: var(--surface-soft);
    }

.reply-btn:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.repost-btn:hover,
.post-action-btn.active.repost-btn {
    color: var(--success);
    background: var(--success-soft);
}

.like-btn:hover,
.post-action-btn.active.like-btn {
    color: var(--danger);
    background: var(--danger-soft);
}

.view-btn:hover {
    color: var(--warning);
    background: var(--warning-soft);
}

.save-btn:hover,
.post-action-btn.active.save-btn {
    color: var(--primary);
    background: var(--primary-soft);
}

.post-action-count {
    min-width: 10px;
    text-align: center;
}

.state-box {
    text-align: center;
    padding: 48px 24px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.state-spinner {
    width: 38px;
    height: 38px;
    margin: 0 auto 16px;
    border: 3px solid #dbeafe;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

    .state-spinner.small {
        width: 26px;
        height: 26px;
        margin: 0;
    }

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    color: var(--primary);
    opacity: .9;
}

    .empty-icon svg {
        width: 100%;
        height: 100%;
        display: block;
    }

.state-box h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--text);
}

.state-box p,
.state-box div {
    color: var(--text-muted);
}

.load-more-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: var(--text-muted);
    font-weight: 600;
    width: 100%;
}

    .load-more-status.end {
        color: var(--text-muted);
        border-top: 1px solid var(--border);
        background: var(--surface);
    }

#scrollSentinel {
    height: 8px;
}

.icon,
.icon-sm,
.icon-xs,
.reply-icon {
    display: block;
    flex-shrink: 0;
}

.icon {
    width: 19px;
    height: 19px;
}

.reply-icon {
    width: 19px;
    height: 19px;
}

.icon-sm {
    width: 17px;
    height: 17px;
}

.icon-xs {
    width: 15px;
    height: 15px;
}

button:focus-visible,
[role="button"]:focus-visible,
.avatar:focus-visible,
.avatar-placeholder:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 1200px) {
    .home-wrapper {
        max-width: 1180px;
    }
}

@media (max-width: 768px) {
    .home-wrapper {
        padding: 8px 10px 28px;
    }

    .timeline-container {
        border-radius: 16px;
    }

    .post-card {
        padding: 14px 12px;
    }

    .post-wrapper {
        gap: 10px;
    }

    .post-avatar,
    .post-avatar-fallback,
    .avatar {
        width: 42px;
        height: 42px;
    }

    .reposted-by-line {
        padding-inline-start: 52px;
        margin-bottom: 10px;
        font-size: 0.82rem;
    }

    .post-header {
        gap: 8px;
    }

    .author-name,
    .post-name,
    .quoted-author {
        font-size: 0.94rem;
    }

    .author-username,
    .post-time,
    .quoted-username,
    .quoted-time {
        font-size: 0.84rem;
    }

    .post-content,
    .quoted-content {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .post-media img,
    .post-media video,
    .post-image,
    .post-video,
    .quoted-image,
    .quoted-video {
        max-height: 340px;
    }

    .post-actions {
        gap: 4px;
    }

    .post-action-btn {
        padding: 8px 6px;
        min-height: 36px;
        font-size: 0.85rem;
        gap: 6px;
    }

    .icon,
    .reply-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .home-wrapper {
        padding: 6px 6px 22px;
    }

    .timeline-container,
    .state-box {
        border-radius: 14px;
    }

    .post-card {
        padding: 12px 10px;
    }

    .post-wrapper {
        gap: 8px;
    }

    .post-avatar,
    .post-avatar-fallback,
    .avatar {
        width: 40px;
        height: 40px;
    }

    .reposted-by-line {
        padding-inline-start: 48px;
    }

    .post-actions {
        gap: 2px;
    }

    .post-action-btn {
        padding: 7px 4px;
    }

    .post-action-count {
        font-size: 0.82rem;
    }
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --text: #0f172a;
    --text-soft: #475569;
    --text-muted: #64748b;
    --primary: #2563eb;
    --primary-soft: rgba(37, 99, 235, 0.10);
    --danger: #e11d48;
    --danger-soft: rgba(225, 29, 72, 0.10);
    --success: #059669;
    --success-soft: rgba(5, 150, 105, 0.10);
    --warning: #d97706;
    --warning-soft: rgba(217, 119, 6, 0.10);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 10px;
    --radius-full: 999px;
    --container: 1080px;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.55;
    overflow-x: hidden;
}

.post-page {
    max-width: var(--container);
    margin: 0 auto;
    padding: 12px 16px 40px;
    min-height: 100vh;
}

.post-main-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 16px;
}

.post-card-inner {
    padding: 20px 24px;
}

.post-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.post-avatar-col {
    flex: 0 0 auto;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
    display: block;
    cursor: pointer;
    border: 1px solid var(--border);
}

.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: var(--primary);
    font-size: 1.05rem;
    font-weight: 800;
    border: 1px solid #bfdbfe;
    cursor: pointer;
}

.post-body {
    flex: 1;
    min-width: 0;
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
    margin-bottom: 4px;
}

.clickable-inline {
    cursor: pointer;
}

.author-name {
    font-size: 0.98rem;
    font-weight: 750;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}

.author-username {
    color: var(--text-muted);
    font-size: 0.92rem;
    text-decoration: none;
    cursor: pointer;
}

.dot {
    color: #cbd5e1;
    font-size: 0.8rem;
}

.post-time {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.post-content {
    font-size: 1rem;
    color: var(--text-soft);
    line-height: 1.85;
    margin-bottom: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-media {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.post-image,
.post-video {
    width: 100%;
    display: block;
    max-height: 520px;
    object-fit: cover;
    background: #000;
}

.post-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

    .post-stats span {
        display: flex;
        align-items: center;
        gap: 4px;
    }

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
    margin-top: 12px;
    padding-top: 8px;
    width: 100%;
}

.post-action-btn {
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    padding: 10px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all .2s ease;
    font-size: 0.92rem;
    font-weight: 650;
    min-height: 40px;
    line-height: 1;
    flex: 1 1 0;
    min-width: 0;
    appearance: none;
    -webkit-appearance: none;
}

    .post-action-btn:hover {
        background: var(--surface-soft);
    }

.reply-btn:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.repost-btn:hover,
.post-action-btn.active.repost-btn {
    color: var(--success);
    background: var(--success-soft);
}

.like-btn:hover,
.post-action-btn.active.like-btn {
    color: var(--danger);
    background: var(--danger-soft);
}

.view-btn:hover {
    color: var(--warning);
    background: var(--warning-soft);
}

.save-btn:hover,
.post-action-btn.active.save-btn {
    color: var(--primary);
    background: var(--primary-soft);
}

.post-action-count {
    min-width: 10px;
    text-align: center;
}

.icon,
.icon-sm,
.icon-xs {
    display: block;
    flex-shrink: 0;
}

.icon {
    width: 19px;
    height: 19px;
}

.icon-sm {
    width: 17px;
    height: 17px;
}

.icon-xs {
    width: 15px;
    height: 15px;
}

/* Comment Composer */
.comment-composer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.composer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.composer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
    border: 1px solid var(--border);
}

.composer-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 800;
    border: 1px solid #bfdbfe;
}

.composer-input-wrapper {
    flex: 1;
}

.comment-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface-soft);
    resize: none;
    min-height: 80px;
    transition: border-color .2s ease, box-shadow .2s ease;
    line-height: 1.6;
}

    .comment-textarea:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-soft);
    }

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

.upload-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

    .upload-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-soft);
    }

.preview-section {
    margin-top: 12px;
    position: relative;
}

.preview-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.preview-video {
    width: 100%;
    max-height: 300px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: #000;
}

.remove-preview {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease;
}

    .remove-preview:hover {
        background: rgba(0, 0, 0, 0.8);
    }

.composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.send-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
    appearance: none;
    -webkit-appearance: none;
}

    .send-btn:hover:not(:disabled) {
        background: #1d4ed8;
        transform: translateY(-1px);
    }

    .send-btn:active:not(:disabled) {
        transform: translateY(0);
    }

    .send-btn:disabled {
        background: var(--border-strong);
        color: #fff;
        cursor: not-allowed;
        transform: none;
        opacity: 1;
    }

/* Reply Banner */
.reply-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--primary-soft);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    font-size: 0.88rem;
    color: var(--text-soft);
}

    .reply-banner b {
        color: var(--primary);
    }

.cancel-btn {
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface);
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

    .cancel-btn:hover {
        border-color: var(--danger);
        color: var(--danger);
        background: var(--danger-soft);
    }

/* Comments List */
.comments-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.comments-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.comment {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    transition: background-color .2s ease;
}

    .comment:last-child {
        border-bottom: none;
    }

    .comment:hover {
        background: #fbfdff;
    }

.comment-wrapper {
    display: flex;
    gap: 12px;
}

.comment-avatar-col {
    flex: 0 0 auto;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
    cursor: pointer;
    border: 1px solid var(--border);
}

.comment-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 800;
    border: 1px solid #bfdbfe;
    cursor: pointer;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-author-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.comment-author-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
}

.comment-author-username {
    color: var(--text-muted);
    font-size: 0.88rem;
    cursor: pointer;
}

.comment-dot {
    color: #cbd5e1;
    font-size: 0.75rem;
}

.comment-time {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.comment-content {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.7;
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-media {
    margin-bottom: 10px;
}

    .comment-media img {
        max-width: 100%;
        max-height: 250px;
        border-radius: var(--radius-md);
        object-fit: cover;
        border: 1px solid var(--border);
    }

    .comment-media video {
        max-width: 100%;
        max-height: 250px;
        border-radius: var(--radius-md);
        border: 1px solid var(--border);
        background: #000;
    }

.comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.comment-action-btn {
    border: none !important;
    outline: none;
    box-shadow: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all .2s ease;
    font-size: 0.85rem;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
}

    .comment-action-btn:hover {
        background: var(--surface-soft);
    }

    .comment-action-btn.like:hover,
    .comment-action-btn.liked {
        color: var(--danger);
        background: var(--danger-soft);
    }

    .comment-action-btn.reply:hover {
        color: var(--primary);
        background: var(--primary-soft);
    }

.comment-action-icon {
    width: 16px;
    height: 16px;
}

/* Nested Replies */
.replies-container {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.reply {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

    .reply:last-child {
        border-bottom: none;
    }

/* State Box */
.state-box {
    text-align: center;
    padding: 48px 24px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.state-spinner {
    width: 38px;
    height: 38px;
    margin: 0 auto 16px;
    border: 3px solid #dbeafe;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.state-box h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--text);
}

.state-box p,
.state-box div {
    color: var(--text-muted);
}

button:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 1200px) {
    .post-page {
        max-width: 1180px;
    }
}

@media (max-width: 768px) {
    .post-page {
        padding: 8px 10px 28px;
    }

    .post-main-card,
    .comment-composer,
    .comments-list {
        border-radius: 16px;
    }

    .post-card-inner {
        padding: 14px 16px;
    }

    .avatar {
        width: 44px;
        height: 44px;
    }

    .post-content {
        font-size: 0.95rem;
    }

    .post-image,
    .post-video {
        max-height: 340px;
    }

    .post-actions {
        gap: 4px;
    }

    .post-action-btn {
        padding: 8px 6px;
        min-height: 36px;
        font-size: 0.85rem;
        gap: 6px;
    }

    .icon {
        width: 18px;
        height: 18px;
    }

    .comment-composer {
        padding: 14px 16px;
    }

    .comments-list {
        border-radius: 16px;
    }

    .comment {
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    .post-page {
        padding: 6px 6px 22px;
    }

    .post-main-card,
    .comment-composer,
    .comments-list,
    .state-box {
        border-radius: 14px;
    }

    .post-card-inner {
        padding: 12px 14px;
    }

    .avatar {
        width: 40px;
        height: 40px;
    }

    .post-actions {
        gap: 2px;
    }

    .post-action-btn {
        padding: 7px 4px;
    }

    .post-action-count {
        font-size: 0.82rem;
    }
}
.profile-tabs {
    display: flex;
    align-items: stretch;
    width: 100%;
    border-bottom: 1px solid #e5e7eb;
    margin-top: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 5;
}

    .profile-tabs::-webkit-scrollbar {
        display: none;
    }

.profile-tab {
    flex: 1 1 0;
    min-width: 110px;
    border: none;
    background: transparent;
    color: #6b7280;
    padding: 14px 16px;
    cursor: pointer;
    position: relative;
    font-size: 15px;
    font-weight: 600;
    transition: background-color .2s ease, color .2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

    .profile-tab:hover {
        background: rgba(15, 20, 25, 0.05);
        color: #111827;
    }

    .profile-tab.active {
        color: #111827;
    }

        .profile-tab.active::after {
            content: "";
            position: absolute;
            right: 16px;
            left: 16px;
            bottom: 0;
            height: 4px;
            border-radius: 999px;
            background: #1d9bf0;
        }

    .profile-tab .tab-text {
        display: inline-block;
    }

    .profile-tab .tab-count {
        font-size: 13px;
        font-weight: 700;
        color: #9ca3af;
    }

    .profile-tab.active .tab-count {
        color: #1d9bf0;
    }

@media (max-width: 768px) {
    .profile-tabs {
        margin-top: 14px;
    }

    .profile-tab {
        min-width: 100px;
        padding: 12px 10px;
        font-size: 14px;
        gap: 6px;
    }

        .profile-tab.active::after {
            right: 12px;
            left: 12px;
            height: 3px;
        }

        .profile-tab .tab-count {
            font-size: 12px;
        }
}
.profile-stat-link {
    text-decoration: none;
    color: inherit;
}

    .profile-stat-link .profile-stat {
        transition: 0.2s ease;
        cursor: pointer;
    }

    .profile-stat-link:hover .profile-stat {
        transform: translateY(-2px);
        opacity: 0.9;
    }

    .profile-stat-link.active .profile-stat {
        border-bottom: 2px solid #4f46e5;
    }

.follower-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.follower-user-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.follower-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.follower-avatar-text {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #6366f1;
    color: white;
    font-weight: bold;
    font-size: 20px;
}

.follower-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.follower-name {
    font-size: 18px;
    font-weight: 700;
}

.follower-username {
    font-size: 14px;
    opacity: 0.7;
}
.follow-btn {
    border: none;
    outline: none;
    padding: 10px 16px;
    border-radius: 10px;
    background: #4f46e5;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    min-width: 100px;
}

    .follow-btn:hover {
        opacity: 0.92;
        transform: translateY(-1px);
    }

    .follow-btn.following {
        background: #e5e7eb;
        color: #111827;
    }

        .follow-btn.following:hover {
            background: #fee2e2;
            color: #b91c1c;
        }
.profile-bio {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    white-space: pre-wrap;
    max-width: 600px;
}

.bio-textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
}
.search-page {
    max-width: 950px;
    margin: 0 auto;
    padding: 32px 16px 70px;
}

.search-header {
    text-align: center;
    margin-bottom: 24px;
}

.search-title {
    margin: 0 0 8px;
    font-size: 34px;
    font-weight: 900;
    color: #111827;
    letter-spacing: -0.04em;
}

.search-subtitle {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
}

.search-wrapper {
    position: relative;
    max-width: 720px;
    margin: 0 auto 32px;
    z-index: 20;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    transition: 0.2s ease;
}

    .search-box:focus-within {
        border-color: #2563eb;
        box-shadow: 0 18px 45px rgba(37, 99, 235, 0.13);
    }

.search-icon {
    width: 52px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    flex-shrink: 0;
}

    .search-icon svg {
        width: 22px;
        height: 22px;
    }

.search-input {
    width: 100%;
    height: 58px;
    border: none;
    outline: none;
    background: transparent;
    color: #111827;
    font-size: 16px;
    padding: 0 70px 0 0;
}

    .search-input::placeholder {
        color: #9ca3af;
    }

.clear-search-btn {
    position: absolute;
    right: 46px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s ease;
}

    .clear-search-btn:hover {
        background: #e5e7eb;
        color: #111827;
    }

.search-mini-spinner {
    position: absolute;
    right: 16px;
    width: 18px;
    height: 18px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    animation: dropdownIn 0.18s ease;
}

.dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    font-weight: 800;
    color: #6b7280;
}

.dropdown-user-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 13px;
    border: none;
    background: #ffffff;
    padding: 13px 16px;
    cursor: pointer;
    text-align: left;
    transition: 0.18s ease;
    border-bottom: 1px solid #f3f4f6;
}

    .dropdown-user-item:last-child {
        border-bottom: none;
    }

    .dropdown-user-item:hover {
        background: #f8fafc;
    }

.dropdown-avatar-wrap {
    flex-shrink: 0;
}

.dropdown-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-avatar-placeholder {
    color: #3730a3;
    font-size: 20px;
    font-weight: 900;
}

.dropdown-user-info {
    flex: 1;
    min-width: 0;
}

.dropdown-user-name {
    color: #111827;
    font-size: 15px;
    font-weight: 900;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-user-username {
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-user-bio {
    color: #4b5563;
    font-size: 13px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dropdown-post-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 13px;
    border: none;
    background: #ffffff;
    padding: 13px 16px;
    cursor: pointer;
    text-align: left;
    transition: 0.18s ease;
    border-bottom: 1px solid #f3f4f6;
}

    .dropdown-post-item:last-child {
        border-bottom: none;
    }

    .dropdown-post-item:hover {
        background: #f8fafc;
    }

.dropdown-post-main {
    flex: 1;
    min-width: 0;
}

.dropdown-post-topline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.dropdown-post-author {
    color: #111827;
    font-size: 15px;
    font-weight: 900;
}

.dropdown-post-username {
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
}

.dropdown-post-type {
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 800;
}

.dropdown-post-snippet {
    color: #374151;
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dropdown-post-media-label {
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.dropdown-view-icon {
    flex-shrink: 0;
    color: #9ca3af;
    font-size: 26px;
    font-weight: 300;
}

.dropdown-state,
.dropdown-empty {
    padding: 30px 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.dropdown-spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto 10px;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.dropdown-empty-icon {
    font-size: 34px;
    margin-bottom: 8px;
}

.dropdown-footer {
    padding: 12px 16px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 12px;
    text-align: center;
}

.search-main-content {
    margin-top: 34px;
}

.results-section {
    width: 100%;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

    .results-header h2 {
        margin: 0;
        font-size: 22px;
        font-weight: 900;
        color: #111827;
    }

    .results-header span {
        font-size: 14px;
        color: #6b7280;
        font-weight: 700;
    }

.users-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 18px;
    color: inherit;
    transition: 0.2s ease;
}

    .user-card:hover {
        transform: translateY(-2px);
        border-color: #c7d2fe;
        box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
    }

.user-card-avatar-wrap {
    flex-shrink: 0;
}

.user-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-card-avatar-placeholder {
    color: #3730a3;
    font-size: 28px;
    font-weight: 900;
}

.user-card-info {
    flex: 1;
    min-width: 0;
}

.user-card-name {
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 4px;
}

.user-card-username {
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.user-card-bio {
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.user-card-action {
    flex-shrink: 0;
    padding: 10px 16px;
    border-radius: 14px;
    background: #f3f4f6;
    color: #111827;
    font-size: 13px;
    font-weight: 900;
}

.empty-state {
    text-align: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 46px 20px;
    color: #6b7280;
}

.empty-state-icon {
    font-size: 44px;
    margin-bottom: 12px;
}

.empty-state h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

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

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

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

@media (max-width: 640px) {
    .search-page {
        padding: 24px 12px 50px;
    }

    .search-title {
        font-size: 28px;
    }

    .search-wrapper {
        max-width: 100%;
    }

    .search-input {
        font-size: 15px;
    }

    .dropdown-user-item {
        padding: 12px;
    }

    .dropdown-avatar {
        width: 46px;
        height: 46px;
    }

    .user-card {
        align-items: flex-start;
        padding: 15px;
    }

    .user-card-avatar {
        width: 58px;
        height: 58px;
    }

    .user-card-action {
        display: none;
    }
}






/* Only keep the direct dropdown container visible */
.repost-menu-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    flex: 1 1 auto;
    min-width: max-content;
    overflow: visible;
    z-index: 100;
}

/* Don't force every parent to overflow visible */
.timeline-container,
.posts-list,
.post-card,
.post-wrapper,
.post-body,
.post-actions {
    position: relative;
}

.post-card {
    z-index: 1;
}

    /* Fallback instead of :has() */
    .post-card.repost-menu-open {
        z-index: 200;
    }

.repost-menu-wrap > .post-action-btn {
    flex: 0 1 auto;
}

/* Modern Dropdown */
.repost-dropdown-menu {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    min-width: 180px;
    max-width: 260px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.08);
    padding: 8px;
    z-index: 1000;
    overflow: hidden;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

    .repost-dropdown-menu::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -7px;
        transform: translateX(-50%) rotate(45deg);
        width: 12px;
        height: 12px;
        background: #ffffff;
        border-right: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
        z-index: -1;
    }

.repost-dropdown-item {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 650;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
    text-align: left;
}

    .repost-dropdown-item:hover,
    .repost-dropdown-item:focus-visible {
        background: #f3f4f6;
        color: #2563eb;
        transform: translateX(2px);
    }

    .repost-dropdown-item:active {
        transform: scale(0.98);
    }

/* Quote Context */
.quote-context-box {
    margin: 0 0 18px 0;
}

.quote-context-label {
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Changed from black background to white with gray border */
.quote-context-card {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 14px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

    .quote-context-card:hover {
        border-color: #d1d5db;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
    }

.quote-context-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.quote-context-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.quote-context-user {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .quote-context-user strong {
        color: #111827;
        font-size: 14px;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .quote-context-user span {
        color: #6b7280;
        font-size: 13px;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.quote-context-content {
    color: #1f2937;
    font-size: 14px;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
    margin-top: 8px;
}

/* Rounded image/video corners */
.quote-context-image,
.quote-context-video,
.quoted-image {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    display: block;
    margin-top: 12px;
    background: #f9fafb;
    overflow: hidden;
}

/* Optional: smoother media look */
.quote-context-image,
.quoted-image {
    aspect-ratio: auto;
}

/* Loading box modern style */
.quote-loading-box {
    padding: 12px 14px;
    border-radius: 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.smart-bidi-text {
    unicode-bidi: plaintext;
    text-align: start;
}

.card-avatar-image,
.quote-context-avatar-image {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.card-avatar,
.quote-context-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: #e5e7eb;
    color: #374151;
    flex-shrink: 0;
}
.user-avatar-image {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: #e5e7eb;
    color: #374151;
    flex-shrink: 0;
}
.form-group {
    margin-bottom: 1.25rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
        font-weight: 600;
        color: #1f2937;
    }

.bio-textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

    .bio-textarea::placeholder {
        color: #9ca3af;
    }

    .bio-textarea:hover {
        border-color: #9ca3af;
    }

    .bio-textarea:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
        background-color: #fcfdff;
    }

.email-hint {
    margin-top: 0.45rem;
    font-size: 0.82rem;
    color: #6b7280;
    text-align: right;
}

/* استایل پیام خطا در Blazor */
.validation-message {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.82rem;
    color: #dc2626;
    font-weight: 500;
}

/* اگر فیلد نامعتبر شود */
.bio-textarea.input-validation-error,
.bio-textarea.invalid {
    border-color: #ef4444;
    background-color: #fffafa;
}

    .bio-textarea.input-validation-error:focus,
    .bio-textarea.invalid:focus {
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
    }


.upload-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.95;
}

.upload-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.22);
    border-top-color: currentColor;
    animation: upload-spin 0.8s linear infinite;
    flex-shrink: 0;
}

.is-uploading,
.avatar-label.is-uploading,
.pm-upload-btn.is-uploading,
.upload-box.is-uploading {
    opacity: 0.72;
}

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


/* Admin panel */
.admin-page-shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

.admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
    gap: 20px;
    margin-bottom: 24px;
}

.admin-hero-copy,
.admin-hero-card,
.admin-card,
.admin-alert {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.08);
}

.admin-hero-copy {
    padding: 28px;
}

.admin-eyebrow {
    color: var(--primary-dark);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.82rem;
    margin-bottom: 10px;
}

.admin-hero-copy h1 {
    font-size: 2.4rem;
    margin-bottom: 10px;
}

.admin-hero-copy p {
    color: var(--gray-700);
    max-width: 70ch;
}

.admin-hero-card {
    padding: 20px;
    display: grid;
    gap: 12px;
    align-content: start;
}

.admin-hero-stat {
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(59,130,246,0.06), rgba(59,130,246,0.02));
}

.admin-hero-stat span,
.admin-user-meta,
.admin-post-meta {
    display: block;
    color: var(--gray-500);
    font-size: 0.88rem;
}

.admin-hero-stat strong {
    display: block;
    margin-top: 4px;
    font-size: 1rem;
}

.admin-grid {
    display: grid;
    gap: 20px;
}

.admin-card {
    padding: 22px;
}

.admin-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.admin-section-head h2,
.admin-section-head h3 {
    margin: 0;
}

.admin-section-head p {
    color: var(--gray-500);
    margin-top: 4px;
}

.admin-search {
    min-width: 220px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--gray-300);
    background: rgba(255,255,255,0.9);
    outline: none;
}

.admin-table {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.admin-table-head,
.admin-table-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 0.9fr) 140px 220px;
    gap: 14px;
    align-items: center;
}

.admin-table-head {
    color: var(--gray-500);
    font-size: 0.9rem;
    padding: 0 8px;
}

.admin-table-row {
    padding: 14px 12px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.admin-user-name,
.admin-post-author {
    font-weight: 800;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-main { background: rgba(16,185,129,0.12); color: #047857; }
.status-admin { background: rgba(59,130,246,0.12); color: #1d4ed8; }
.status-user { background: rgba(148,163,184,0.15); color: #475569; }

.admin-actions,
.admin-editor-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-action-btn,
.admin-save-btn,
.admin-cancel-btn {
    border: none;
    border-radius: 14px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.admin-action-btn,
.admin-cancel-btn {
    background: rgba(59,130,246,0.1);
    color: var(--primary-dark);
}

.admin-action-btn.danger {
    background: rgba(239,68,68,0.1);
    color: #dc2626;
}

.admin-save-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.admin-editor {
    margin-top: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--gray-200);
}

.admin-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-form .full {
    grid-column: 1 / -1;
}

.admin-form .form-control,
.admin-form .bio-textarea {
    width: 100%;
}

.admin-editor-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--gray-500);
    font-size: 0.9rem;
    margin: 12px 0 14px;
}

.admin-post-list {
    display: grid;
    gap: 14px;
}

.admin-post-item {
    padding: 16px;
    border-radius: 18px;
    background: rgba(248,250,252,0.92);
    border: 1px solid rgba(226,232,240,0.9);
}

.admin-post-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    margin-bottom: 10px;
}

.admin-post-content {
    line-height: 1.8;
    color: var(--gray-800);
}

.admin-post-media {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 16px;
    margin-top: 12px;
}

.admin-alert {
    padding: 14px 16px;
    margin-bottom: 18px;
    font-weight: 600;
}

.admin-alert.success { border-color: rgba(16,185,129,0.2); color: #047857; }
.admin-alert.error { border-color: rgba(239,68,68,0.2); color: #b91c1c; }

@media (max-width: 1024px) {
    .admin-hero,
    .admin-table-head,
    .admin-table-row {
        grid-template-columns: 1fr;
    }

    .admin-form .form-grid {
        grid-template-columns: 1fr;
    }
}



/* Admin section UI */
.admin-shell {
    min-height: 100vh;
    padding: 20px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 26%),
        radial-gradient(circle at top right, rgba(14, 165, 233, .12), transparent 22%),
        #f8fafc;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-radius: 28px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.8);
    box-shadow: 0 10px 40px rgba(15, 23, 42, .08);
    backdrop-filter: blur(18px);
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.admin-logo {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    flex-shrink: 0;
}

.admin-brand-text {
    min-width: 0;
}

.admin-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-subtitle {
    margin-top: 4px;
    color: #64748b;
    font-size: .88rem;
}

.admin-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-chip {
    height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: .84rem;
    border: 1px solid #dbeafe;
}

.admin-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.admin-nav-link {
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    border: 1px solid #e2e8f0;
    color: #334155;
    font-weight: 800;
}

.admin-nav-link.active {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: white;
    border-color: transparent;
}

.admin-banner {
    margin-bottom: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    font-weight: 700;
}

.admin-banner.success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.admin-banner.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-grid.single {
    grid-template-columns: 1fr;
}

.admin-card {
    background: rgba(255,255,255,.96);
    border-radius: 28px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 34px rgba(15, 23, 42, .06);
}

.admin-card h2,
.admin-card h3 {
    margin: 0 0 14px;
    font-weight: 900;
}

.admin-muted {
    color: #64748b;
}

.admin-toolbar {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.admin-search {
    min-width: 240px;
    flex: 1;
    height: 48px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 16px;
    padding: 0 16px;
    outline: none;
}

.admin-filter {
    min-width: 180px;
    height: 48px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 16px;
    padding: 0 14px;
    outline: none;
    font: inherit;
}

.admin-post-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.admin-post-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    border: 1px solid transparent;
}

.admin-post-type.normal {
    background: #eff6ff;
    color: #2563eb;
    border-color: #dbeafe;
}

.admin-post-type.quote {
    background: #fffbeb;
    color: #d97706;
    border-color: #fde68a;
}

.admin-post-type.repost {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

.admin-post-type.source {
    background: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}

.admin-origin-box {
    margin: 0 18px 18px;
}

.admin-origin-title {
    font-weight: 900;
    margin-bottom: 8px;
    color: #334155;
}

.admin-origin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #64748b;
    font-size: .9rem;
    margin-bottom: 10px;
}

.admin-origin-snippet {
    color: #334155;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}


.admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr .8fr auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid #eef2f7;
    background: white;
}

.admin-row.narrow {
    grid-template-columns: 1.6fr 1fr auto;
}

.admin-row.two {
    grid-template-columns: 1.8fr auto;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.admin-avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    display: grid;
    place-items: center;
    color: white;
    font-weight: 900;
}

.admin-avatar.ghost {
    background: transparent;
}

.admin-name {
    font-weight: 900;
}

.admin-meta {
    color: #64748b;
    font-size: .84rem;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}

.admin-badge.user {
    background: #f1f5f9;
    color: #475569;
}
.admin-badge.admin {
    background: #dbeafe;
    color: #1d4ed8;
}
.admin-badge.main {
    background: #ede9fe;
    color: #7c3aed;
}
.admin-badge.danger {
    background: #fef2f2;
    color: #b91c1c;
}

.admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-btn {
    border: none;
    border-radius: 14px;
    height: 42px;
    padding: 0 16px;
    font-weight: 800;
    cursor: pointer;
}

.admin-btn.primary {
    background: #eff6ff;
    color: #2563eb;
}

.admin-btn.danger {
    background: #fef2f2;
    color: #dc2626;
}

.admin-btn.success {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: white;
}

.admin-btn.ghost {
    background: white;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.admin-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15,23,42,.62);
    backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    padding: 16px;
}

.admin-modal {
    width: min(860px, 100%);
    max-height: 92vh;
    overflow: auto;
    background: white;
    border-radius: 30px;
    padding: 24px;
    box-shadow: 0 20px 80px rgba(15,23,42,.18);
}

.admin-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #f1f5f9;
    cursor: pointer;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.admin-field.full {
    grid-column: 1 / -1;
}

.admin-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
    color: #334155;
}

.admin-input,
.admin-textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
    padding: 14px 16px;
    outline: none;
    font: inherit;
}

.admin-textarea {
    min-height: 140px;
    resize: vertical;
}

.admin-upload {
    margin-top: 16px;
    padding: 18px;
    border-radius: 20px;
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
}

.admin-preview {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 20px;
    margin-top: 12px;
    border: 1px solid #e2e8f0;
}

.admin-footer-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.admin-stat {
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
    border: 1px solid #e2e8f0;
}

.admin-stat .value {
    font-size: 1.6rem;
    font-weight: 900;
}

.admin-stat .label {
    margin-top: 6px;
    color: #64748b;
    font-size: .86rem;
}

.admin-post-card,
.admin-comment-card {
    border: 1px solid #eef2f7;
    border-radius: 24px;
    background: white;
    overflow: hidden;
}

.admin-post-head,
.admin-comment-head {
    padding: 18px 18px 0;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-post-content,
.admin-comment-content {
    padding: 0 18px 18px;
    line-height: 1.9;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-media {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-top: 1px solid #eef2f7;
}

.admin-quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-quick-link {
    display: block;
    padding: 18px;
    border-radius: 22px;
    background: white;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
}

.admin-quick-link strong {
    display: block;
    margin-bottom: 6px;
}

.admin-note {
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

@media (max-width: 1100px) {
    .admin-grid,
    .admin-stats-grid,
    .admin-quick-links {
        grid-template-columns: 1fr 1fr;
    }
    .admin-row {
        grid-template-columns: 1fr;
    }
    .admin-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .admin-shell {
        padding: 12px;
    }

    .admin-topbar {
        padding: 16px;
        border-radius: 24px;
    }

    .admin-chips {
        justify-content: flex-start;
    }

    .admin-grid,
    .admin-stats-grid,
    .admin-quick-links,
    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-card {
        padding: 16px;
        border-radius: 22px;
    }

    .admin-modal {
        padding: 18px;
        border-radius: 24px;
    }
}

