/* ============================================= */
/* متغیرها */
/* ============================================= */
:root {
    --primary-color: #dc3545;
    --primary-dark: #c82333;
    --primary-light: #f8d7da;
    --primary-gradient: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    
    --gold-color: #ffc107;
    --gold-dark: #e0a800;
    
    --success-color: #28a745;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --gray: #e9ecef;
    --dark-gray: #495057;
    --black: #212529;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --shadow-xl: 0 15px 40px rgba(0,0,0,0.2);
    --shadow-primary: 0 4px 15px rgba(220, 53, 69, 0.3);
    
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
    
    --font-family: 'Vazirmatn', sans-serif;
    
    --transition: all 0.3s ease;
}

/* ============================================= */
/* ریست و تنظیمات پایه */
/* ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================= */
/* ذرات شناور (Floating Particles) */
/* ============================================= */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: floatParticle linear infinite;
}

.particle.red {
    background: radial-gradient(circle, rgba(220, 53, 69, 0.8) 0%, rgba(220, 53, 69, 0) 70%);
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.5);
}

.particle.gold {
    background: radial-gradient(circle, rgba(255, 193, 7, 0.8) 0%, rgba(255, 193, 7, 0) 70%);
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
}

.particle.white {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================= */
/* دکمه بازگشت ثابت */
/* ============================================= */
.back-btn-fixed {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 100;
    transition: var(--transition);
}

.back-btn-fixed:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.back-btn-fixed i {
    font-size: 1rem;
}

/* ============================================= */
/* بنر پوستر (Hero Banner) */
/* ============================================= */
.hero-banner {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    z-index: 1;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 46, 0.3) 0%,
        rgba(26, 26, 46, 0.5) 50%,
        rgba(26, 26, 46, 0.95) 100%
    );
    z-index: 1;
}

.banner-content {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 2;
    width: 100%;
    padding: 0 20px;
}

.banner-content h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #fff 0%, #ffc107 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.banner-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    background: var(--primary-gradient);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-primary);
}

/* ============================================= */
/* فیلتر بازی‌ها */
/* ============================================= */
.filter-section {
    position: relative;
    z-index: 2;
    margin-top: 30px;  /* تغییر از -30px به 30px */
    margin-bottom: 40px;
    padding-top: 20px; /* فاصله اضافی از بالا */
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: var(--border-radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 550px;
    margin: 0 auto;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: var(--border-radius-lg);
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: var(--transition);
}

.filter-tab:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.filter-tab.active {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: var(--shadow-primary);
}

.filter-count {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.75rem;
}

.filter-tab.active .filter-count {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================= */
/* بخش بازی‌ها */
/* ============================================= */
.games-section {
    position: relative;
    z-index: 1;
    padding-bottom: 60px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

/* ============================================= */
/* کارت بازی */
/* ============================================= */
.game-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: rgba(220, 53, 69, 0.5);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(220, 53, 69, 0.2);
}

/* بج نوع بازی */
.game-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 3;
    backdrop-filter: blur(10px);
}

.game-badge.individual {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.9), rgba(23, 162, 184, 0.7));
    color: var(--white);
}

.game-badge.team {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.9), rgba(40, 167, 69, 0.7));
    color: var(--white);
}

/* پوستر بازی */
.game-poster {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .poster-image {
    transform: scale(1.1);
}

.poster-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(26, 26, 46, 0.8) 100%
    );
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.poster-overlay i {
    font-size: 50px;
    color: var(--white);
    text-shadow: 0 0 30px rgba(220, 53, 69, 0.8);
    transform: scale(0.5);
    transition: var(--transition);
}

.game-card:hover .poster-overlay {
    opacity: 1;
}

.game-card:hover .poster-overlay i {
    transform: scale(1);
}

/* محتوای کارت */
.game-content {
    padding: 25px;
    flex-grow: 1;
}

.game-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 8px;
}

.game-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    line-height: 1.6;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.game-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.price-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.price-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold-color);
}

.price-unit {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

/* نوار ظرفیت */
.game-capacity {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.capacity-bar {
    width: 60px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.capacity-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.game-capacity span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

/* مهلت ثبت‌نام */
.game-deadline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    color: var(--gold-color);
}

.game-deadline i {
    font-size: 1rem;
}

/* دکمه مشاهده جزئیات */
.game-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 18px;
    background: var(--primary-gradient);
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.game-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.game-btn:hover::before {
    left: 100%;
}

.game-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71d2a 100%);
}

.game-btn i {
    transition: transform 0.3s ease;
}

.game-btn:hover i {
    transform: translateX(-5px);
}

/* ============================================= */
/* فوتر */
/* ============================================= */
.page-footer {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 0;
    position: relative;
    z-index: 1;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    font-size: 24px;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-social a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-gradient);
    transform: translateY(-3px);
}

/* ============================================= */
/* انیمیشن ظاهر شدن کارت‌ها */
/* ============================================= */
.game-card {
    opacity: 0;
    transform: translateY(30px);
    animation: cardAppear 0.6s ease forwards;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }
.game-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================= */
/* ریسپانسیو */
/* ============================================= */
@media (max-width: 992px) {
    .hero-banner {
        height: 300px;
    }
    
    .banner-content h1 {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero-banner {
        height: 250px;
    }
    
    .banner-content h1 {
        font-size: 1.6rem;
    }
    
    .banner-content p {
        font-size: 0.95rem;
    }
    
    .banner-badge {
        font-size: 0.8rem;
        padding: 8px 18px;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
        max-width: 100%;
    }
    
    .filter-tab {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .back-btn-fixed {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .back-btn-fixed span {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        height: 200px;
    }
    
    .banner-content {
        bottom: 20px;
    }
    
    .banner-content h1 {
        font-size: 1.3rem;
    }
    
    .game-poster {
        height: 160px;
    }
    
    .game-content {
        padding: 20px;
    }
    
    .game-title {
        font-size: 1.2rem;
    }
    
    .game-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .game-capacity {
        width: 100%;
    }
    
    .capacity-bar {
        flex-grow: 1;
    }
}