/* ==================== GLOBAL.CSS ====================
   DonutBets - Global Shared Styles
   Import ini di semua halaman untuk konsistensi
   ====================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font Inter ke semua KECUALI Font Awesome (fa, fas, far, fab, fal, fad) */
*:not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class*="fa-"]) {
    font-family: 'Inter', sans-serif;
}

/* Pastikan FA icons pakai font mereka sendiri */
.fa, .fas, .far, .fab, .fal, .fad,
[class*=" fa-"], [class^="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free", "Font Awesome 5 Brands" !important;
}

html {
    scroll-behavior: smooth;
}

/* ===== ROOT VARIABLES ===== */
:root {
    --color-primary:        #fbbf24;
    --color-primary-dark:   #f59e0b;
    --color-primary-light:  #fde68a;
    --color-accent:         #f97316;
    --color-bg-deep:        #08080f;
    --color-bg-base:        #0a0a18;
    --color-bg-card:        rgba(255,255,255,0.04);
    --color-bg-card-hover:  rgba(255,255,255,0.07);
    --color-border:         rgba(255,255,255,0.08);
    --color-border-gold:    rgba(251,191,36,0.3);
    --color-text:           #ffffff;
    --color-text-muted:     rgba(255,255,255,0.5);
    --color-text-subtle:    rgba(255,255,255,0.3);
    --color-success:        #22c55e;
    --color-danger:         #ef4444;
    --color-warning:        #f59e0b;
    --color-info:           #3b82f6;
    --radius-sm:            6px;
    --radius-md:            12px;
    --radius-lg:            16px;
    --radius-xl:            24px;
    --radius-full:          9999px;
    --shadow-gold:          0 0 20px rgba(251,191,36,0.3);
    --shadow-card:          0 8px 32px rgba(0,0,0,0.3);
    --transition-fast:      0.15s ease;
    --transition-normal:    0.25s ease;
    --transition-slow:      0.4s ease;
}

/* ===== BACKGROUND MESH (shared) ===== */
body {
    background: var(--color-bg-deep);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    color: var(--color-text);
}

.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-mesh::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 10%, rgba(251,191,36,.09) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 90%, rgba(139,92,246,.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 50% 50%, rgba(59,130,246,.04) 0%, transparent 70%),
        linear-gradient(180deg, #080810 0%, #0a0a18 50%, #08080f 100%);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
::-webkit-scrollbar-thumb {
    background: rgba(251,191,36,0.3);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: rgba(251,191,36,0.5); }

/* ===== SELECTION ===== */
::selection        { background: rgba(251,191,36,0.3); color: #fff; }
::-moz-selection   { background: rgba(251,191,36,0.3); color: #fff; }

/* ===== UTILITY ===== */
.text-gold         { color: var(--color-primary); }
.text-muted        { color: var(--color-text-muted); }
.bg-card           { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.gold-border       { border: 1px solid var(--color-border-gold); }
.gold-glow         { box-shadow: var(--shadow-gold); }
.z-content         { position: relative; z-index: 1; }

/* ===== BUTTON BASE ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(251,191,36,0.4);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-border-gold);
}

.btn-outline:hover {
    background: rgba(251,191,36,0.1);
}

/* ===== TOAST / NOTIFIKASI ===== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s ease;
    max-width: 340px;
    backdrop-filter: blur(10px);
}

.toast-success { background: rgba(34,197,94,0.15);  border: 1px solid rgba(34,197,94,0.3);  color: #4ade80; }
.toast-error   { background: rgba(239,68,68,0.15);  border: 1px solid rgba(239,68,68,0.3);  color: #f87171; }
.toast-warning { background: rgba(251,191,36,0.15); border: 1px solid rgba(251,191,36,0.3); color: #fde68a; }
.toast-info    { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3); color: #93c5fd; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ===== MODAL BASE ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-box {
    background: #12121e;
    border: 1px solid var(--color-border-gold);
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 100%;
    max-width: 480px;
    position: relative;
}

/* ===== LOADING SPINNER ===== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE HELPERS ===== */
@media (max-width: 768px) {
    .modal-box { padding: 24px; }
}

/* ===== GAME CARD POSTER (4:5 ratio) ===== */
.gc-poster {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gc-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.gc-icon-fallback {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
