﻿/* ===== متغیرهای رنگ — تم قرمز-مشکی ===== */
:root {
    --bg-primary: #0d0606;
    --bg-secondary: #1a0e0e;
    --bg-card: #221010;
    --bg-hover: #2e1414;
    --border: #3a1a1a;
    --text-primary: #e8dcdc;
    --text-secondary: #a89090;
    --accent: #c1272d;
    --accent-hover: #d93a42;
    --accent-glow: rgba(193, 39, 45, 0.35);
    --accent-secondary: #e07a3f;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gradient-1: linear-gradient(135deg, #a82026, #c1272d);
    --gradient-2: linear-gradient(135deg, #5a0000, #a82026);
}

/* ===== ریست کامل ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    direction: rtl;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image:
        radial-gradient(ellipse at top, rgba(193, 39, 45, 0.08), transparent 50%),
        radial-gradient(ellipse at bottom, rgba(90, 0, 0, 0.1), transparent 60%);
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== نوار بالا (ساده، sticky) ===== */
.navbar {
    background: rgba(26, 5, 5, 0.95);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(193, 39, 45, 0.15);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.6rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* ===== دکمه‌ها ===== */
.btn-primary,
.btn-outline,
.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 4px 15px rgba(193, 39, 45, 0.3);
}

.btn-primary:hover {
    background: var(--gradient-1);
    box-shadow: 0 6px 25px rgba(193, 39, 45, 0.5);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-full {
    width: 100%;
    margin-top: 8px;
}

/* ===== پیام‌ها ===== */
.messages {
    margin-top: 16px;
}

.alert {
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.alert-success { background: rgba(34, 197, 94, 0.15); color: var(--success); border: 1px solid rgba(34, 197, 94, 0.3); }
.alert-error, .alert-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.alert-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.alert-info { background: rgba(193, 39, 45, 0.15); color: var(--accent); border: 1px solid rgba(193, 39, 45, 0.3); }

/* ===== محتوا ===== */
main {
    flex: 1;
    display: block;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}



.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 24px;
    max-width: 800px;
    animation: heroFadeIn 1s ease-out;
}

@keyframes heroFadeIn {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.gradient-text {
    background: linear-gradient(135deg, #d93a42, #e07a3f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 36px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== فوتر ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 60px;
}

/* ===== کارت ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.25s;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(193, 39, 45, 0.15);
}

.form-control::placeholder {
    color: #6b5555;
}

/* ===== احراز هویت ===== */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 560px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.auth-card h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--accent);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ===== پروفایل ===== */
.profile-page {
    padding: 40px 24px 60px;
}

.profile-hero {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 32px;
}

.profile-hero-bg {
    height: 120px;
    background: linear-gradient(135deg, #5a0000 0%, #c1272d 50%, #1a0e0e 100%);
    position: relative;
}

.profile-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15), transparent 60%);
}

.profile-hero-content {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    padding: 0 32px 28px;
    margin-top: -48px;
    position: relative;
}

.profile-avatar-lg {
    width: 112px;
    height: 112px;
    border-radius: 28px;
    background: var(--gradient-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    border: 5px solid var(--bg-card);
    box-shadow: 0 8px 30px rgba(193, 39, 45, 0.4);
    flex-shrink: 0;
}

.profile-info h1 {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.profile-username {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.25s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.stat-accent {
    background: linear-gradient(135deg, rgba(193, 39, 45, 0.15), rgba(90, 0, 0, 0.15)) !important;
    border-color: rgba(193, 39, 45, 0.4) !important;
}

.stat-icon {
    font-size: 1.8rem;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-accent .stat-value {
    color: var(--accent);
}

.profile-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.team-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    flex-wrap: wrap;
}

.team-card-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.team-icon {
    font-size: 1.6rem;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-card h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

code {
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--accent);
    font-family: monospace;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 32px 16px;
}

.empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.empty-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.profile-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

/* ===== بازی‌ها ===== */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 6px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.25s;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(193, 39, 45, 0.2);
}

.game-thumb {
    height: 150px;
    background: linear-gradient(135deg, rgba(193, 39, 45, 0.2), rgba(90, 0, 0, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-emoji {
    font-size: 3.5rem;
}

.game-body {
    padding: 18px;
}

.game-body h3 {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.game-body .muted {
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.best-score {
    display: block;
    font-size: 0.8rem;
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ===== صفحه بازی ===== */
.play-page {
    padding: 32px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.play-header h1 {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.play-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.game-frame-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    height: 75vh;
    min-height: 500px;
}

.game-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ===== فول‌اسکرین ===== */
.game-frame-wrapper.is-fullscreen,
.game-frame-wrapper:fullscreen,
.game-frame-wrapper:-webkit-full-screen {
    background: #0d0606;
    border: none;
    border-radius: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
}

.game-frame-wrapper.is-fullscreen .game-frame,
.game-frame-wrapper:fullscreen .game-frame,
.game-frame-wrapper:-webkit-full-screen .game-frame {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* ===== اسکرول‌بار ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

::selection {
    background: rgba(193, 39, 45, 0.4);
    color: #fff;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 768px) {
    .nav-links {
        gap: 12px;
        font-size: 0.85rem;
    }
    .nav-container {
        height: 60px;
    }
    .hero {
        min-height: calc(100vh - 60px);
    }
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .auth-card {
        padding: 24px;
    }
    .profile-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 20px 24px;
    }
    .profile-tags {
        justify-content: center;
    }
    .profile-avatar-lg {
        width: 96px;
        height: 96px;
        font-size: 2rem;
    }
    .profile-info h1 {
        font-size: 1.4rem;
    }
}

/* ===== چسباندن هدر به بالای صفحه ===== */
html {
    margin: 0 !important;
    padding: 0 !important;
}

body {
    margin: 0 !important;
    padding: 0 !important;
}

.navbar {
    margin: 0 !important;
    top: 0 !important;
    position: sticky;
}

.navbar .nav-container {
    margin: 0;
}

main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ===== چسبیدن قطعی هدر ===== */
body {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

body > .navbar {
    margin-top: 0 !important;
    top: 0 !important;
    position: sticky !important;
}

body > .navbar + * {
    margin-top: 0 !important;
}

/* ===== چسبیدن قطعی هدر ===== */
body {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

body > .navbar {
    margin-top: 0 !important;
    top: 0 !important;
    position: sticky !important;
}

body > .navbar + * {
    margin-top: 0 !important;
}

/* ===== بخش ویژگی‌ها ===== */
.features {
    padding: 80px 0;
    background: var(--bg-primary);
}

.features-header {
    text-align: center;
    margin-bottom: 60px;
}

.features-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.features-header p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(193, 39, 45, 0.2);
}

.feature-icon {
    font-size: 2.8rem;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.features-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== آیکون‌های SVG ===== */
.logo-icon {
    width: 28px;
    height: 28px;
    filter: invert(1) sepia(1) saturate(5) hue-rotate(320deg) brightness(1.2);
    transition: transform 0.3s;
}

.logo:hover .logo-icon {
    transform: rotate(-10deg) scale(1.1);
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-icon {
    width: 18px;
    height: 18px;
    filter: invert(1);
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.nav-item:hover .nav-icon {
    opacity: 1;
    transform: translateY(-1px);
}

.btn-primary .nav-icon,
.btn-outline .nav-icon {
    filter: invert(1);
    opacity: 0.9;
}

.btn-primary:hover .nav-icon,
.btn-outline:hover .nav-icon {
    opacity: 1;
}

/* آیکون‌های feature (اگه خواستی) */
.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: block;
    filter: invert(1) sepia(1) saturate(5) hue-rotate(320deg) brightness(1.2);
    opacity: 0.9;
    transition: transform 0.3s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(-5deg);
}

/* ===== بخش احراز هویت در هدر (چپ) ===== */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
}

.nav-auth .nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-auth .btn-outline,
.nav-auth .btn-primary {
    padding: 8px 18px;
    font-size: 0.9rem;
}

/* ===== ساختار هدر ===== */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    justify-content: center;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-auth .nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-auth .btn-outline,
.nav-auth .btn-primary {
    padding: 8px 18px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .nav-links {
        gap: 12px;
        font-size: 0.85rem;
        flex: none;
    }
    .nav-container {
        height: 60px;
        gap: 12px;
    }
}

/* ===== ساختار هدر ===== */
.nav-container {
    display: flex;
    align-items: center;
    height: 72px;
    gap: 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-right: 32px;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.nav-auth .nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-auth .btn-outline,
.nav-auth .btn-primary {
    padding: 8px 18px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .nav-links {
        gap: 12px;
        font-size: 0.85rem;
        margin-right: 16px;
    }
    .nav-container {
        height: 60px;
        gap: 12px;
    }
}

/* ===== ساختار هدر ===== */
.nav-container {
    display: flex;
    align-items: center;
    height: 72px;
    gap: 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
}

.nav-auth .nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-auth .btn-outline,
.nav-auth .btn-primary {
    padding: 8px 18px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .nav-links {
        gap: 12px;
        font-size: 0.85rem;
    }
    .nav-container {
        height: 60px;
        gap: 12px;
    }
}

/* ===== پیام‌های شناور (Toast) ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: calc(100% - 48px);
    max-width: 480px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(26, 5, 5, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
    font-size: 0.95rem;
    pointer-events: auto;
    animation: toastSlideIn 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    animation: toastProgress 5s linear forwards;
    width: 100%;
}

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastProgress {
    0% { width: 100%; }
    100% { width: 0%; }
}

@keyframes toastSlideOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
}

.toast.hiding {
    animation: toastSlideOut 0.4s ease-in forwards;
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 0.9rem;
}

.toast-success .toast-icon {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.toast-error .toast-icon,
.toast-danger .toast-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.toast-warning .toast-icon {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.toast-info .toast-icon {
    background: rgba(193, 39, 45, 0.2);
    color: var(--accent);
}

.toast-success::before { background: #22c55e; }
.toast-error::before,
.toast-danger::before { background: #ef4444; }
.toast-warning::before { background: #f59e0b; }
.toast-info::before { background: var(--accent); }

.toast-text {
    flex: 1;
    line-height: 1.5;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .toast-container {
        bottom: 16px;
        width: calc(100% - 32px);
    }
    .toast {
        padding: 12px 14px;
        font-size: 0.85rem;
    }
}

/* ===== ساختار نهایی هدر ===== */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    justify-content: center;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-auth .nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-auth .btn-outline,
.nav-auth .btn-primary {
    padding: 8px 18px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .nav-links {
        gap: 12px;
        font-size: 0.85rem;
        flex: none;
    }
    .nav-container {
        height: 60px;
        gap: 12px;
    }
}

/* ===== هدر شیشه‌ای و شناور روی هیرو ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 6, 6, 0.4); /* پس‌زمینه بسیار شفاف */
    backdrop-filter: blur(12px); /* افکت شیشه‌ای */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(193, 39, 45, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

/* وقتی اسکرول می‌شود، هدر کمی تیره‌تر می‌شود تا خوانایی بهتر شود */
.navbar.scrolled {
    background: rgba(13, 6, 6, 0.9);
}

/* چون هدر fixed شده، هیرو باید از زیر آن شروع شود */
.hero {
    margin-top: 0 !important;
    padding-top: 0 !important;
    min-height: 100vh !important;
}

/* تنظیم لایه‌ها */
.hero-bg {
    z-index: -1;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    justify-content: center;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== کم کردن عرض هدر ===== */
.navbar {
    top: 16px !important; /* فاصله از بالا */
    left: 24px !important; /* فاصله از چپ */
    right: 24px !important; /* فاصله از راست */
    border-radius: 16px !important; /* گوشه‌های گرد */
    border: 1px solid rgba(193, 39, 45, 0.2) !important;
    padding: 0 16px; /* فاصله داخلی */
}

/* تنظیم ارتفاع کانتینر برای هماهنگی با هدر شناور */
.nav-container {
    height: 64px !important; 
}

/* در موبایل فاصله‌ها کمتر بشه که هدر بزرگ نشه */
@media (max-width: 768px) {
    .navbar {
        top: 8px !important;
        left: 12px !important;
        right: 12px !important;
        padding: 0 12px;
    }
    .nav-container {
        height: 56px !important;
    }
}

/* ===== اصلاح فاصله بالای هدر ===== */
.navbar {
    top: 0 !important; /* چسبیدن به بالای صفحه */
    left: 24px !important;
    right: 24px !important;
    border-top-left-radius: 0 !important; /* چون به بالا چسبیده، گوشه‌های بالا گرد نباشن */
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
    border-top: none !important; /* خط بالای هدر حذف بشه */
}

@media (max-width: 768px) {
    .navbar {
        top: 0 !important;
        left: 12px !important;
        right: 12px !important;
    }
}

/* ===== چسباندن هیرو به بالای صفحه ===== */
.hero {
    position: relative !important;
    top: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    height: 100vh !important;
    min-height: 100vh !important;
    width: 100% !important;
}

.hero-bg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: -1 !important;
}

.hero-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* ===== حذف فاصله کانتینر داخل هدر ===== */
.navbar .nav-container {
    max-width: 100% !important;
    padding-left: 16px !important;  /* فقط یه فاصله خیلی کم برای زیبایی */
    padding-right: 16px !important;
    width: 100% !important;
    margin: 0 !important;
}

/* مطمئن بشیم دکمه‌های سمت چپ به لبه می‌چسبن */
.nav-auth {
    margin-right: auto !important; /* هول دادن به سمت چپ در حالت RTL */
    padding-right: 0 !important;
}

/* ===== آیکون‌های SVG در ویژگی‌ها و پروفایل ===== */
.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: block;
    filter: invert(1) sepia(1) saturate(5) hue-rotate(320deg) brightness(1.2);
    opacity: 0.9;
    transition: transform 0.3s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(-5deg);
}

.stat-icon-svg {
    width: 32px;
    height: 32px;
    filter: invert(1) sepia(1) saturate(5) hue-rotate(320deg) brightness(1.2);
    opacity: 0.9;
}

.team-icon-svg {
    width: 32px;
    height: 32px;
    filter: invert(1) sepia(1) saturate(5) hue-rotate(320deg) brightness(1.2);
}

.empty-icon-svg {
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto 12px;
    filter: invert(1);
    opacity: 0.5;
}

/* ===== صفحه تیم ===== */
.team-page {
    padding: 40px 24px 60px;
    max-width: 1000px;
    margin: 0 auto;
}

/* هدر تیم */
.team-hero {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 32px;
}

.team-hero-bg {
    height: 100px;
    background: linear-gradient(135deg, #5a0000 0%, #c1272d 50%, #1a0e0e 100%);
}

.team-hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 32px 24px;
    margin-top: -32px;
    position: relative;
}

.team-hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--bg-secondary);
    border: 3px solid var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.team-hero-icon img {
    width: 40px;
    height: 40px;
    filter: invert(1) sepia(1) saturate(5) hue-rotate(320deg) brightness(1.2);
}

.team-hero-info h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.team-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* کد دعوت */
.team-invite-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
}

.team-invite-section h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.team-invite-section .muted {
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.invite-code-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border: 2px dashed var(--accent);
    border-radius: 12px;
    padding: 16px;
}

.invite-code-box code {
    flex: 1;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--accent);
    background: transparent;
    text-align: center;
}

/* اعضای تیم */
.team-members-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
}

.team-members-section h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.member-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    position: relative;
    transition: all 0.2s;
}

.member-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.member-card.captain {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), var(--bg-secondary));
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.member-info h3 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.member-info .muted {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.member-score {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

.captain-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 1.2rem;
}

/* دکمه‌های تیم */
.team-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* حالت بدون تیم */
.team-no-team {
    text-align: center;
    padding: 40px 20px;
}

.team-empty-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.team-empty-icon img {
    width: 48px;
    height: 48px;
    filter: invert(1);
    opacity: 0.5;
}

.team-no-team h1 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.team-no-team .muted {
    margin-bottom: 32px;
    font-size: 1rem;
}

.team-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
    text-align: right;
}

.team-option-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
}

.team-option-card h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.team-option-card .muted {
    margin-bottom: 20px;
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .team-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0 20px 24px;
    }
    .team-hero-tags {
        justify-content: center;
    }
    .team-options {
        grid-template-columns: 1fr;
    }
}

/* ===== آیکون‌های درون‌خطی ===== */
.inline-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-left: 4px;
    filter: invert(1);
    opacity: 0.9;
}

.inline-icon-lg {
    display: inline-block;
    width: 24px;
    height: 24px;
    vertical-align: middle;
    filter: invert(1) sepia(1) saturate(5) hue-rotate(320deg) brightness(1.2);
}

/* ===== فونت اختصاصی ===== */
@font-face {
    font-family: 'Incorrigible';
    src: url('../fonts/IncorrigibleRegular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* ===== کارت Arcade Room ===== */
.arcade-room-card {
    position: relative;
    background: #050000;
    border: 2px solid var(--accent);
    border-radius: 24px;
    padding: 60px 20px;
    text-align: center;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 0 30px rgba(193, 39, 45, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* خطوط اسکن (Scanlines) */
.arcade-room-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.3) 50%
    );
    background-size: 100% 4px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
}

/* افکت گلیچ و درخشش متن */
.arcade-room-text {
    font-family: 'Incorrigible', monospace;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: normal;
    color: #fff;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    letter-spacing: 4px;
    text-shadow: 
        0 0 10px rgba(230, 57, 70, 0.8),
        0 0 20px rgba(230, 57, 70, 0.5),
        0 0 40px rgba(230, 57, 70, 0.3);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

/* لایه‌های گلیچ (شبیه‌سازی شیفت رنگ) */
.arcade-room-text::before,
.arcade-room-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050000;
    overflow: hidden;
    z-index: -1;
}

.arcade-room-text::before {
    left: 3px;
    text-shadow: -2px 0 red;
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.arcade-room-text::after {
    left: -3px;
    text-shadow: -2px 0 cyan;
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

/* انیمیشن‌های گلیچ */
@keyframes glitch-anim {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 2px) }
    40% { transform: translate(-2px, -2px) }
    60% { transform: translate(2px, 2px) }
    80% { transform: translate(2px, -2px) }
    100% { transform: translate(0) }
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 80% 0); }
    20% { clip-path: inset(60% 0 10% 0); }
    40% { clip-path: inset(40% 0 50% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(10% 0 70% 0); }
    100% { clip-path: inset(30% 0 50% 0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(10% 0 60% 0); }
    20% { clip-path: inset(30% 0 20% 0); }
    40% { clip-path: inset(70% 0 10% 0); }
    60% { clip-path: inset(20% 0 50% 0); }
    80% { clip-path: inset(50% 0 30% 0); }
    100% { clip-path: inset(5% 0 80% 0); }
}

/* ===== لوگوی گلیچ هدر (سیموریا) ===== */
.glitch-logo {
    font-family: 'Incorrigible', monospace;
    font-size: 1.8rem; /* بزرگ‌تر از حالت عادی */
    color: #fff;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    letter-spacing: 2px;
    text-shadow: 
        0 0 10px rgba(230, 57, 70, 0.8),
        0 0 20px rgba(230, 57, 70, 0.5);
    animation: glitch-logo-anim 3s infinite linear alternate-reverse;
}

.glitch-logo::before,
.glitch-logo::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a0505; /* رنگ پس‌زمینه هدر برای پوشاندن متن زیرین */
    overflow: hidden;
    z-index: -1;
}

.glitch-logo::before {
    left: 2px;
    text-shadow: -2px 0 red;
    animation: glitch-logo-anim-1 2s infinite linear alternate-reverse;
}

.glitch-logo::after {
    left: -2px;
    text-shadow: 2px 0 cyan;
    animation: glitch-logo-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-logo-anim {
    0% { transform: translate(0) }
    20% { transform: translate(-1px, 1px) }
    40% { transform: translate(-1px, -1px) }
    60% { transform: translate(1px, 1px) }
    80% { transform: translate(1px, -1px) }
    100% { transform: translate(0) }
}

@keyframes glitch-logo-anim-1 {
    0% { clip-path: inset(20% 0 80% 0); }
    20% { clip-path: inset(60% 0 10% 0); }
    40% { clip-path: inset(40% 0 50% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(10% 0 70% 0); }
    100% { clip-path: inset(30% 0 50% 0); }
}

@keyframes glitch-logo-anim-2 {
    0% { clip-path: inset(10% 0 60% 0); }
    20% { clip-path: inset(30% 0 20% 0); }
    40% { clip-path: inset(70% 0 10% 0); }
    60% { clip-path: inset(20% 0 50% 0); }
    80% { clip-path: inset(50% 0 30% 0); }
    100% { clip-path: inset(5% 0 80% 0); }
}

/* ===== فونت اصلی بدنه (لیانا) ===== */
@font-face {
    font-family: 'Liana';
    src: url('../fonts/Liana-soft-Black.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* تغییر فونت اصلی کل سایت */
body {
    font-family: 'Liana', 'Vazirmatn', Tahoma, sans-serif !important;
}

/* تغییر فونت همه دکمه‌ها و فرم‌ها */
button, input, select, textarea, .btn-primary, .btn-outline, .btn, .form-control {
    font-family: 'Liana', 'Vazirmatn', Tahoma, sans-serif !important;
}

/* ===== فونت اصلی بدنه (لیانا) ===== */
@font-face {
    font-family: 'Liana';
    src: url('../fonts/Liana-soft-Black.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* تغییر فونت اصلی کل سایت */
body {
    font-family: 'Liana', 'Vazirmatn', Tahoma, sans-serif !important;
}

/* تغییر فونت همه دکمه‌ها و فرم‌ها */
button, input, select, textarea, .btn-primary, .btn-outline, .btn, .form-control {
    font-family: 'Liana', 'Vazirmatn', Tahoma, sans-serif !important;
}

/* تبلت و موبایل */
@media (max-width: 992px) {
    /* هدر */
    .nav-container {
        gap: 12px;
    }
    .nav-links {
        gap: 12px;
    }
    .nav-links a {
        font-size: 0.9rem;
    }
    .nav-auth {
        gap: 8px;
    }
    .nav-auth .nav-item span {
        display: none; /* مخفی کردن متن دکمه‌های ورود/ثبت‌نام در تبلت */
    }
    .nav-auth .btn-outline,
    .nav-auth .btn-primary {
        padding: 8px 12px;
    }
    
    /* کارت Arcade Room */
    .arcade-room-text {
        font-size: clamp(2rem, 6vw, 4rem);
    }
}

/* موبایل */
@media (max-width: 768px) {
    /* هدر */
    .nav-container {
        height: 60px;
    }
    .logo {
        font-size: 1.2rem;
    }
    .glitch-logo {
        font-size: 1.4rem;
    }
    .nav-links {
        display: none; /* مخفی کردن منوی وسط در موبایل */
    }
    .nav-auth .nav-item span {
        display: none;
    }
    
    /* هیرو */
    .hero {
        min-height: calc(100vh - 60px) !important;
    }
    
    /* بخش ویژگی‌ها */
    .features-grid {
        grid-template-columns: 1fr;
    }
    .features-header h2 {
        font-size: 1.8rem;
    }
    
    /* آمار */
    .stats-row {
        flex-direction: column;
        gap: 24px;
    }
    
    /* کارت‌های بازی */
    .games-grid {
        grid-template-columns: 1fr; /* یک ستون در موبایل */
    }
    
    /* پروفایل */
    .profile-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-tags {
        justify-content: center;
    }
    .profile-avatar-lg {
        width: 96px;
        height: 96px;
        font-size: 2rem;
    }
    
    /* تیم */
    .team-options {
        grid-template-columns: 1fr;
    }
    .team-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .team-hero-tags {
        justify-content: center;
    }
    .invite-code-box {
        flex-direction: column;
        gap: 16px;
    }
    .invite-code-box code {
        font-size: 1.2rem;
    }
    
    /* صفحه بازی */
    .play-page {
        padding: 16px;
    }
    .game-frame-wrapper {
        height: 60vh;
        min-height: 400px;
    }
    
    /* فرم‌ها */
    .form-row {
        grid-template-columns: 1fr;
    }
    .auth-card {
        padding: 24px;
    }
    
    /* فوتر */
    .footer {
        padding: 16px 0;
        font-size: 0.8rem;
    }
}

/* موبایل کوچک */
@media (max-width: 480px) {
    .arcade-room-text {
        font-size: 2rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .profile-actions {
        flex-direction: column;
    }
    .profile-actions a {
        width: 100%;
        text-align: center;
    }
}

/* ===== منوی موبایل ===== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #0d0606;
    border-left: 1px solid #3a1a1a;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #3a1a1a;
}

.mobile-menu-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e8dcdc;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: #a89090;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.mobile-menu-close:hover {
    color: #c1272d;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    color: #a89090;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(58, 26, 26, 0.3);
}

.mobile-menu-item:hover {
    background: #1a0e0e;
    color: #e8dcdc;
    padding-right: 32px;
}

.mobile-menu-item .nav-icon {
    width: 20px;
    height: 20px;
    filter: invert(1);
    opacity: 0.7;
}

.mobile-menu-item:hover .nav-icon {
    opacity: 1;
}

/* ===== فعال کردن همبرگری در موبایل ===== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    .nav-links {
        display: none !important;
    }
    .nav-auth {
        display: none !important;
    }
}

/* ==================== هدر ==================== */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 16px;
}

/* منوی وسط (دسکتاپ) */
.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    justify-content: center;
}

/* دکمه‌های احراز هویت (چپ) */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* دکمه همبرگری (مخفی در دسکتاپ) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #e8dcdc;
    border-radius: 2px;
    transition: 0.3s;
}

/* ==================== منوی موبایل ==================== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #0d0606;
    border-left: 1px solid #3a1a1a;
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.8);
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #3a1a1a;
}

.mobile-menu-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e8dcdc;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: #a89090;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    color: #a89090;
    text-decoration: none;
    border-bottom: 1px solid rgba(58, 26, 26, 0.3);
    transition: 0.2s;
}

.mobile-menu-item:hover {
    background: #1a0e0e;
    color: #e8dcdc;
}

.mobile-menu-item .nav-icon {
    width: 20px;
    height: 20px;
    filter: invert(1);
}

/* ==================== حالت موبایل (زیر ۷۶۸px) ==================== */
@media (max-width: 768px) {
    /* مخفی کردن منو و دکمه‌های دسکتاپ */
    .nav-links {
        display: none !important;
    }
    .nav-auth {
        display: none !important;
    }
    /* نمایش دکمه همبرگری */
    .hamburger {
        display: flex;
    }
    /* تنظیم ارتفاع هدر */
    .nav-container {
        height: 60px;
    }
    /* کوچیک کردن لوگو */
    .glitch-logo {
        font-size: 1.4rem;
    }
    .hero {
        min-height: calc(100vh - 60px) !important;
    }
}
/* ==================== اصلاح قطعی هدر و موبایل ==================== */
/* این بخش با !important نوشته شده تا هیچ استایل دیگه‌ای نتونه خرابش کنه */

.nav-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 72px !important;
    gap: 16px !important;
}

.nav-links {
    display: flex !important;
    align-items: center !important;
    gap: 24px !important;
    flex: 1 !important;
    justify-content: center !important;
}

.nav-auth {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* ==================== دکمه همبرگری ==================== */
.hamburger {
    display: none !important; /* مخفی در دسکتاپ */
    flex-direction: column !important;
    gap: 5px !important;
    background: transparent !important;
    border: 2px solid #c1272d !important; /* حاشیه قرمز برای دیده شدن */
    border-radius: 8px !important;
    cursor: pointer !important;
    padding: 6px 8px !important;
    z-index: 1001 !important;
}

.hamburger span {
    display: block !important;
    width: 24px !important;
    height: 2px !important;
    background: #c1272d !important; /* خطوط قرمز */
    border-radius: 2px !important;
    transition: 0.3s !important;
}

/* ==================== حالت موبایل ==================== */
@media (max-width: 768px) {
    .nav-links, .nav-auth {
        display: none !important; /* مخفی کردن منو در موبایل */
    }
    
    .hamburger {
        display: flex !important; /* نمایش همبرگری در موبایل */
    }
    
    .nav-container {
        height: 60px !important;
    }
    
    .glitch-logo {
        font-size: 1.4rem !important;
    }
}

/* ==================== منوی موبایل ==================== */
.mobile-menu {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 280px !important;
    height: 100vh !important;
    background: #0d0606 !important;
    border-left: 1px solid #3a1a1a !important;
    z-index: 9999 !important;
    transition: right 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: -10px 0 30px rgba(0,0,0,0.8) !important;
}

.mobile-menu.open {
    right: 0 !important;
}

.mobile-menu-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px !important;
    border-bottom: 1px solid #3a1a1a !important;
}

.mobile-menu-title {
    font-size: 1.2rem !important;
    font-weight: bold !important;
    color: #e8dcdc !important;
}

.mobile-menu-close {
    background: transparent !important;
    border: none !important;
    color: #a89090 !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
}

.mobile-menu-links {
    display: flex !important;
    flex-direction: column !important;
    padding: 16px 0 !important;
}

.mobile-menu-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px 24px !important;
    color: #a89090 !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(58, 26, 26, 0.3) !important;
    transition: 0.2s !important;
}

.mobile-menu-item:hover {
    background: #1a0e0e !important;
    color: #e8dcdc !important;
}

.mobile-menu-item .nav-icon {
    width: 20px !important;
    height: 20px !important;
    filter: invert(1) !important;
}

/* ==================== دکمه همبرگری ساده ==================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px; /* فاصله بین خطوط */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background-color: #e8dcdc; /* رنگ سفید/کرم */
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* انیمیشن تبدیل به ضربدر (اختیاری) */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* نمایش همبرگری فقط در موبایل */
@media (max-width: 768px) {
    .hamburger {
        display: flex !important;
    }
}

/* ==================== دکمه همبرگری ساده ==================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    box-shadow: none !important;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background-color: #e8dcdc !important;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* انیمیشن تبدیل به ضربدر وقتی منو بازه */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* نمایش فقط در موبایل */
@media (max-width: 768px) {
    .hamburger {
        display: flex !important;
    }
}

/* ===== فوتر جدید ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: 60px;
    color: var(--text-secondary);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.footer-brand {
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.footer-logo .logo-icon {
    width: 24px;
    height: 24px;
    filter: invert(1) sepia(1) saturate(5) hue-rotate(320deg) brightness(1.2);
}

.footer-logo .glitch-logo {
    font-size: 1.5rem;
}

.footer-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.footer-credits {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid rgba(58, 26, 26, 0.5);
    border-bottom: 1px solid rgba(58, 26, 26, 0.5);
}

.footer-credits p {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.footer-org {
    font-weight: bold;
    color: var(--text-primary);
    font-size: 1.1rem !important;
}

.footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
    .footer-brand {
        text-align: right;
        flex: 1;
        min-width: 200px;
    }
    .footer-credits {
        text-align: center;
        border: none;
        padding: 0;
        flex: 1;
        min-width: 200px;
    }
    .footer-bottom {
        width: 100%;
        margin-top: 24px;
        padding-top: 24px;
        border-top: 1px solid rgba(58, 26, 26, 0.5);
    }
}

/* ===== فوتر کامل ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 24px;
    margin-top: 60px;
    color: var(--text-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr; /* ستون برند بزرگ‌تر */
    }
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo .logo-icon {
    width: 28px;
    height: 28px;
    filter: invert(1) sepia(1) saturate(5) hue-rotate(320deg) brightness(1.2);
}

.footer-logo .glitch-logo {
    font-size: 1.8rem;
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 16px;
    display: block;
}



.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(-5px); /* حرکت به سمت راست در حالت RTL */
}

/* شبکه‌های اجتماعی */
.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.2s;
}

.social-link img {
    width: 20px;
    height: 20px;
    filter: invert(1);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.social-link:hover img {
    opacity: 1;
}

/* بخش پایین */
.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid rgba(58, 26, 26, 0.5);
    font-size: 0.9rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: right;
    }
}

.footer-credits strong {
    color: var(--text-primary);
}

.footer-copyright {
    opacity: 0.7;
}

/* ==================== فوتر (چیدمان ستونی) ==================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 24px;
    margin-top: 60px;
    color: var(--text-secondary);
}

/* چیدمان اصلی فوتر */
.footer-grid {
    display: flex !important;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 40px;
}

/* در حالت دسکتاپ (عرض بیشتر از ۷۶۸px) ۳ ستون بشه */
@media (min-width: 768px) {
    .footer-grid {
        display: grid !important;
        grid-template-columns: 2fr 1fr 1fr !important;
        gap: 40px !important;
    }
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* بخش برند */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo .logo-icon {
    width: 28px;
    height: 28px;
    filter: invert(1) sepia(1) saturate(5) hue-rotate(320deg) brightness(1.2);
}

.footer-logo .glitch-logo {
    font-size: 1.8rem;
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* عنوان ستون‌ها */
.footer-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 16px;
    display: block;
}



/* لینک‌های دسترسی سریع */
.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(-5px);
}

/* شبکه‌های اجتماعی */
.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.2s;
}

.social-link img {
    width: 20px;
    height: 20px;
    filter: invert(1);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.social-link:hover img {
    opacity: 1;
}

/* بخش پایین فوتر */
.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid rgba(58, 26, 26, 0.5);
    font-size: 0.9rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: right;
    }
}

.footer-credits strong {
    color: var(--text-primary);
}

.footer-copyright {
    opacity: 0.7;
}

/* ==================== فوتر (اصلاح‌شده) ==================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 24px;
    margin-top: 60px;
    color: var(--text-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* عنوان ستون‌ها و خط زیرش */
.footer-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 16px;
    display: block;
}



/* لینک‌ها */
.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
    padding-right: 5px; /* حرکت نرم به سمت راست */
}

/* شبکه‌های اجتماعی */
.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.2s;
}

.social-link img {
    width: 20px;
    height: 20px;
    filter: invert(1);
    opacity: 0.7;
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.social-link:hover img {
    opacity: 1;
}

/* بخش پایین */
.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid rgba(58, 26, 26, 0.5);
    font-size: 0.9rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: right;
    }
}

.footer-credits strong {
    color: var(--text-primary);
}

.footer-copyright {
    opacity: 0.7;
}

/* ==================== عنوان‌های فوتر و خط زیرین ==================== */
.footer-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: bold;
    margin-bottom: 16px;
    display: block;
}




