/* ===== Base ===== */
body {
    background-color: #09090b;
}

/* ===== Grid Background ===== */
.bg-grid {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #09090b; }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #ef4444; }

/* ===== Number Input Spinners ===== */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ===== Glow Effect ===== */
.glow-effect {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(239,68,68,0.5) 0%, rgba(0,0,0,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    filter: blur(40px);
}

/* ===== Modal ===== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 24px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
}
.modal-backdrop.active .modal-content {
    transform: translateY(0) scale(1);
}

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}
.toast.success { border-color: #22c55e40; }
.toast.error { border-color: #ef444440; }
.toast.info { border-color: #3b82f640; }

/* ===== Promo Code Section ===== */
.promo-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.promo-section.open {
    max-height: 100px;
}

/* ===== Mobile Menu ===== */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(9,9,11,0.95);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}

/* ===== Game Card Image Loading ===== */
.game-card img {
    background-color: #27272a;
}

/* ===== Pagination ===== */
.pagination-btn {
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #27272a;
    background: #18181b;
    color: #a1a1aa;
    cursor: pointer;
}
.pagination-btn:hover {
    border-color: #a1a1aa;
    color: #fff;
}
.pagination-btn.active {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

/* ===== Skeleton ===== */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.skeleton {
    background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

/* ===== Search ===== */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 16px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}
.search-results.active {
    display: block;
}
