* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* ===================================== */
/* هدر بالا: کادر لوگو + نوبار کاربری     */
/* ===================================== */
.header-top {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: max-content;
    max-width: 95%;
}

/* کادر جدای لوگو */
.logo-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 100, 255, 0.2);
    border-radius: 50px;
    padding: 10px 20px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 100, 255, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-box:hover {
    border-color: rgba(0, 100, 255, 0.4);
    box-shadow:
        0 10px 50px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 100, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a9eff;
    text-decoration: none;
}

.logo svg {
    width: 34px;
    height: 34px;
    color: #4a9eff;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.logo-box:hover .logo svg {
    transform: rotate(-10deg) scale(1.05);
}

.site-name {
    color: #e0e0e0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* نوبار بالا (کاربری) */
.navbar-top {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 100, 255, 0.2);
    border-radius: 50px;
    padding: 6px 6px 6px 16px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 100, 255, 0.05);
    transition: all 0.3s ease;
    flex: 0 0 auto;
    display: inline-flex;
}

.navbar-top:hover {
    border-color: rgba(0, 100, 255, 0.4);
    box-shadow:
        0 10px 50px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 100, 255, 0.1);
}

.nav-container {
    display: flex;
    align-items: center;
}

/* منوی کاربری — همیشه سمت راست نوبار */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 10px;
}

.user-link {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
    text-decoration: none;
    padding: 6px 8px 6px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: rgba(0, 100, 255, 0.08);
    border: 1px solid rgba(0, 100, 255, 0.15);
}

.user-link:hover {
    background: rgba(0, 100, 255, 0.18);
    border-color: rgba(0, 100, 255, 0.35);
    transform: translateY(-1px);
}

.user-link svg {
    color: #4a9eff;
    flex-shrink: 0;
}

.username {
    font-size: 14px;
    font-weight: 500;
    color: #e0e0e0;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6b6b;
    text-decoration: none;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(255, 68, 68, 0.08);
    border: 1px solid rgba(255, 68, 68, 0.15);
}

.logout-link:hover {
    background: rgba(255, 68, 68, 0.18);
    border-color: rgba(255, 68, 68, 0.35);
    transform: translateY(-1px);
}

.logout-link svg {
    color: #ff6b6b;
}

.login-link-header {
    color: #e0e0e0;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    background: rgba(0, 100, 255, 0.08);
    border: 1px solid rgba(0, 100, 255, 0.15);
}

.login-link-header:hover {
    background: rgba(0, 100, 255, 0.18);
    border-color: rgba(0, 100, 255, 0.35);
    transform: translateY(-1px);
}

.register-link-header {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #4a9eff, #0066ff);
    border: 1px solid rgba(0, 100, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 100, 255, 0.25);
}

.register-link-header:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(0, 100, 255, 0.4);
}

/* ===================================== */
/* استایل نوبار پایین                     */
/* ===================================== */
.navbar-bottom {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 20px;
    border: 1px solid rgba(0, 100, 255, 0.15);
    border-radius: 50px;
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: auto;
    min-width: 240px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 100, 255, 0.05);
    transition: all 0.3s ease;
}

.navbar-bottom:hover {
    border-color: rgba(0, 100, 255, 0.3);
    box-shadow:
        0 10px 50px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 100, 255, 0.08);
}

.nav-container-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #999999;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.nav-item svg {
    width: 26px;
    height: 26px;
    color: #999999;
    transition: all 0.3s ease;
}

.nav-item span {
    font-size: 11px;
    color: #999999;
    transition: all 0.3s ease;
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.nav-item:hover {
    color: #4a9eff;
}

.nav-item:hover svg {
    color: #4a9eff;
    transform: translateY(-2px);
}

.nav-item:hover span {
    color: #4a9eff;
}

.nav-item.active {
    color: #4a9eff;
}

.nav-item.active svg {
    color: #4a9eff;
}

.nav-item.active span {
    color: #4a9eff;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #4a9eff;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-item:hover::after {
    width: 16px;
}

.nav-item.active::after {
    width: 16px;
}

/* ===================================== */
/* محتوای صفحات                          */
/* ===================================== */
.page-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 130px 20px 100px;
}

