@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

/* Reset Dasar */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    width: 100%;
    overflow-x: hidden; /* Kunci agar tidak bisa geser kanan-kiri */
}

/* Header Section */
.header-section {
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin-bottom: 30px;
}

.logo-box {
    margin: 0 auto 15px auto;
    background: #0a0a0a;
    padding: 0;           /* Hapus padding agar gambar bisa mepet ke pinggir bulat */
    border-radius: 50%;
    border: 1px solid #1a1a1a;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;     /* WAJIB: Biar bagian gambar yang keluar kotak otomatis terpotong jadi bulat */
}

.main-logo {
    width: 100%;
    height: 100%;         /* Paksa tinggi 100% agar bulat sempurna */
    object-fit: cover;    /* WAJIB: Agar gambar tidak gepeng tapi tetap memenuhi lingkaran */
    border-radius: 50%;   /* Tambahan biar makin mantap bulatnya */
}

.main-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

/* Link Telegram Fix - Agar lurus tengah */
.sub-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.9rem;
    text-decoration: none;
}

.sub-title a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Game Grid - Pakai Grid 2 Kolom Murni */
.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Bagi 2 sama rata, berapapun lebar HP-nya */
    gap: 10px;
    width: 100%;
    max-width: 400px;
    margin-bottom: 30px;
}

.game-card {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 12px;
    padding: 8px; /* Kecilkan padding biar ada ruang untuk teks */
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    min-width: 0; /* JURUS SAKTI: Biar card bisa lebih kecil dari isi teksnya */
    width: 100%;  /* Ikut kolom grid */
}

.game-card.active {
    border: 2px solid #ffffff;
}

.game-card img {
    width: 32px; /* Perkecil sedikit dari 35px */
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0; /* Biar gambar gak gepeng */
}

/* Container Info Game */
.game-info {
    min-width: 0; /* WAJIB: Biar teks di dalamnya mau dipotong (ellipsis) */
    flex: 1;      /* Ambil sisa ruang */
}

.game-info h3 {
    font-size: 0.7rem; /* Kecilkan sedikit biar muat satu baris */
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Kalau kepanjangan jadi titik-titik */
}

.game-info .status {
    font-size: 0.6rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* Checker Container Fix */
.checker-container {
    width: 100%;
    max-width: 400px;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 25px;
    padding: 20px;
    margin-bottom: 20px;
}

.checker-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.checker-header img {
    width: 60px;
    height: 60px;
    border-radius: 15px;
}

.checker-text h2 {
    font-size: 1.2rem;
    font-weight: 800;
}

/* Input Row - Full Width & Stacked */
.input-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field-box {
    background: #000000;
    border: 1px solid #1a1a1a;
    border-radius: 12px;
    padding: 12px;
    width: 100%;
}

.field-box input {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    text-align: center;
    font-size: 1rem;
    outline: none;
}

.search-trigger {
    background: #ffffff;
    color: #000;
    padding: 15px;
    border-radius: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border: none;
    cursor: pointer;
}

/* Footer */
.footer {
    margin-top: 30px;
    color: #ffffff;
    font-size: 12px;
    text-align: center;
}

/* Global Icon Scale */
[data-lucide] {
    width: 14px !important;
    height: 14px !important;
}

/* Khusus icon di tombol search */
.search-trigger [data-lucide] {
    width: 18px !important;
    height: 18px !important;
}

.result-wrapper {
    width: 100%;
    max-width: 380px;
    margin-top: 20px;
}

.result-card {
    background: linear-gradient(145deg, #0f0f0f, #050505);
    border: 1px solid #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.result-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 15px;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #10b981; /* Warna hijau sukses */
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.status-icon {
    width: 14px;
    height: 14px;
}

.result-body {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.result-info img {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    border: 1px solid #333;
    object-fit: cover;
}

.text-data p {
    color: #94a3b8;
    font-size: 0.7rem;
    margin-bottom: 2px;
}

.text-data h3 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
}

.copy-btn {
    background: #1a1a1a;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    color: #94a3b8;
}

.copy-btn:hover {
    background: #ffffff;
    color: #000000;
}
/* Spinner murni CSS */
.spinner-manual {
    width: 18px;
    height: 18px;
    border: 2px solid #ffffff;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Penyesuaian Tombol Search */
.search-trigger {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-width: 130px; /* Biar tombol gak menciut pas loading */
}

/* =========================================
   ERROR / NOT FOUND CARD STYLING
   ========================================= */

/* Header warna merah (ukuran dan padding otomatis ngikutin .result-header) */
.result-header.error-header {
    color: #ffffff; /* Warna merah error */
}

/* Biar icon X dan teks tetep sejajar */
.error-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Teks pesan error utama - UKURAN DISAMAIN PERSIS KAYA NICKNAME SUKSES */
.text-data.error-text p {
    color: #94a3b8;
    font-size: 0.7rem;
    margin-bottom: 2px;
}

.text-data.error-text h3 {
    color: #ffffff; /* Warna putih samain kaya nickname */
    font-size: 1.1rem; /* Ukuran 1.1rem samain kaya nickname */
    font-weight: 800;
}

/* Styling untuk gambar game di pop-up error - SAMAIN PERSIS KAYA SUKSES */
.error-game-img {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    object-fit: cover;
    /* margin-right dihapus karena di .result-info udah ada gap: 15px bawaan lu */
}

/* Tombol Close (X)  */
.close-error-btn {
    background: #1a1a1a;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-error-btn:hover {
    background: #ef4444; 
    color: #ffffff;
}

/* Notifikasi Ngambang Anti-Lag */
.toast-wait {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #f59e0b; 
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    pointer-events: none;
}

/*  pop-up */
.toast-wait.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Animasi Jam Pasir (Flip) untuk Pop-up Tunggu */
.animate-hourglass {
    display: inline-block;
    animation: flipHourglass 2s infinite ease-in-out;
}

@keyframes flipHourglass {
    0% { transform: rotate(0deg); }
    40% { transform: rotate(180deg); }
    50% { transform: rotate(180deg); } 
    90% { transform: rotate(360deg); }
    100% { transform: rotate(360deg); }
}

