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

body {
    font-family: 'Poppins', sans-serif;
    background: #0f0f1a;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 20% 50%, rgba(120, 40, 200, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(255, 80, 80, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(0, 180, 255, 0.06) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px;
    position: relative;
    z-index: 1;
}

/* ========== Header ========== */

header {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px 0 12px;
}

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

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b6b, #ffa726, #ffeb3b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
}

.status-dot.subscribed {
    background: #4ecb71;
    box-shadow: 0 0 8px rgba(78, 203, 113, 0.6);
}

.status-dot.unsubscribed {
    background: #ff5252;
    box-shadow: 0 0 8px rgba(255, 82, 82, 0.4);
}

.main-title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    color: #fff;
}

.subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

/* ========== Categories ========== */

.categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.cat-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.cat-btn.active {
    background: linear-gradient(135deg, #ff6b6b, #ff8a65);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

/* ========== Games Grid ========== */

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.game-card {
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 20px 14px 16px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

.card-glow {
    position: absolute;
    top: -40%;
    left: -20%;
    width: 140%;
    height: 80%;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.game-card:hover .card-glow {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.game-card:active {
    transform: translateY(-2px) scale(0.98);
}

.game-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    overflow: hidden;
}

.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.game-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.game-category {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
}

.play-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    padding: 7px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    margin-top: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.play-icon {
    font-size: 0.65rem;
}

.game-card:hover .play-button {
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ========== Subscribe Banner ========== */

.subscribe-banner {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.12), rgba(255, 138, 101, 0.12));
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.banner-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.banner-text {
    flex: 1;
}

.banner-text h3 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.banner-text p {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.banner-btn {
    flex-shrink: 0;
    background: linear-gradient(135deg, #ff6b6b, #ff8a65);
    color: #fff;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.banner-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

/* ========== Footer ========== */

footer {
    text-align: center;
    padding: 20px 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-sub {
    margin-top: 4px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.2);
}

/* ========== Modal ========== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal {
    background: linear-gradient(160deg, #1a1a2e 0%, #16162a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 36px 28px 28px;
    text-align: center;
    max-width: 340px;
    width: 100%;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
}

.modal h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
}

.modal-price {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.modal-price span {
    font-size: 1rem;
    font-weight: 600;
}

.modal-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #ff6b6b, #ff8a65);
    color: #fff;
    padding: 14px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    margin-bottom: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.modal-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 24px rgba(255, 107, 107, 0.4);
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    padding: 8px;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ========== Responsive ========== */

@media (min-width: 540px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .container {
        padding: 24px;
    }

    .main-title {
        font-size: 2rem;
    }

    .games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    .game-icon {
        width: 80px;
        height: 80px;
    }
}

@media (min-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 400px) {
    .banner-content {
        flex-direction: column;
        text-align: center;
    }

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

    .header-top {
        flex-direction: column;
        gap: 8px;
    }
}
