/* =====================================================================
   GameAcc - Stylesheet Kustom
   Tailwind menangani sebagian besar layout; file ini hanya berisi
   hal-hal yang tidak praktis ditulis sebagai utility class.
   ===================================================================== */

:root {
    --brand-bg: #050b1a;
    --brand-card: #0b1730;
    --brand-border: #1c3157;
    --brand-accent: #2f7bf5;
    --brand-accent-hover: #1d5fd6;
    --brand-success: #10b981;
    --brand-danger: #ef4444;
    --brand-muted: #8fa3c4;
}

html {
    overflow-x: clip;
    scroll-behavior: smooth;
    scroll-padding-top: 5rem; /* offset navbar sticky saat lompat ke anchor */
}

body {
    overflow-x: clip;
    font-family: 'Inter', sans-serif;
    background-color: var(--brand-bg);
    color: #f8fafc;
}

body.modal-open {
    overflow: hidden;
}

/* --- Scrollbar tema gelap --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--brand-bg); }
::-webkit-scrollbar-thumb { background: var(--brand-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* --- Efek glow di belakang hero --- */
.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(47, 123, 245, 0.15) 0%, rgba(5, 11, 26, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

/* --- Grid halus sebagai tekstur latar --- */
.bg-grid {
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

/* --- Animasi reveal saat scroll --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* Hormati preferensi pengguna yang menonaktifkan animasi */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Kartu produk --- */
.product-card {
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px -18px rgba(47, 123, 245, 0.35);
}
.product-card.is-sold:hover {
    transform: none;
    box-shadow: none;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Skeleton loading --- */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: #0b1730;
}
.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.12), transparent);
    animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
    100% { transform: translateX(100%); }
}

/* --- Modal --- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
@media (min-width: 640px) {
    .modal { align-items: center; padding: 1.5rem; }
}
.modal.open {
    opacity: 1;
    pointer-events: auto;
}
.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(4px);
}
.modal__panel {
    position: relative;
    width: 100%;
    max-width: 56rem;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--brand-card);
    border: 1px solid var(--brand-border);
    border-radius: 1rem 1rem 0 0;
    transform: translateY(24px);
    transition: transform 0.25s ease;
}
@media (min-width: 640px) {
    .modal__panel { border-radius: 1rem; }
}
.modal.open .modal__panel {
    transform: translateY(0);
}

/* --- Toast --- */
#toast-stack {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: calc(100% - 2rem);
    max-width: 24rem;
    pointer-events: none;
}
@media (min-width: 640px) {
    #toast-stack { left: auto; right: 1.5rem; bottom: 1.5rem; transform: none; }
}
.toast {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--brand-border);
    background: #0b1730;
    color: #f8fafc;
    font-size: 0.875rem;
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.8);
    animation: toast-in 0.25s ease-out;
}
.toast--success { border-color: rgba(16, 185, 129, 0.5); }
.toast--error { border-color: rgba(239, 68, 68, 0.5); }
.toast--info { border-color: rgba(47, 123, 245, 0.5); }
.toast.hide { animation: toast-out 0.25s ease-in forwards; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
    to { opacity: 0; transform: translateY(8px) scale(0.97); }
}

/* --- Tombol wishlist --- */
.wishlist-btn.is-active i { color: var(--brand-danger); }
.wishlist-btn.is-active {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.12);
}

/* --- Stepper checkout --- */
.step-dot {
    width: 1.75rem;
    height: 1.75rem;
    display: grid;
    place-items: center;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid var(--brand-border);
    color: var(--brand-muted);
    background: var(--brand-bg);
    flex-shrink: 0;
}
.step.is-active .step-dot {
    border-color: var(--brand-accent);
    background: var(--brand-accent);
    color: #fff;
}
.step.is-done .step-dot {
    border-color: var(--brand-success);
    background: var(--brand-success);
    color: #fff;
}
.step.is-active .step-label { color: #fff; }

/* --- Kartu opsi (radio) --- */
.option-card {
    position: relative;
    cursor: pointer;
    display: block;
    border: 1px solid var(--brand-border);
    border-radius: 0.75rem;
    padding: 0.875rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.option-card:hover { border-color: rgba(47, 123, 245, 0.5); }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card.is-selected {
    border-color: var(--brand-accent);
    background: rgba(47, 123, 245, 0.08);
}
.option-card .option-check { opacity: 0; transition: opacity 0.2s ease; }
.option-card.is-selected .option-check { opacity: 1; }

/* --- FAQ accordion --- */
.faq-item summary { list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform 0.2s ease; }

/* --- Fokus keyboard yang terlihat jelas (aksesibilitas) --- */
:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Marquee logo game --- */
.marquee-wrap { overflow: hidden; }
.marquee {
    display: flex;
    gap: 3rem;
    width: max-content;
    animation: marquee 28s linear infinite;
}
.marquee-wrap:hover .marquee { animation-play-state: paused; }
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* --- Galeri detail produk --- */
.thumb.is-active {
    border-color: var(--brand-accent);
    opacity: 1;
}
.thumb {
    opacity: 0.6;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}
.thumb:hover { opacity: 1; }

/* --- Lightbox foto akun --- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.lightbox.open { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.94);
}
.lightbox__panel {
    position: relative;
    height: 100%;
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}
.lightbox__panel > * { pointer-events: auto; }
.lightbox__stage {
    position: relative;
    flex: 1;
    min-height: 0;
    display: grid;
    place-items: center;
    touch-action: pan-y;
}
.lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    user-select: none;
    -webkit-user-drag: none;
}
.lb-thumb {
    flex-shrink: 0;
    width: 4.5rem;
    height: 3.25rem;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid var(--brand-border);
    opacity: 0.55;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}
.lb-thumb:hover { opacity: 1; }
.lb-thumb.is-active { border-color: var(--brand-accent); opacity: 1; }

/* ============================ SLIDER BANNER ============================ */
.banner-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.banner-track::-webkit-scrollbar { display: none; }
.banner-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; aspect-ratio: 1280 / 502; min-height: 150px; overflow: hidden; }
.banner-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 2.25rem; height: 2.25rem; border-radius: 999px; display: grid; place-items: center; color: #fff; background: rgba(5,11,26,.55); backdrop-filter: blur(4px); transition: background .2s; }
.banner-arrow:hover { background: #2f7bf5; }
.banner-dot { width: .5rem; height: .5rem; border-radius: 999px; background: rgba(255,255,255,.45); transition: width .25s, background .25s; }
.banner-dot.is-active { width: 1.5rem; background: #fff; }