.content-center {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

/* بخش خوش‌آمدگویی */
.welcome-box {
    animation: fadeInUp 0.8s ease;
    padding: 40px 30px;
    background: rgba(30, 30, 30, 0.4);
    border-radius: 24px;
    border: 1px solid rgba(0, 100, 255, 0.1);
}

.welcome-box.logged-in {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 100, 255, 0.2);
    box-shadow: 0 0 40px rgba(0, 100, 255, 0.05);
}

.icon-large {
    color: #4a9eff;
    margin-bottom: 25px;
}

.avatar-icon {
    color: #4a9eff;
    margin-bottom: 20px;
}

.avatar-icon svg {
    background: rgba(0, 100, 255, 0.1);
    border-radius: 50%;
    padding: 15px;
}

.welcome-box h1 {
    color: #f0f0f0;
    font-size: 36px;
    margin-bottom: 15px;
}

.welcome-box .subtitle {
    color: #aaaaaa;
    font-size: 16px;
    margin-bottom: 35px;
}

.user-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.user-actions .btn {
    width: auto;
    padding: 14px 35px;
    min-width: 120px;
}

.welcome-box.guest .user-actions {
    gap: 20px;
}

/* ===================================== */
/* استایل فرم‌های ثبت‌نام و ورود           */
/* ===================================== */
.auth-container {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 45px 40px;
    border: 1px solid rgba(0, 100, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease;
}

.auth-container h2 {
    color: #f0f0f0;
    font-size: 28px;
    margin-bottom: 8px;
    text-align: center;
}

.auth-container .subtitle {
    color: #999999;
    font-size: 14px;
    margin-bottom: 30px;
    text-align: center;
}

.register-form, .login-form {
    margin-top: 10px;
}

.form-group {
    margin-bottom: 20px;
    text-align: right;
}

.form-group label {
    display: block;
    color: #cccccc;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 100, 255, 0.1);
    border-radius: 12px;
    color: #f0f0f0;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    outline: none;
}

.form-group input:focus {
    border-color: #4a9eff;
    box-shadow: 0 0 20px rgba(0, 100, 255, 0.1);
    background: rgba(0, 0, 0, 0.4);
}

.form-group input::placeholder {
    color: #666666;
}

.register-link, .login-link {
    margin-top: 25px;
    color: #999999;
    font-size: 14px;
    text-align: center;
}

.register-link a, .login-link a {
    color: #4a9eff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link a:hover, .login-link a:hover {
    color: #66b3ff;
    text-decoration: underline;
}

/* ===================================== */
/* دکمه‌ها                                */
/* ===================================== */
.btn {
    padding: 14px 35px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #4a9eff, #0066ff);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 100, 255, 0.3);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 100, 255, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(30, 30, 30, 0.8);
    color: #e0e0e0;
    border: 2px solid rgba(0, 100, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(0, 100, 255, 0.1);
    border-color: #4a9eff;
    transform: translateY(-2px);
}

.btn-logout {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #ffffff;
    width: auto;
    padding: 14px 40px;
    box-shadow: 0 4px 20px rgba(255, 68, 68, 0.3);
    display: inline-block;
    text-decoration: none;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 68, 68, 0.5);
}

/* ===================================== */
/* پیام‌های هشدار                         */
/* ===================================== */
.alert {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 500;
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    animation: slideDown 0.5s ease;
    max-width: 90%;
    text-align: center;
}

.alert-success {
    background: rgba(0, 200, 100, 0.9);
    color: #ffffff;
    border: 1px solid rgba(0, 255, 150, 0.3);
    box-shadow: 0 8px 30px rgba(0, 200, 100, 0.3);
}

.alert-error {
    background: rgba(255, 68, 68, 0.9);
    color: #ffffff;
    border: 1px solid rgba(255, 100, 100, 0.3);
    box-shadow: 0 8px 30px rgba(255, 68, 68, 0.3);
}

/* ===================================== */
/* انیمیشن‌ها                             */
/* ===================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===================================== */
/* واکنش‌گرا (Responsive)                 */
/* ===================================== */
@media (max-width: 768px) {
    .header-top {
        top: 15px;
        padding: 0 15px;
        gap: 10px;
    }

    .logo-box {
        padding: 8px 14px;
    }

    .site-name {
        font-size: 16px;
    }

    .logo svg {
        width: 28px;
        height: 28px;
    }

    .navbar-top {
        padding: 6px 8px 6px 14px;
    }

    .username {
        font-size: 12px;
        max-width: 80px;
    }

    .user-link {
        padding: 5px 6px 5px 12px;
    }

    .login-link-header,
    .register-link-header {
        font-size: 12px;
        padding: 6px 14px;
    }

    .user-menu {
        gap: 8px;
    }

    .navbar-bottom {
        padding: 10px 15px;
        bottom: 20px;
        min-width: 200px;
        border-radius: 40px;
    }

    .nav-container-bottom {
        gap: 8px;
    }

    .nav-item {
        padding: 6px 10px;
    }

    .nav-item svg {
        width: 22px;
        height: 22px;
    }

    .nav-item span {
        font-size: 10px;
    }

    .welcome-box h1 {
        font-size: 28px;
    }

    .auth-container {
        padding: 35px 25px;
    }

    .auth-container h2 {
        font-size: 24px;
    }

    .page-content {
        padding-top: 120px;
    }

    .alert {
        top: 78px;
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .header-top {
        top: 10px;
        padding: 0 10px;
        gap: 8px;
    }

    .logo-box {
        padding: 7px 10px;
        gap: 6px;
    }

    .site-name {
        display: none;
    }

    .logo svg {
        width: 26px;
        height: 26px;
    }

    .navbar-top {
        padding: 5px 6px 5px 10px;
    }

    .username {
        display: none;
    }

    .user-link {
        padding: 6px;
        border-radius: 50%;
    }

    .user-link svg {
        width: 20px;
        height: 20px;
    }

    .logout-link {
        padding: 6px;
    }

    .logout-link svg {
        width: 18px;
        height: 18px;
    }

    .login-link-header,
    .register-link-header {
        font-size: 11px;
        padding: 6px 12px;
    }

    .user-menu {
        gap: 6px;
    }

    .navbar-bottom {
        padding: 8px 10px;
        bottom: 15px;
        min-width: 170px;
        border-radius: 30px;
    }

    .nav-container-bottom {
        gap: 5px;
    }

    .nav-item {
        padding: 5px 8px;
    }

    .nav-item svg {
        width: 20px;
        height: 20px;
    }

    .nav-item span {
        font-size: 9px;
    }

    .welcome-box {
        padding: 25px 15px;
    }

    .welcome-box h1 {
        font-size: 22px;
    }

    .icon-large svg {
        width: 80px;
        height: 80px;
    }

    .user-actions .btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100px;
    }

    .user-actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .auth-container {
        padding: 25px 18px;
    }

    .auth-container h2 {
        font-size: 20px;
    }

    .page-content {
        padding-top: 100px;
    }

    .alert {
        top: 65px;
        padding: 10px 15px;
        font-size: 12px;
        border-radius: 10px;
    }
}

/* استایل‌های پروفایل */
.profile-page {
    padding: 100px 20px 100px;
    max-width: 900px;
    margin: 0 auto;
}

.profile-container {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(0, 100, 255, 0.15);
}

.profile-header {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.profile-avatar {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar svg {
    width: 150px;
    height: 150px;
    color: #4a9eff;
    background: rgba(0, 100, 255, 0.1);
    border-radius: 50%;
    padding: 15px;
}

.change-avatar-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #4a9eff;
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.change-avatar-btn:hover {
    transform: scale(1.1);
}

.profile-info {
    flex: 1;
}

.profile-name {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 8px;
}

.profile-name h2 {
    color: #f0f0f0;
    font-size: 28px;
}

.edit-profile-btn {
    background: rgba(0, 100, 255, 0.15);
    border: 1px solid rgba(0, 100, 255, 0.2);
    color: #4a9eff;
    padding: 6px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Vazir', sans-serif;
}

.edit-profile-btn:hover {
    background: rgba(0, 100, 255, 0.25);
}

.profile-username {
    color: #8899bb;
    font-size: 14px;
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

.stat-number {
    color: #f0f0f0;
    font-size: 20px;
    font-weight: 700;
}

.stat-label {
    color: #8899bb;
    font-size: 12px;
}

.profile-bio {
    color: #cccccc;
    font-size: 14px;
    line-height: 1.6;
    max-width: 400px;
}

/* تب‌های پروفایل */
.profile-tabs {
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(0, 100, 255, 0.1);
    padding-top: 20px;
    margin-bottom: 30px;
}

.profile-tabs .tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: #8899bb;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: 'Vazir', sans-serif;
    font-size: 14px;
}

.profile-tabs .tab-btn:hover {
    color: #e0e0e0;
    background: rgba(0, 100, 255, 0.05);
}

.profile-tabs .tab-btn.active {
    color: #4a9eff;
    background: rgba(0, 100, 255, 0.1);
}

.profile-tabs .tab-btn svg {
    width: 20px;
    height: 20px;
}

/* محتوای تب‌ها */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* گرید پست‌ها */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.post-item {
    position: relative;
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.post-item .post-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-item .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #8899bb;
    font-size: 14px;
    text-align: center;
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-item:hover .post-overlay {
    opacity: 1;
}

.post-actions {
    display: flex;
    gap: 30px;
}

.post-actions button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Vazir', sans-serif;
}

.post-actions button svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* حالت خالی */
.no-posts,
.saved-empty,
.tagged-empty {
    text-align: center;
    padding: 60px 20px;
    color: #8899bb;
}

.no-posts svg,
.saved-empty svg,
.tagged-empty svg {
    color: #4a9eff;
    margin-bottom: 15px;
}

.no-posts p,
.saved-empty p,
.tagged-empty p {
    margin-bottom: 20px;
}

/* مودال */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #2a2a2a;
    border-radius: 24px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(0, 100, 255, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h3 {
    color: #f0f0f0;
    font-size: 20px;
}

.modal-close {
    background: transparent;
    border: none;
    color: #8899bb;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #f0f0f0;
}

.modal .form-group {
    margin-bottom: 20px;
}

.modal .form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 100, 255, 0.1);
    border-radius: 12px;
    color: #f0f0f0;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: 'Vazir', sans-serif;
    outline: none;
    resize: vertical;
}

.modal .form-group textarea:focus {
    border-color: #4a9eff;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-name {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .profile-bio {
        max-width: 100%;
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .posts-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3px;
    }
    
    .profile-avatar svg {
        width: 100px;
        height: 100px;
    }
    
    .profile-name h2 {
        font-size: 22px;
    }
    
    .profile-tabs .tab-btn span {
        display: none;
    }
}

/* ============================================
   استایل پاپ‌آپ نوتیفیکیشن (Notification Toast)
   ============================================ */
.notification-container {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 100%;
    max-width: 450px;
    padding: 0 20px;
    pointer-events: none;
}

.notification {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    border-radius: 16px;
    background: #2a2a2a;
    border: 1px solid rgba(0, 100, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    animation: notificationSlide 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    margin-bottom: 10px;
}

.notification:last-child {
    margin-bottom: 0;
}

/* انواع نوتیفیکیشن */
.notification-success {
    border-right: 4px solid #00c853;
    background: linear-gradient(135deg, rgba(0, 200, 80, 0.15), rgba(30, 30, 30, 0.95));
}

.notification-success .notification-icon {
    color: #00c853;
}

.notification-error {
    border-right: 4px solid #ff1744;
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.15), rgba(30, 30, 30, 0.95));
}

