@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-blue: #1e3a8a; /* Deep blue background */
    --bg-blue-light: #2563eb;
    --primary: #4338ca;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --red: #ef4444;
    --yellow: #f59e0b;
    --purple: #8b5cf6;
    --green: #10b981;
    --bg-gray: #f8fafc;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; }

body { background: var(--bg-gray); color: var(--text-dark); height: 100dvh; overflow: hidden; display: flex; justify-content: center; }

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-white { color: var(--white); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2.5rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.m-0 { margin: 0; }

.btn { padding: 12px 24px; border: none; font-size: 1rem; font-weight: 700; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #3730a3; }
.btn-block { width: 100%; }
.rounded-pill { border-radius: 50px; }
.shadow-primary { box-shadow: 0 8px 20px rgba(67, 56, 202, 0.3); }

/* Mobile App Container */
.app-container {
    width: 100%;
    max-width: 480px; /* Mobile width */
    height: 100dvh;
    overflow: hidden;
    background: var(--bg-gray);
    position: relative;
    box-shadow: 0 0 40px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

/* Backgrounds */
.header-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 350px;
    background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
    z-index: 0;
    overflow: hidden;
}

.pattern-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 2px, transparent 2px);
    background-size: 30px 30px;
    opacity: 0.5;
}

/* Topbar */
.topbar {
    position: relative; z-index: 10;
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 20px 10px 20px;
}

.user-greeting { display: flex; align-items: center; gap: 12px; color: white; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; box-shadow: 0 4px 10px rgba(0,0,0,0.2); border: 2px solid rgba(255,255,255,0.5); }
.greeting-text { font-size: 0.8rem; opacity: 0.9; }
.user-name { font-weight: 700; font-size: 1.1rem; }

.top-actions { display: flex; gap: 15px; align-items: center; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.2); color: white; border: none; font-size: 1rem; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,0.3); }

/* Main Scroll Area */
.main-scroll { position: relative; z-index: 10; flex: 1; display: flex; flex-direction: column; overflow-y: auto; }

/* Arisan Card */
.arisan-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px; padding: 20px; color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.card-header-flex { display: flex; align-items: center; gap: 15px; }
.card-icon { width: 45px; height: 45px; border-radius: 12px; background: linear-gradient(135deg, var(--yellow), #d97706); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4); }
.card-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 1px; opacity: 0.8; }
.card-title { font-size: 1.2rem; font-weight: 800; }
.kode-btn { margin-left: auto; background: white; color: var(--bg-blue); border: none; padding: 6px 12px; border-radius: 20px; font-weight: 700; font-size: 0.8rem; display: flex; align-items: center; gap: 5px; }

.saldo-section { border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); padding: 15px 0; }
.saldo-label { font-size: 0.85rem; opacity: 0.9; margin-bottom: 5px; }
.saldo-amount { font-size: 2rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }

.progress-labels { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 600; margin-bottom: 8px; }
.progress-bar { width: 100%; height: 6px; background: rgba(0,0,0,0.2); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--yellow); border-radius: 10px; }

/* Bottom Sheet */
.bottom-sheet {
    background: var(--bg-gray);
    border-radius: 30px 30px 0 0;
    padding: 25px 20px;
    flex: 1;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
}

