/* assets/css/style.css */
:root {
  --blue: #20294a;
  --purple: #8157ed;
  --cyan: #26c6da;
  --ink: #20294a;
  --muted: #77819f;
  --bg: #f5f7ff;
  --line: #e7eaf6;
  --white: #fff;
  --green: #20b982;
  --red: #f35e75;
  --violet: #9955e9;
  --gold: #feca57;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: Inter, system-ui, -apple-system, sans-serif; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; color: var(--ink); background: #9298a7; }
body { display: flex; justify-content: center; }

/* Loading Screen */
#loading-screen { position: fixed; inset: 0; z-index: 99999; background: #000; display: flex; align-items: center; justify-content: center; transition: opacity 0.5s; }
#loading-screen img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; position: absolute; }
.loading-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; color: white; }
.spinner { width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.3); border-top: 4px solid var(--cyan); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 15px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Main App */
.app { width: 100%; max-width: 430px; min-height: 100vh; background: var(--bg); position: relative; overflow: hidden; box-shadow: 0 0 35px #3332; padding-bottom: 78px; }
.top { height: 65px; background: linear-gradient(115deg, var(--blue), #2c3863); color: white; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; position: sticky; top: 0; z-index: 5; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.logo img { height: 32px; object-fit: contain; }
.top button { border: 0; background: rgba(255,255,255,0.1); color: white; border-radius: 10px; padding: 8px 12px; font-size: 14px; cursor: pointer; font-weight: 600; }
.page { display: none; padding: 15px 14px 25px; animation: fadeIn 0.3s; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Cards & Layout */
.card { background: white; border-radius: 16px; padding: 15px; margin: 12px 0; box-shadow: 0 4px 16px rgba(51,68,124,0.05); }
.banner { height: 160px; border-radius: 18px; background: linear-gradient(130deg, var(--blue), var(--purple), var(--cyan)); color: white; padding: 25px 20px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; position: relative; margin-bottom: 15px; box-shadow: 0 8px 20px rgba(32,41,74,0.2); }
.banner h2 { font-size: 24px; line-height: 1.2; margin-bottom: 8px; font-weight: 800; text-transform: uppercase; }
.banner p { font-size: 13px; opacity: 0.9; }
.section-title { font-size: 15px; font-weight: 800; margin: 20px 0 12px; color: var(--blue); }

/* Navigation */
.bottom { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; height: 74px; background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); border-top: 1px solid var(--line); display: flex; justify-content: space-around; align-items: center; z-index: 8; padding-bottom: env(safe-area-inset-bottom); }
.nav { background: none; border: 0; color: var(--muted); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 56px; cursor: pointer; }
.nav b { font-size: 21px; font-weight: 500; }
.nav.active { color: var(--purple); }
.nav-center { margin-top: -25px; background: linear-gradient(135deg, var(--purple), var(--blue)); color: white !important; width: 60px; height: 60px; border-radius: 50%; border: 5px solid var(--bg); font-size: 24px; box-shadow: 0 6px 15px rgba(129,87,237,0.4); display: grid; place-items: center; }

/* Buttons & Inputs */
.btn { border: 0; border-radius: 12px; background: linear-gradient(100deg, var(--purple), var(--blue)); color: white; font-weight: 700; padding: 15px; cursor: pointer; width: 100%; font-size: 15px; transition: transform 0.2s; box-shadow: 0 6px 15px rgba(32,41,74,0.15); }
.btn:active { transform: scale(0.98); }
.btn.alt { background: white; border: 2px solid var(--purple); color: var(--purple); box-shadow: none; }
.btn.red { background: var(--red); }
.field { margin: 15px 0; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--blue); }
.field input, .field select { width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; font: inherit; outline: none; color: var(--ink); transition: border-color 0.2s; }
.field input:focus, .field select:focus { border-color: var(--purple); }

/* Wingo Game Styles */
.game-head { background: linear-gradient(120deg, var(--blue), var(--purple)); color: white; border-radius: 17px; padding: 20px; box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.timer { font-size: 32px; font-weight: 900; letter-spacing: 2px; color: var(--gold); }
.numbers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 15px 0; }
.num { height: 50px; border-radius: 12px; border: 0; background: #f1f2f6; font-size: 18px; font-weight: 800; color: var(--blue); cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.05); transition: 0.2s; }
.num:active { transform: scale(0.95); }
.colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.choice { border: 0; border-radius: 12px; padding: 15px 5px; color: white; font-weight: 800; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.1); font-size: 14px; }
.green-bg { background: var(--green); }
.red-bg { background: var(--red); }
.violet-bg { background: var(--violet); }
.lock-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.85); display: none; justify-content: center; align-items: center; z-index: 10; border-radius: 16px; backdrop-filter: blur(3px); }
.lock-text { font-size: 4rem; font-weight: bold; color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* Helpers */
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.pill { border: 1px solid var(--line); color: var(--blue); border-radius: 20px; padding: 6px 12px; background: white; font-size: 12px; font-weight: 600; cursor: pointer; }
.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); background: var(--blue); color: white; padding: 12px 20px; border-radius: 25px; z-index: 999; display: none; font-size: 13px; font-weight: 600; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.toast.show { display: block; animation: slideDown 0.3s forwards; }
@keyframes slideDown { from { transform: translate(-50%, -20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Modals */
.modal-wrap { position: fixed; inset: 0; background: rgba(20,26,45,0.8); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100; backdrop-filter: blur(5px); }
.modal-wrap.show { display: flex; }
.modal { width: 100%; max-width: 380px; max-height: 85vh; overflow: auto; background: var(--bg); border-radius: 20px; padding: 25px; box-shadow: 0 20px 70px rgba(0,0,0,0.3); animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes popUp { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.close { float: right; border: 0; border-radius: 50%; width: 30px; height: 30px; background: var(--line); color: var(--ink); font-weight: bold; cursor: pointer; }

/* Payment Methods */
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 15px; }
.pay-card { border: 2px solid var(--line); border-radius: 12px; padding: 8px; cursor: pointer; transition: 0.2s; background: white; height: 60px; display: flex; align-items: center; justify-content: center; }
.pay-card img { width: 100%; height: 40px; object-fit: contain; }
.pay-card.active { border-color: var(--purple); background: #f3f0ff; box-shadow: 0 4px 12px rgba(129,87,237,0.2); }

.game-tabs { display: flex; gap: 8px; margin-bottom: 15px; }
.game-tab { flex: 1; padding: 10px 5px; text-align: center; border-radius: 12px; background: rgba(255,255,255,0.15); color: white; border: 1px solid rgba(255,255,255,0.2); font-size: 13px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.game-tab.active { background: white; color: var(--blue); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.tab-nav { display: flex; gap: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.tab-btn { background: none; border: none; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--muted); border-radius: 20px; cursor: pointer; transition: 0.2s; }
.tab-btn.active { background: var(--purple); color: white; }

.badge { display: inline-block; padding: 3px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-approved { background: #d4edda; color: #155724; }
.badge-rejected { background: #f8d7da; color: #721c24; }
.badge-won { background: #d4edda; color: #155724; }
.badge-lost { background: #f8d7da; color: #721c24; }

.wallet-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; background: #fafbff; display: flex; align-items: center; justify-content: space-between; }
.wallet-card.selected { border-color: var(--purple); background: #f3f0ff; }

.ref-box { background: #fafbff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; }

.top-balance-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.28); padding: 6px 12px; border-radius: 20px; font-weight: 700; font-size: 13px; color: #fff; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.top-balance-badge:hover, .top-balance-badge:active { transform: scale(0.96); background: rgba(255, 255, 255, 0.28); border-color: rgba(255, 255, 255, 0.45); }

@media(min-width:700px){ body{padding:0;} .app{min-height:100vh;} }