.notification-error .notification-icon {
    color: #ff1744;
}

.notification-warning {
    border-right: 4px solid #ff9100;
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.15), rgba(30, 30, 30, 0.95));
}

.notification-warning .notification-icon {
    color: #ff9100;
}

.notification-info {
    border-right: 4px solid #2979ff;
    background: linear-gradient(135deg, rgba(41, 121, 255, 0.15), rgba(30, 30, 30, 0.95));
}

.notification-info .notification-icon {
    color: #2979ff;
}

/* آیکون نوتیفیکیشن */
.notification-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.notification-icon svg {
    width: 24px;
    height: 24px;
}

/* محتوای نوتیفیکیشن */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content p {
    color: #f0f0f0;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.notification-content .notification-title {
    font-weight: 700;
    font-size: 13px;
    color: #aaaaaa;
    display: block;
    margin-bottom: 2px;
}

/* دکمه بستن */
.notification-close {
    background: transparent;
    border: none;
    color: #666666;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    font-family: 'Vazir', sans-serif;
    flex-shrink: 0;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: #f0f0f0;
    background: rgba(255, 255, 255, 0.1);
}

/* نوار پیشرفت */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #4a9eff, #00c853);
    animation: progressBar 4s linear forwards;
    border-radius: 0 0 0 3px;
}

