:root {
    --bg-color: #0d0d12;
    --card-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-color: #00fff5; /* Warna Neon Cyan */
    --accent-purple: #9d00ff;
    --text-primary: #e0e0e0;
    --text-secondary: #909090;
    --coin-yellow: #ffc107;
    --nav-height: 70px;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* Untuk gesture smooth */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; /* Hapus flash saat klik di HP */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden; /* Mencegah scroll body utama */
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh; /* Tinggi penuh layar */
    max-width: 480px; /* Batasan lebar untuk tampilan mobile di desktop */
    margin: 0 auto;
    position: relative;
}

/* Style Glassmorphism Umum */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* --- Area Konten Utama --- */
main {
    flex: 1;
    overflow-y: auto; /* Scroll hanya di dalam konten */
    padding: 15px;
    padding-bottom: calc(var(--nav-height) + 120px); /* Ruang untuk Nav dan Floating */
}

.page {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Header di List Game */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 15px;
}

.user-info { display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--glass-border); }
.user-text { display: flex; flex-direction: column; }
.user-phone { font-size: 14px; font-weight: bold; }
.user-id { font-size: 11px; color: var(--text-secondary); }

.coin-display {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    font-weight: bold;
    border-radius: 20px;
}
.yellow-coin { color: var(--coin-yellow); font-size: 1.2rem; }
.add-icon { color: #4caf50; margin-left: 5px; cursor: pointer; }

/* Banner */
.banner-container img { width: 100%; border-radius: 16px; margin-bottom: 15px; }

/* Daily Bonus */
.daily-bonus { padding: 15px; margin-bottom: 15px; }
.daily-bonus h3 { font-size: 16px; margin-bottom: 10px; }
.bonus-task {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 12px;
}
.task-info { display: flex; align-items: center; gap: 10px; }
.task-icon { font-size: 2rem; color: var(--accent-purple); }
.task-title { font-weight: bold; font-size: 14px; }
.task-bounty { color: var(--coin-yellow); font-size: 12px; }

.btn-checkin {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); /* Warna degradasi */
    border: none;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}
.btn-checkin:active { transform: scale(0.95); }
.btn-checkin.disabled { background: #555; cursor: default; opacity: 0.6; }

/* Game List */
.game-list-section h3 { margin-bottom: 10px; }
.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    text-align: center;
    gap: 8px;
    transition: background 0.3s;
}
.game-item:active { background: rgba(255,255,255,0.08); }
.game-item img { width: 48px; height: 48px; }
.game-item span { font-size: 12px; font-weight: 500; }

/* Halaman Saya */
.saya-header {
    display: flex;
    padding: 20px;
    margin-bottom: 15px;
    gap: 20px;
}
.coin-stats { flex: 1; text-align: center; }
.coin-stats p { font-size: 12px; color: var(--text-secondary); }
.coin-stats h3 { font-size: 1.2rem; color: #fff; margin-top: 5px; }

.action-buttons { display: flex; gap: 10px; margin-bottom: 15px; }
.action-buttons button {
    flex: 1;
    border: none;
    padding: 15px;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    display: flex; gap: 8px; justify-content: center; align-items: center;
    transition: transform 0.2s;
}
.action-buttons button:active { transform: scale(0.95); }
.btn-withdraw { color: var(--accent-color) !important; }
.btn-deposit { color: #4caf50 !important; }

.menu-box { padding: 5px; }
.menu-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: background 0.3s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: rgba(255,255,255,0.05); }
.menu-item i:first-child { margin-right: 12px; color: var(--accent-color); font-size: 1.2rem; width: 20px; text-align: center; }
.menu-item .arrow { margin-left: auto; color: var(--text-secondary); }

/* --- Floating Menu (Kanan Bawah) --- */
.floating-menu {
    position: fixed;
    bottom: calc(var(--nav-height) + 15px);
    right: 15px;
    display: flex;
    flex-direction: column-reverse; /* Bottom up */
    gap: 10px;
    z-index: 90;
}

.float-btn {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s var(--ease-out), width 0.3s var(--ease-out);
    overflow: hidden;
    position: relative;
}

/* Warna & Style Spesifik Float Button */
.tiktok { background: #000; border: 1px solid #ff0050; }
.game-stick { background: linear-gradient(135deg, #1d976c 0%, #93f9b9 100%); color: #000; }
.spin-wheel { background: var(--accent-purple); color: #fff; border: 1px solid rgba(255,255,255,0.2); }

/* Label text yang muncul saat hover (opsional untuk estetika) */
.float-label {
    position: absolute;
    right: 60px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    white-space: nowrap;
}

/* Hover effect di Desktop / Long press mobile (Opsional) */
@media (hover: hover) {
    .float-btn:hover { width: 120px; justify-content: flex-start; padding-left: 15px; }
    .float-btn:hover .float-label { opacity: 1; position: static; margin-left: 10px; }
}

.float-btn:active { transform: scale(0.9); }

/* --- Bottom Navigation --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    font-size: 11px;
    gap: 4px;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}

.nav-item i { font-size: 22px; transition: transform 0.3s var(--ease-out); }

/* State Active Menu */
.nav-item.active { color: var(--accent-color); }
.nav-item.active i { transform: translateY(-5px); text-shadow: 0 0 10px var(--accent-color); }

/* --- Modal Spin Wheel --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: none; /* Sembunyikan default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s;
}

.modal-overlay.open { display: flex; opacity: 1; }

.modal-content {
    width: 90%;
    max-width: 350px;
    padding: 25px;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Roda Spin Sederhana */
.wheel-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 20px auto;
}

.wheel-pointer {
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 20px solid var(--accent-color);
    z-index: 10;
}

.wheel {
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 5px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    /* Efek putaran dikontrol via JS inline style */
}

.segment {
    position: absolute;
    width: 50%; height: 50%;
    transform-origin: bottom right;
    display: flex; justify-content: center; align-items: center;
    font-weight: bold; font-size: 1.2rem; color: #fff;
}

/* Pembagian segmen roda (sederhana) */
.s1 { background: #ff4757; transform: rotate(0deg) skewY(-30deg); }
.s2 { background: #2ed573; transform: rotate(60deg) skewY(-30deg); }
.s3 { background: #1e90ff; transform: rotate(120deg) skewY(-30deg); }
.s4 { background: #ffa502; transform: rotate(180deg) skewY(-30deg); } /* Segmen koin besar */
.s5 { background: #ff4757; transform: rotate(240deg) skewY(-30deg); }
.s6 { background: #2ed573; transform: rotate(300deg) skewY(-30deg); }

/* Reset teks agar tidak miring akibat skew */
.segment::before {
    content: ''; /* Placeholder content, teks di HTML */
}

.btn-spin {
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    margin-top: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}
.btn-spin:active { transform: scale(0.95); }
.btn-spin.disabled { background: #555; cursor: default; }
