/* assets/css/style.css */
body {
    font-family: 'Inter', sans-serif;
    background-color: #0f0f12;
    color: #f1f1f1;
    margin: 0;
    padding: 0;
}

header {
    background-color: #1d1d20;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-soft-light {
  color: rgba(255, 255, 255, 0.6);
}
.game-area {
    width: 100%;
    height: auto;
    padding: 1rem;
    background-color: #1d1d20;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

.input-error {
  animation: shake 0.3s ease-in-out;
  border-color: #ff4d4d !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 77, 77, 0.3);
}


.reels {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
    
    user-select: none;        /* Cegah seleksi teks */
    pointer-events: auto; 
    z-index: 1;
}

.reels-overlay {
  background: transparent;
  pointer-events: auto;     /* Overlay blok input */
  z-index: 2;               /* Harus di atas reels */
  cursor: default;
}

.reel {
    flex: 1;
    background-color: #2c2c2f;
    border-radius: 6px;
    height: 400px;
    overflow: hidden;
    border: 2px solid #333;
    position: relative;
}

.symbols-wrapper {
    position: absolute;
    width: 100%;
    animation: spin 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes spin {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(0);
    }
}

.symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    font-size: 1.75rem;
    border-bottom: 1px solid #444;
    color: #fff;
}