.notification-success .notification-progress {
    background: linear-gradient(90deg, #00c853, #00e676);
}

.notification-error .notification-progress {
    background: linear-gradient(90deg, #ff1744, #ff5252);
}

.notification-warning .notification-progress {
    background: linear-gradient(90deg, #ff9100, #ffab40);
}

.notification-info .notification-progress {
    background: linear-gradient(90deg, #2979ff, #448aff);
}

/* انیمیشن‌ها */
@keyframes notificationSlide {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes notificationSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* حذف استایل‌های قدیمی alert */
.alert {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .notification-container {
        top: 80px;
        max-width: 100%;
        padding: 0 15px;
    }
    
    .notification {
        padding: 14px 16px;
        border-radius: 14px;
        gap: 12px;
    }
    
    .notification-content p {
        font-size: 13px;
    }
    
    .notification-icon {
        width: 34px;
        height: 34px;
    }
    
    .notification-icon svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .notification-container {
        top: 70px;
        padding: 0 10px;
    }
    
    .notification {
        padding: 12px 14px;
        border-radius: 12px;
        gap: 10px;
    }
    
    .notification-content p {
        font-size: 12px;
    }
    
    .notification-icon {
        width: 30px;
        height: 30px;
    }
    
    .notification-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .notification-close {
        font-size: 16px;
        width: 26px;
        height: 26px;
    }
}

/* اضافه کنید به style.css */

/* استایل آواتار در نوبار بالا */
.user-avatar-nav {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 100, 255, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.user-link:hover .user-avatar-nav {
    border-color: rgba(0, 100, 255, 0.6);
    transform: scale(1.05);
}

/* استایل آواتار در نوبار پایین */
.nav-item .user-avatar-nav {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 100, 255, 0.2);
    transition: all 0.3s ease;
}

.nav-item:hover .user-avatar-nav {
    border-color: rgba(0, 100, 255, 0.5);
    transform: scale(1.1);
}

.nav-item.active .user-avatar-nav {
    border-color: #4a9eff;
    box-shadow: 0 0 20px rgba(0, 100, 255, 0.3);
}

/* تنظیم اندازه آواتار در حالت موبایل */
@media (max-width: 768px) {
    .user-avatar-nav {
        width: 24px;
        height: 24px;
    }
    .nav-item .user-avatar-nav {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    .user-avatar-nav {
        width: 20px;
        height: 20px;
    }
    .nav-item .user-avatar-nav {
        width: 18px;
        height: 18px;
    }
}

/* ============================================
   استایل رول‌ها
   ============================================ */
.role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    margin-right: 6px;
    white-space: nowrap;
}

.role-badge.owner {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.role-badge.admin {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.role-badge.developer {
    background: rgba(74, 158, 255, 0.2);
    color: #4a9eff;
    border: 1px solid rgba(74, 158, 255, 0.3);
}

.role-badge.member {
    background: rgba(136, 153, 187, 0.15);
    color: #8899bb;
    border: 1px solid rgba(136, 153, 187, 0.2);
}

/* ============================================
   دکمه مدیریت شناور (جدا از نوبار)
   ============================================ */
.admin-float-btn {
    position: fixed;
    bottom: 100px;
    right: 25px;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #f9a825);
    color: #1a1a1a;
    text-decoration: none;
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.admin-float-btn.show {
    display: flex;
}

.admin-float-btn:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.6);
}

.admin-float-btn svg {
    width: 26px;
    height: 26px;
}

.admin-float-btn .tooltip {
    position: absolute;
    right: 70px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    color: #f0f0f0;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    font-family: 'Vazir', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.admin-float-btn:hover .tooltip {
    opacity: 1;
    transform: translateX(0);
}

.admin-float-btn .badge-owner {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff1744;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    font-family: 'Vazir', sans-serif;
}

@media (max-width: 768px) {
    .admin-float-btn {
        width: 48px;
        height: 48px;
        bottom: 90px;
        right: 15px;
    }
    .admin-float-btn svg {
        width: 22px;
        height: 22px;
    }
    .admin-float-btn .tooltip {
        display: none;
    }
}

@media (max-width: 480px) {
    .admin-float-btn {
        width: 44px;
        height: 44px;
        bottom: 80px;
        right: 10px;
    }
    .admin-float-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   متغیرهای CSS برای سیستم تم (روز و شب)
   ============================================ */
:root {
    --bg-primary: #0a0a0f;
    --bg-card: #14141e;
    --bg-secondary: #1e1e2e;
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a80;
    --border-color: rgba(255, 255, 255, 0.06);
    --hover-bg: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-card: #ffffff;
    --bg-secondary: #e4e6eb;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8a8aa0;
    --border-color: #d0d0d8;
    --hover-bg: rgba(0,0,0,0.03);
}

[data-theme="dark"] {
    --bg-primary: #0a0a0f;
    --bg-card: #14141e;
    --bg-secondary: #1e1e2e;
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a80;
    --border-color: rgba(255,255,255,0.06);
    --hover-bg: rgba(255,255,255,0.02);
}

/* استفاده از متغیرها در body */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

/* ============================================
   متغیرهای CSS - تم روشن با متن خوانا
   ============================================ */
:root {
    /* رنگ‌های اصلی - روشن و تمیز */
    --bg-primary: #f0f2f5;
    --bg-card: #ffffff;
    --bg-secondary: #e8eaed;
    --bg-hover: rgba(0,0,0,0.03);
    
    /* رنگ‌های متن - تیره و خوانا (مهم!) */
    --text-primary: #1a1a2e;
    --text-secondary: #3d3d5c;
    --text-muted: #6b6b85;
    --text-light: #9a9ab0;
    
    /* رنگ‌های حاشیه */
    --border-color: rgba(0,0,0,0.08);
    --border-light: rgba(0,0,0,0.04);
    --border-hover: rgba(74,158,255,0.25);
    
    /* سایه‌ها */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
    
    /* رنگ‌های آکسان */
    --primary: #4a9eff;
    --primary-hover: #3a7fd9;
    --primary-light: rgba(74,158,255,0.12);
    --primary-dark: #0066ff;
    
    /* رنگ‌های موفقیت و خطا */
    --success: #00c853;
    --success-light: rgba(0,200,80,0.1);
    --danger: #ff4757;
    --danger-light: rgba(255,71,87,0.1);
    --warning: #ffa502;
    --warning-light: rgba(255,165,2,0.1);
    
    /* نوبار و هدر */
    --navbar-bg: rgba(255,255,255,0.92);
    --navbar-border: rgba(0,0,0,0.06);
    --navbar-shadow: 0 4px 30px rgba(0,0,0,0.06);
    
    /* کارت‌ها */
    --card-bg: #ffffff;
    --card-border: rgba(0,0,0,0.06);
    --card-shadow: 0 4px 24px rgba(0,0,0,0.05);
    --card-shadow-hover: 0 8px 40px rgba(0,0,0,0.1);
    
    /* ورودی‌ها */
    --input-bg: #f5f7fa;
    --input-border: rgba(0,0,0,0.1);
    --input-focus: rgba(74,158,255,0.2);
    --input-text: #1a1a2e;
    
    /* اسکرول بار */
    --scrollbar-track: rgba(0,0,0,0.03);
    --scrollbar-thumb: rgba(0,0,0,0.12);
    --scrollbar-thumb-hover: rgba(0,0,0,0.2);
}

/* ============================================
   تم تاریک
   ============================================ */
[data-theme="dark"] {
    --bg-primary: #0a0a0f;
    --bg-card: #14141e;
    --bg-secondary: #1e1e2e;
    --bg-hover: rgba(255,255,255,0.02);
    
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6a6a80;
    --text-light: #4a4a60;
    
    --border-color: rgba(255,255,255,0.06);
    --border-light: rgba(255,255,255,0.03);
    --border-hover: rgba(74,158,255,0.2);
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.5);
    
    --primary: #4a9eff;
    --primary-hover: #5aafff;
    --primary-light: rgba(74,158,255,0.1);
    --primary-dark: #0066ff;
    
    --success: #00c853;
    --success-light: rgba(0,200,80,0.1);
    --danger: #ff4757;
    --danger-light: rgba(255,71,87,0.1);
    --warning: #ffa502;
    --warning-light: rgba(255,165,2,0.1);
    
    --navbar-bg: rgba(20,20,30,0.85);
    --navbar-border: rgba(255,255,255,0.06);
    --navbar-shadow: 0 4px 30px rgba(0,0,0,0.4);
    
    --card-bg: #14141e;
    --card-border: rgba(255,255,255,0.06);
    --card-shadow: 0 4px 24px rgba(0,0,0,0.3);
    --card-shadow-hover: 0 8px 40px rgba(0,0,0,0.5);
    
    --input-bg: rgba(0,0,0,0.3);
    --input-border: rgba(255,255,255,0.06);
    --input-focus: rgba(74,158,255,0.2);
    --input-text: #f0f0f0;
    
    --scrollbar-track: rgba(255,255,255,0.02);
    --scrollbar-thumb: rgba(255,255,255,0.08);
    --scrollbar-thumb-hover: rgba(255,255,255,0.15);
}

/* ============================================
   اعمال متغیرها به المان‌ها
   ============================================ */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.4s ease, color 0.4s ease;
}

/* تمام تگ‌های متن */
h1, h2, h3, h4, h5, h6,
p, span, label, div, a, li,
input, textarea, button {
    color: var(--text-primary);
}

/* متن‌های ثانویه */
.text-secondary,
.info-label,
.username-meta,
.greeting,
.subtitle {
    color: var(--text-secondary);
}

/* متن‌های کمرنگ */
.text-muted,
.info-value,
.stat-label,
.post-meta,
.notif-time,
.time {
    color: var(--text-muted);
}

/* ============================================
   استایل ورودی‌ها - خوانا
   ============================================ */
input, textarea, select {
    color: var(--input-text) !important;
    background: var(--input-bg) !important;
    border: 2px solid var(--input-border) !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7;
}

/* ============================================
   استایل کارت‌ها
   ============================================ */
.profile-card,
.dashboard-section,
.stat-card,
.feature-card,
.hero-section,
.about-section,
.cta-section,
.auth-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
}


