/* Reset & base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0e17;
    color: #e0e6f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

/* هدر */
header {
    text-align: center;
    padding: 2rem 0 1rem;
    border-bottom: 1px solid #1f2a3a;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f0c27f, #fc5c7d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

header p {
    font-size: 1.1rem;
    color: #8a9bb5;
    margin-top: 0.5rem;
    font-weight: 300;
}

/* کانتینر اصلی */
.container {
    width: 100%;
    max-width: 1200px;
    flex: 1;
}

/* گرید کارت‌ها */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0.5rem;
}

/* کارت بازی */
.game-card {
    background: #141c2b;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #1f2a3a;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(252, 92, 125, 0.2);
    border-color: #fc5c7d;
}

/* تصویر کاور */
.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #0f1724;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.game-card:hover .card-image img {
    transform: scale(1.05);
}

/* بدنه کارت */
.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #f0f4fa;
}

.card-body .category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fc5c7d;
    background: rgba(252, 92, 125, 0.15);
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    margin-bottom: 0.8rem;
    align-self: flex-start;
}

.card-body .description {
    font-size: 0.9rem;
    color: #b0c0d8;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1.2rem;
}

/* دکمه Play */
.play-btn {
    display: inline-block;
    background: linear-gradient(135deg, #fc5c7d, #f0c27f);
    color: #0a0e17;
    font-weight: 700;
    text-align: center;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    align-self: flex-start;
    border: none;
    cursor: pointer;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(252, 92, 125, 0.5);
    background: linear-gradient(135deg, #f0c27f, #fc5c7d);
}

/* حالت بدون بازی */
.no-game {
    text-align: center;
    padding: 4rem 2rem;
    background: #141c2b;
    border-radius: 20px;
    border: 1px dashed #2a3a4a;
    color: #8a9bb5;
}

.no-game code {
    background: #1f2a3a;
    padding: 0.2rem 0.8rem;
    border-radius: 8px;
    color: #f0c27f;
}

/* فوتر */
footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid #1f2a3a;
    width: 100%;
    max-width: 1200px;
    text-align: center;
    color: #5a6f8a;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }

    .card-image {
        height: 160px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .card-body h2 {
        font-size: 1.2rem;
    }

    .play-btn {
        width: 100%;
        text-align: center;
    }
}