/* Squircle Menus */
.quick-menus { display: flex; justify-content: space-between; padding: 10px 5px; }
.menu-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.squircle {
    width: 60px; height: 60px;
    border-radius: 20px; /* squircle effect */
    display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem; color: white;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.squircle:hover { transform: translateY(-3px); }
.bg-red { background: linear-gradient(135deg, #f87171, #dc2626); }
.bg-yellow { background: linear-gradient(135deg, #fbbf24, #d97706); }
.bg-purple { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.bg-green { background: linear-gradient(135deg, #34d399, #059669); }
.menu-item span { font-size: 0.8rem; font-weight: 600; color: #475569; }

/* Wheel Section */
.section-title h3 { font-size: 1.2rem; font-weight: 800; color: var(--text-dark); }

.wheel-container { display: flex; flex-direction: column; align-items: center; background: white; padding: 20px; border-radius: 24px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.wheel_box { position: relative; width: 100%; max-width: 320px; aspect-ratio: 1; }
#spinWheel { width: 100%; height: 100%; transform: rotate(270deg); }
#spin_btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 70px; height: 70px; border-radius: 50%;
    background: radial-gradient(circle, var(--yellow), #d97706);
    color: white; border: 4px solid #fff; box-shadow: 0 4px 15px rgba(245, 158, 11, 0.5);
    font-size: 1.1rem; font-weight: 800; cursor: pointer; text-transform: uppercase;
    z-index: 5; transition: 0.2s;
}
#spin_btn:hover:not(:disabled) { transform: translate(-50%, -50%) scale(1.05); }
#spin_btn:disabled { filter: grayscale(1); cursor: not-allowed; opacity: 0.8; }
.pointer {
    position: absolute; top: 50%; right: -25px; transform: translateY(-50%) rotate(180deg);
    font-size: 3rem; color: var(--bg-blue); z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.status-text { font-size: 1.1rem; font-weight: 700; color: var(--primary); background: #e0e7ff; padding: 8px 20px; border-radius: 20px; }

/* Winners List */
.link-btn { background: none; border: none; color: var(--primary); font-weight: 700; font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.winners-list { display: flex; flex-direction: column; gap: 12px; }
.winner-item { background: white; padding: 15px; border-radius: 16px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.03); border-left: 4px solid var(--primary); }
.winner-item-name { font-weight: 700; font-size: 1rem; color: var(--text-dark); }
.winner-item-time { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.winner-amount { font-weight: 800; color: var(--yellow); }
.empty-state { text-align: center; padding: 20px; background: white; border-radius: 16px; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; border: 1px dashed #cbd5e1; }

/* Bottom Nav */
.bottom-nav {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: white; border-top-left-radius: 24px; border-top-right-radius: 24px;
    display: flex; justify-content: space-around; align-items: center;
    padding: 15px 10px 20px 10px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05); z-index: 50;
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 5px; color: #94a3b8; text-decoration: none; font-size: 0.75rem; font-weight: 600; transition: 0.2s; }
.nav-item i { font-size: 1.2rem; margin-bottom: 2px; }
.nav-item.active { color: var(--primary); }
.nav-item.active i { background: #e0e7ff; padding: 10px; border-radius: 12px; margin-top: -10px; }

/* Overlay & Modals */
.overlay, .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.8); z-index: 1000; display: none; justify-content: center; align-items: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.overlay.active, .modal.active { display: flex; animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.glass-box { background: white; border-radius: 24px; padding: 30px; width: 90%; max-width: 350px; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.logo-brand { font-size: 1.5rem; font-weight: 800; color: var(--bg-blue); }

.winner-card { background: white; border-radius: 30px; padding: 40px 25px; width: 90%; max-width: 350px; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.3); overflow: hidden; }
.modal-close { position: absolute; top: 15px; right: 15px; width: 32px; height: 32px; border-radius: 50%; background: #f1f5f9; border: none; font-size: 1rem; color: #64748b; cursor: pointer; }
.winner-name { font-size: 2.5rem; font-weight: 800; color: var(--text-dark); background: linear-gradient(135deg, var(--primary), var(--purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.reward-box { background: #fffbeb; border: 1px solid #fef3c7; padding: 15px; border-radius: 16px; margin-top: 15px; }
.reward-label { font-size: 0.8rem; font-weight: 700; color: #d97706; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.reward-amount { font-size: 1.8rem; font-weight: 800; }


/* DESKTOP RESPONSIVE MODE */

@media (min-width: 768px) {

    body { background: #cbd5e1; height: auto; overflow: auto; }

    .app-container { max-width: 1000px; margin: 40px auto; border-radius: 40px; height: auto; min-height: calc(100vh - 80px); overflow: visible; }

    .desktop-nav-links { display: flex; gap: 20px; align-items: center; margin-right: 20px; }

    .desktop-nav-links a { color: white; text-decoration: none; font-weight: 600; font-size: 0.9rem; opacity: 0.8; }

    .desktop-nav-links a:hover, .desktop-nav-links a.active { opacity: 1; }

    .bottom-nav { display: none; } /* Hide mobile bottom nav */

    .bottom-sheet { padding: 40px; padding-bottom: 40px; }

    .desktop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

    .quick-menus { justify-content: center; gap: 40px; }

    .wheel-container { max-width: 100%; }

}

@media (max-width: 767px) {

    .desktop-nav-links { display: none; }

}


