@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #0f172a;       /* Warna Utama (Dark Navy) */
    --secondary: #3b82f6;     /* Warna Aksen (Blue) */
    --gold: #d97706;          /* Warna Poin */
    --success: #10b981;       /* Warna Sukses (Green) */
    --danger: #ef4444;        /* Warna Merah */
    --bg-body: #f1f5f9;       /* Background Halaman */
    --surface: #ffffff;       /* Warna Kartu/Container */
    --text-main: #334155;     /* Teks Utama */
    --text-muted: #64748b;    /* Teks Pudar */
    --border: #e2e8f0;        /* Garis Batas */
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    background-color: #cbd5e1; /* Background luar container */
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    color: var(--text-main);
}

/* --- CONTAINER UTAMA (SIMULASI HP) --- */
.app-container {
    width: 100%;
    max-width: 480px; /* Lebar maksimal seperti HP */
    background: var(--surface);
    min-height: 100vh;
    box-shadow: 0 0 25px rgba(0,0,0,0.1);
    position: relative;
    padding-bottom: 80px; /* Space untuk menu bawah */
    overflow-x: hidden;
}

/* --- HEADER --- */
.app-header {
    background: var(--surface);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    box-sizing: border-box;
}

.brand-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.point-badge {
    background: #fffbeb;
    color: var(--gold);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #fcd34d;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- GRID MENU --- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Default 4 kolom */
    gap: 15px;
    padding: 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    transition: transform 0.1s;
}

.menu-item:active { transform: scale(0.95); }

.icon-box {
    width: 48px;
    height: 48px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--secondary);
    font-size: 20px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
}

.menu-label { font-size: 11px; font-weight: 600; }

/* --- TOMBOL & FORM --- */
.btn-action {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: 0.2s;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
}

.btn-primary { background: var(--secondary); color: white; }
.btn-primary:hover { background: #2563eb; }

.btn-outline { 
    background: transparent; 
    border: 1px solid var(--border); 
    color: var(--text-main); 
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    margin-bottom: 15px;
    box-sizing: border-box;
    background: #f8fafc;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--secondary);
    background: #fff;
}

/* --- BOTTOM NAVIGATION (MENU BAWAH) --- */
.bottom-nav {
    position: fixed; /* Fixed ke layar, bukan container */
    bottom: 0;
    width: 100%;
    max-width: 480px; /* Samakan dengan container */
    height: 70px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
}

.nav-item {
    text-decoration: none;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    font-weight: 500;
    gap: 5px;
    padding: 10px;
}

.nav-item i { font-size: 20px; margin-bottom: 2px; }
.nav-item.active { color: var(--secondary); font-weight: 700; }

/* --- KARTU CERITA --- */
.story-card {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    background: var(--surface);
}

.story-card:active { background: #f1f5f9; }

.story-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 24px;
    flex-shrink: 0;
}

.story-info h3 { margin: 0 0 5px 0; font-size: 15px; font-weight: 700; color: var(--primary); }
.story-info p { margin: 0 0 8px 0; font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.story-meta { font-size: 11px; font-weight: 600; color: var(--gold); display: flex; gap: 5px; align-items: center; }

/* --- ADS --- */
.ad-native {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 15px;
    margin: 15px 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* --- SPIN WHEEL (RODA) --- */
.wheel-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 20px auto;
    border-radius: 50%;
    border: 8px solid #f1f5f9;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow: hidden;
}

.wheel {
    width: 100%; height: 100%; border-radius: 50%;
    background: conic-gradient(
        #ef4444 0% 12.5%, #3b82f6 12.5% 25%, #f59e0b 25% 37.5%, #10b981 37.5% 50%,
        #8b5cf6 50% 62.5%, #ec4899 62.5% 75%, #06b6d4 75% 87.5%, #64748b 87.5% 100%
    );
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    transform: rotate(0deg);
}

.wheel-label { position: absolute; top: 50%; left: 50%; transform-origin: 0 0; width: 50%; height: 2px; }
.text { position: absolute; left: 50px; top: -10px; color: white; font-weight: bold; font-size: 11px; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); transform-origin: 0 0; }
.needle { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 30px solid var(--primary); z-index: 10; }
.spin-btn-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--primary); border: 4px solid #e2e8f0; cursor: pointer; z-index: 5; font-size: 12px; }

/* --- MEDIA QUERY (Agar rapi di layar PC) --- */
@media (min-width: 481px) {
    body { padding-top: 20px; padding-bottom: 20px; }
    .app-container { border-radius: 20px; overflow: hidden; min-height: 90vh; }
    .bottom-nav { position: absolute; } /* Di PC, nav absolute ke container */
}