.symbol.highlight {
    background-color: gold;
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 10px gold;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.controls .control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.controls input[type=number] {
    width: 120px;
    padding: 0.4rem;
    background-color: #2a2a2d;
    color: white;
    border: none;
    border-radius: 4px;
    text-align: center;
}

.spin-btn,
.auto-spin-btn {
    width: 120px;
    padding: 0.8rem;
    border-radius: 30px;
    background: #ff4d4f;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    border: none;
}

.auto-spin-btn {
    background-color: #444;
}

.info {
    text-align: center;
    margin-top: 1rem;
}

.admin-btn {
    font-size: 0.9rem;
    background: none;
    color: #aaa;
    border: none;
    text-decoration: underline;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background-color: #1d1d20;
    color: #fff;
    padding: 2rem;
    border-radius: 8px;
    width: 300px;
}

.symbol-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.bg-gold-highlight {
    background: linear-gradient(
        135deg,
        #ffcc00,
        #fff6b7,
        #ffcc00
    );
    background-size: 400% 400%;
    animation: shimmer 5s linear infinite;
    color: #333 !important;
}

.bg-silver-highlight {
    background: linear-gradient(
        135deg,
        #c0c0c0,
        #ffffff,
        #a9a9a9
    );
    background-size: 400% 400%;
    animation: shimmer 5s linear infinite;
    color: #333 !important;
}

.bg-bronze-highlight {
    background: linear-gradient(
        135deg,
        #cd7f32,
        #e8b182,
        #cd7f32
    );
    background-size: 400% 400%;
    animation: shimmer 5s linear infinite;
    color: #f1f1f1 !important;
}

@keyframes animatedRadial {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.balance-box {
    background: linear-gradient(135deg, #111c2e, #1f2e4b);
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.05), 0 0 6px rgba(0, 0, 0, 0.3);
    border: 1px solid #2c3e50;
    min-width: 130px;
    justify-content: space-between;
    transition: background 0.3s ease;
}

.balance-box:hover {
    background: linear-gradient(135deg, #1a273a, #2b3e5c);
}

.balance-currency {
    margin-right: 4px;
    color: #ccc;
    font-size: 0.95rem;
}

.balance-amount {
    font-size: 1.1rem;
    font-weight: bold;
}

.balance-icon {
    color: #ffcc00;
    font-size: 1rem;
}


#highlightInfo {
    background: radial-gradient(circle at center, rgba(238, 174, 202, 1), rgba(148, 187, 233, 1));
    background-size: 200% 200%;
    background-position: 0% 50%;
    animation: animatedRadial 8s ease-in-out infinite;

    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    color: #1d1d1d;
    font-size: 1.1rem;
    box-shadow: 0 0 10px rgba(255, 200, 0, 0.5);
}


.btn-gradient {
    background: linear-gradient(135deg, #ffd700, #ffcc00);
    color: #1d1d1d !important;
    border: none;
    transition: background 0.3s ease;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: #ffffff !important; 
    border: none; 
    transition: background 0.3s ease, transform 0.2s ease; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
}

.btn-gradient-hs {
    background: linear-gradient(135deg, #5cd9ff, #ffffff);
    color: #1d1d1d !important;
    font-weight: 600;
    border: none;
    border-radius: 999px;
    padding: 6px 16px;
    box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.2), 0 0 8px rgba(92, 217, 255, 0.4);
    transition: all 0.3s ease;
}

.btn-gradient-adm {
    background: linear-gradient(135deg, #8ec5fc, #e0c3fc);
    color: #1d1d1d !important;
    font-weight: 600;
    border: none;
    border-radius: 999px;
    padding: 6px 16px;
    box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.2), 0 0 8px rgba(142, 197, 252, 0.3);
    transition: all 0.3s ease;
}

.btn-gradient-hs:hover {
    background: linear-gradient(135deg, #8eeeff, #ffffff);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(92, 217, 255, 0.5);
    color: #000 !important;
}

.btn-icon-circle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    border-radius: 50%;
    padding: 0; /* Penting untuk menghilangkan padding default btn */
    flex-shrink: 0; /* Penting agar tidak menyusut di flex container */
}

.btn-primary-gradient:hover {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: #ffffff !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}


.btn-gradient:hover {
    background: linear-gradient(135deg, #ffcc00, #ffe066);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    color: #000 !important;
}

.btn-gradient-adm:hover {
    background: linear-gradient(135deg, #a6c1ee, #fbc2eb);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(142, 197, 252, 0.4);
    color: #000 !important;
}

@media (max-width: 768px) {
    header>div:first-child {
        display: none !important;
    }
}

#payoutModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

@keyframes pulseText {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.06);
        opacity: 0.85;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pulse-text {
    display: inline-block;
    animation: pulseText 1.6s ease-in-out infinite;
}

/* Nav pills for auth */
.nav-pills .nav-link {
    background-color: #2c2c2f;
    color: #f1f1f1;
    border-radius: 0.5rem;
}

.nav-pills .nav-link.active {
    background-color: #0d6efd; /* Bootstrap primary blue */
    color: #fff;
}

/* ======================== Custom Modal Marketplace ======================== */

/* Container utama modal */
.theme-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none; /* Default tersembunyi */
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 2rem;

    -ms-overflow-style: none; /* IE & Edge */
    scrollbar-width: none;    /* Firefox */
}

.theme-modal::-webkit-scrollbar {
    display: none;            /* Chrome, Safari, Opera */
}

/* Saat modal aktif */
.theme-modal.show {
    display: flex !important;
}

/* Kotak dialog modal */
.theme-modal-dialog {
    width: 90%;
    max-width: 1140px;
    background-color: transparent;
    border-radius: 1rem;
    margin: auto;
}

/* Konten utama modal */
.theme-modal-content {
    background-color: #1e1e2d;
    border-radius: 1rem;
    color: #fff;
    padding: 0;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;

    /* Fix: Tambahkan max-height dan jadikan scroll container */
    max-height: 90vh;
    overflow-y: auto;

    -ms-overflow-style: none;
    scrollbar-width: none;
}

.theme-modal-content::-webkit-scrollbar {
    display: none;
}

/* Header modal */
.theme-modal-content .modal-header {
    border: none;
    padding: 1.5rem 2rem 1rem 2rem;
    background-color: #1e1e2d;
}

/* Judul modal */
.theme-modal-content .modal-title {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Tombol close */
.theme-modal-content .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

/* Body modal */
.theme-modal-content .modal-body {
    padding: 0 2rem 2rem 2rem;
    flex-grow: 1;
    

    -ms-overflow-style: none;
    scrollbar-width: none;
}

.theme-modal-content .modal-body::-webkit-scrollbar {
    display: none;
}

/* Footer modal */
.theme-modal-content .modal-footer {
    border: none;
    padding: 0 2rem 1.5rem 2rem;
    background-color: #1e1e2d;
}

/* ======================== Marketplace Banner ======================== */
@keyframes animatedGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.marketplace-banner {
    background: linear-gradient(135deg, #4f46e5, #9333ea, #4f46e5);
    background-size: 300% 300%;
    animation: animatedGradient 6s ease infinite;

    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.marketplace-banner h4 {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.marketplace-banner p {
    margin-bottom: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* ======================== Grid Tema ======================== */
#themeList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

/* ======================== Kartu Tema ======================== */
.theme-card {
    background-color: #26263b;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    position: relative;
}

.theme-card:hover {
    transform: translateY(-4px);
    border-color: #5eead4;
}

.theme-card.general-theme:hover {
    border-color: #22c55e; /* hijau */
}

/* UNCOMMON */
.theme-card.uncommon-theme:hover {
    border-color: #3b82f6; /* biru */
}

/* RARE */
.theme-card.rare-theme {
    border-color: #a855f7; /* ungu */
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
    animation: rareGlow 3s ease-in-out infinite;
}

.theme-card.rare-theme:hover {
    border-color: #9333ea; /* ungu lebih gelap */
    box-shadow: 0 0 12px rgba(147, 51, 234, 0.8);
}

/* LEGENDARY */
.theme-card.legendary-theme {
    border-color: #ef4444; /* merah */
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5), 0 0 12px rgba(168, 85, 247, 0.3);
    animation: legendaryGlow 2.5s ease-in-out infinite;
}

.theme-card.legendary-theme:hover {
    border-color: #dc2626; /* merah lebih gelap */
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.7), 0 0 20px rgba(147, 51, 234, 0.4);
}

/* === Animasi Glow untuk Rare dan Legendary === */
@keyframes rareGlow {
    0%, 100% {
        box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
    }
    50% {
        box-shadow: 0 0 14px rgba(168, 85, 247, 0.7);
    }
}

@keyframes legendaryGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.5), 0 0 12px rgba(168, 85, 247, 0.3);
    }
    50% {
        box-shadow: 0 0 16px rgba(239, 68, 68, 0.8), 0 0 20px rgba(168, 85, 247, 0.5);
    }
}


/* Preview visual tema */
.theme-preview {
    height: 200px;
    width: 100%;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid #333;
}

/* Informasi tema */
.theme-info {
    padding: 1rem;
    text-align: center;
    color: #fff;
}

.theme-info h5 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.theme-info small {
    color: #aaa;
    display: block;
    margin-bottom: 0.5rem;
}

/* Tombol beli / pilih */
.theme-btn {
    padding: 0.5rem 1.25rem;
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 6px;
    border: none;
    background-color: #facc15;
    color: #000;
    transition: background 0.2s;
}

.theme-btn:hover {
    background-color: #eab308;
}

/* Tooltip hover info */
.theme-tooltip {
    display: none;
    position: absolute;
    top: 5px; /* ✅ sebelumnya -10px */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.85);
    padding: 6px 10px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.75rem;
    white-space: nowrap;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.theme-card:hover .theme-tooltip {
    display: block;
}

/* ======================== Responsive ======================== */
@media (max-width: 576px) {
    #themeList {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .marketplace-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .marketplace-banner img {
        align-self: flex-end;
    }
}

/* === Header sticky === */
.theme-modal-content .modal-header {
    position: sticky;
    top: 0;
    z-index: 15;
    background-color: #1e1e2d;
    transition: box-shadow 0.3s ease;
}

.theme-modal-content .modal-header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* === Saldo Box === */
.marketplace-balance {
    background: linear-gradient(135deg, #111c2e, #1f2e4b);
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.05),
                0 0 6px rgba(0, 0, 0, 0.3);
    border: 1px solid #2c3e50;
    white-space: nowrap;
}

.balance-label {
    color: #ccc;
    font-size: 0.9rem;
}

.balance-amount {
    color: #facc15;
    font-size: 1.05rem;
    font-weight: bold;
}

/* Responsive tweaks */
@media (max-width: 576px) {
    .modal-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .marketplace-balance {
        align-self: stretch;
    }
}

/* ======================== Marketplace Custom Modal ======================== */