/* ZENTRIX styles */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #0b1220; color: #e5e7eb; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
body.zx-dark { background: radial-gradient(1200px 600px at 50% -10%, #11203a 0%, #0b1220 60%); min-height: 100vh; }

/* Splash */
.splash { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; z-index: 100; background: #0b1220; }
.splash-card { width: 100%; max-width: 360px; background: rgba(15,23,42,.7); border: 1px solid rgba(255,255,255,.06); border-radius: 18px; padding: 28px; text-align: center; }
.splash-logo { width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 16px; background: radial-gradient(circle at 30% 30%, #3b82f6, #1d4ed8 60%, #0b1220 100%); display: grid; place-items: center; font-size: 38px; color: #dbeafe; box-shadow: 0 0 30px rgba(59,130,246,.5); }
.splash-logo i { display: none; } .splash-logo span { font-weight: 800; letter-spacing: 1px; }
.splash-title { font-size: 28px; font-weight: 800; letter-spacing: 4px; }
.splash-sub { color: #94a3b8; margin-top: 4px; margin-bottom: 22px; }
.progress { height: 6px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.progress .bar { height: 100%; width: 5%; background: linear-gradient(90deg, #60a5fa, #818cf8); transition: width .25s; }
.splash-tip { margin-top: 18px; color: #93c5fd; font-size: 13px; background: rgba(59,130,246,.08); padding: 10px 12px; border-radius: 10px; }
.splash-err { margin-top: 12px; color: #fca5a5; font-size: 13px; }

/* Shell */
.shell { padding-bottom: 96px; min-height: 100vh; }
.zx-header { position: sticky; top: 0; z-index: 20; padding: 12px 14px; display: flex; align-items: center; gap: 10px; background: linear-gradient(180deg, rgba(11,18,32,.95), rgba(11,18,32,.85)); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,.04); }
.user { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg,#ec4899,#8b5cf6); display: grid; place-items: center; font-weight: 700; color: #fff; box-shadow: 0 0 0 2px rgba(236,72,153,.4); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.uname { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.lvl { font-size: 12px; color: #a5b4fc; display: flex; align-items: center; gap: 4px; }
.pills { display: flex; gap: 6px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; background: rgba(30,41,59,.85); border: 1px solid rgba(255,255,255,.05); font-size: 12px; font-weight: 600; color: #cbd5e1; }
.pill i { color: #a5b4fc; }
.lang-btn { cursor: pointer; }
.lang-menu { position: absolute; right: 12px; top: 60px; background: #0f172a; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 6px; z-index: 30; min-width: 130px; }
.lang-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; background: transparent; border: 0; color: #e5e7eb; font-size: 14px; border-radius: 8px; cursor: pointer; }
.lang-menu button:hover { background: rgba(255,255,255,.06); }

/* Tab content */
.tab-content { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.card { background: linear-gradient(180deg, rgba(17,24,39,.85), rgba(15,23,42,.75)); border: 1px solid rgba(255,255,255,.05); border-radius: 18px; padding: 18px; }
.card h2 { margin: 0 0 10px; font-size: 16px; color: #c7d2fe; display: flex; align-items: center; gap: 8px; }
.center { text-align: center; }

/* Mining */
.rig-logo { width: 168px; height: 168px; margin: 8px auto 12px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #60a5fa, #1e40af 60%, #0b1220 100%); display: grid; place-items: center; font-size: 84px; font-weight: 800; color: #e0e7ff; box-shadow: 0 0 40px rgba(59,130,246,.45), inset 0 0 30px rgba(0,0,0,.5); }
.rig-title { text-align: center; font-size: 20px; font-weight: 800; margin: 4px 0 16px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: rgba(15,23,42,.7); border: 1px solid rgba(255,255,255,.05); border-radius: 12px; padding: 10px; text-align: center; }
.stat .lbl { font-size: 11px; color: #94a3b8; }
.stat .val { font-size: 14px; color: #60a5fa; font-weight: 700; margin-top: 2px; }
.timer { display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(15,23,42,.7); border: 1px solid rgba(255,255,255,.05); border-radius: 999px; padding: 14px; font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.active-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid #166534; color: #4ade80; background: rgba(22,101,52,.15); font-weight: 700; font-size: 12px; letter-spacing: 2px; }
.active-pill::before { content: ''; width: 8px; height: 8px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 10px #22c55e; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 700; font-size: 14px; cursor: pointer; transition: transform .08s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg,#818cf8,#6366f1); color: #fff; }
.btn-green { background: linear-gradient(135deg,#22c55e,#16a34a); color: #fff; box-shadow: 0 0 24px rgba(34,197,94,.45); }
.btn-blue { background: linear-gradient(135deg,#38bdf8,#0ea5e9); color: #fff; }
.btn-ghost { background: rgba(99,102,241,.18); color: #c7d2fe; }
.btn-danger { background: linear-gradient(135deg,#ef4444,#b91c1c); color: #fff; }
.btn-block { width: 100%; }

/* Quests list */
.row { display: flex; align-items: center; gap: 12px; padding: 12px; background: rgba(15,23,42,.6); border: 1px solid rgba(255,255,255,.04); border-radius: 14px; }
.row + .row { margin-top: 10px; }
.row .ico { width: 44px; height: 44px; border-radius: 50%; background: rgba(99,102,241,.18); display: grid; place-items: center; color: #a5b4fc; font-size: 18px; flex: none; }
.row .body { flex: 1; min-width: 0; }
.row .ttl { font-weight: 700; font-size: 14px; }
.row .sub { color: #a5b4fc; font-size: 12px; margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.badge { padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.claimed { background: rgba(34,197,94,.12); color: #4ade80; }
.badge.locked  { background: rgba(148,163,184,.15); color: #94a3b8; }

/* Forms */
.input, textarea, select { width: 100%; padding: 12px 14px; border-radius: 12px; background: rgba(15,23,42,.7); border: 1px solid rgba(255,255,255,.08); color: #e5e7eb; font-size: 14px; outline: none; }
.input:focus { border-color: #6366f1; }
.lbl-block { font-size: 13px; color: #94a3b8; margin: 12px 0 6px; }
.inline { display: flex; gap: 8px; }
.inline > .input { flex: 1; }
.help { font-size: 12px; color: #94a3b8; display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 6px; }
.tip-line { text-align: center; color: #c7d2fe; font-size: 13px; }
.section-title { display: flex; align-items: center; gap: 8px; color: #c7d2fe; font-weight: 700; font-size: 15px; margin-bottom: 6px; }

/* Add task modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { width: 100%; max-width: 420px; background: #0f172a; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 18px; max-height: 90vh; overflow: auto; }
.modal h3 { margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.modal .close { background: transparent; border: 0; color: #94a3b8; font-size: 18px; cursor: pointer; float: right; }
.pill-row { display: flex; gap: 6px; background: rgba(15,23,42,.7); border: 1px solid rgba(255,255,255,.06); border-radius: 999px; padding: 4px; }
.pill-row button { flex: 1; background: transparent; border: 0; color: #cbd5e1; padding: 10px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 13px; }
.pill-row button.active { background: #1e293b; color: #fff; }
.actions { display: flex; gap: 10px; margin-top: 14px; }
.actions .btn { flex: 1; }

/* Withdraw */
.history-toggle { background: transparent; border: 0; color: #818cf8; font-weight: 700; display: flex; align-items: center; gap: 6px; justify-content: center; margin: 8px auto; cursor: pointer; }
.empty { text-align: center; color: #64748b; padding: 30px 0; border: 1px dashed rgba(255,255,255,.06); border-radius: 14px; }
.status-pill { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-pending { background: rgba(234,179,8,.15); color: #facc15; }
.status-paid { background: rgba(34,197,94,.15); color: #4ade80; }
.status-rejected { background: rgba(239,68,68,.15); color: #fca5a5; }
.status-live { background: rgba(34,197,94,.15); color: #4ade80; }
.status-closed { background: rgba(148,163,184,.15); color: #94a3b8; }

/* Tabbar */
.tabbar { position: fixed; bottom: 12px; left: 12px; right: 12px; background: rgba(15,23,42,.9); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.06); border-radius: 999px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 8px; z-index: 30; }
.tab { background: transparent; border: 0; padding: 10px 6px; color: #94a3b8; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; border-radius: 999px; cursor: pointer; }
.tab i { font-size: 18px; }
.tab.active { background: linear-gradient(135deg,#818cf8,#6366f1); color: #fff; box-shadow: 0 4px 18px rgba(99,102,241,.4); }

/* Team */
.invite-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.invite-stat { background: rgba(15,23,42,.7); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 16px; text-align: center; }
.invite-stat .big { font-size: 26px; font-weight: 800; }
.invite-stat .lbl { color: #94a3b8; font-size: 12px; margin-top: 4px; }

/* Toast */
#toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: #1e293b; border: 1px solid rgba(255,255,255,.08); color: #e5e7eb; padding: 10px 16px; border-radius: 999px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; }
#toast.show { opacity: 1; }

/* Admin */
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.admin-section { background: rgba(15,23,42,.7); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 14px; }
.admin-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,.05); }
.admin-row:last-child { border-bottom: 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: #818cf8; font-weight: 700; background: transparent; border: 0; cursor: pointer; padding: 8px 0; }
.kv { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; align-items: center; padding: 8px 0; }
.kv .input { padding: 8px 10px; font-size: 13px; }
.small { font-size: 12px; color: #94a3b8; }
.right { text-align: right; }
