/* ═══════════════════════════════════════════
   TAPNEXA - Global Style
   Black & Gold Luxury Game UI
═══════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --gold: #D4AF37;
  --gold-light: #FFD700;
  --gold-dark: #B8860B;
  --gold-dim: rgba(212,175,55,0.15);
  --gold-glow: rgba(212,175,55,0.6);
  --bg-primary: #000000;
  --bg-secondary: #0A0A0A;
  --bg-card: rgba(15,15,15,0.95);
  --bg-glass: rgba(212,175,55,0.05);
  --bg-glass-hover: rgba(212,175,55,0.1);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255,255,255,0.65);
  --text-muted: rgba(255,255,255,0.35);
  --text-gold: #D4AF37;
  --border-gold: rgba(212,175,55,0.3);
  --border-gold-bright: rgba(212,175,55,0.7);
  --glass-border: rgba(212,175,55,0.2);
  --success: #00C896;
  --danger: #FF4757;
  --warning: #FFA502;
  --info: #3B9EFF;
  --nav-height: 70px;
  --header-height: 60px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-gold: 0 0 20px rgba(212,175,55,0.3);
  --shadow-gold-lg: 0 0 40px rgba(212,175,55,0.5);
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  --font-game: 'Orbitron', sans-serif;
  --font-ui: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(212,175,55,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 30% at 50% 100%, rgba(212,175,55,0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 2px;
}

/* ── Typography ── */
h1, h2, h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  line-height: 1.2;
}

/* ── Page Wrapper ── */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-height) + 16px);
}

/* ── Gold Text ── */
.text-gold {
  background: linear-gradient(135deg, #D4AF37, #FFD700, #B8860B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass Card ── */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212,175,55,0.05) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Gold Card ── */
.gold-card {
  background: linear-gradient(135deg, rgba(212,175,55,0.12), rgba(212,175,55,0.04));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(212,175,55,0.2);
  position: relative;
  overflow: hidden;
}

.gold-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.05em;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s ease;
}

.btn:active::after {
  background: rgba(255,255,255,0.08);
}

.btn-gold {
  background: linear-gradient(135deg, #D4AF37, #FFD700, #B8860B);
  color: #000;
  padding: 14px 28px;
  box-shadow: 0 4px 20px rgba(212,175,55,0.4);
  text-shadow: none;
}

.btn-gold:hover {
  box-shadow: 0 6px 30px rgba(212,175,55,0.7);
  transform: translateY(-1px);
}

.btn-gold:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(212,175,55,0.4);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--border-gold);
  padding: 13px 27px;
}

.btn-outline-gold:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.btn-danger {
  background: linear-gradient(135deg, #FF4757, #FF2034);
  color: #fff;
  padding: 14px 28px;
  box-shadow: 0 4px 20px rgba(255,71,87,0.4);
}

.btn-success {
  background: linear-gradient(135deg, #00C896, #00A87A);
  color: #fff;
  padding: 14px 28px;
  box-shadow: 0 4px 20px rgba(0,200,150,0.4);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Input Fields ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-gold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-control {
  background: rgba(15,15,15,0.8);
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 14px 16px;
  width: 100%;
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15), var(--shadow-gold);
  background: rgba(20,20,20,0.9);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-dark);
  font-size: 1.2rem;
  pointer-events: none;
}

.input-icon ~ .form-control {
  padding-left: 46px;
}

.input-icon-right {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  transition: color 0.2s;
}

.input-icon-right:hover {
  color: var(--gold);
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-gold {
  background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.1));
  color: var(--gold);
  border: 1px solid rgba(212,175,55,0.4);
}

.badge-success {
  background: rgba(0,200,150,0.15);
  color: var(--success);
  border: 1px solid rgba(0,200,150,0.3);
}

.badge-danger {
  background: rgba(255,71,87,0.15);
  color: var(--danger);
  border: 1px solid rgba(255,71,87,0.3);
}

.badge-warning {
  background: rgba(255,165,2,0.15);
  color: var(--warning);
  border: 1px solid rgba(255,165,2,0.3);
}

.badge-info {
  background: rgba(59,158,255,0.15);
  color: var(--info);
  border: 1px solid rgba(59,158,255,0.3);
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  height: var(--header-height);
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

.page-title {
  font-family: var(--font-game);
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #D4AF37, #FFD700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.1em;
}

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(5,5,5,0.97);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-top: 1px solid var(--border-gold);
  display: flex;
  align-items: stretch;
  z-index: 500;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.8), 0 -1px 0 rgba(212,175,55,0.1);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.nav-item.active {
  color: var(--gold);
}

.nav-item.active .nav-icon {
  color: var(--gold);
  filter: drop-shadow(0 0 8px rgba(212,175,55,0.8));
}

.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 0 0 2px 2px;
}

.nav-icon {
  font-size: 1.4rem;
  transition: var(--transition);
}

.nav-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-item:hover {
  color: rgba(212,175,55,0.7);
}

/* ── Mining Nav Center Button ── */
.nav-item.nav-mining {
  position: relative;
}

.nav-mining-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D4AF37, #FFD700, #B8860B);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(212,175,55,0.6), 0 4px 15px rgba(0,0,0,0.5);
  margin-bottom: 2px;
  transition: var(--transition);
}

.nav-mining-btn .nav-icon {
  color: #000 !important;
  font-size: 1.5rem;
  filter: none !important;
}

.nav-item.nav-mining.active .nav-mining-btn,
.nav-item.nav-mining:hover .nav-mining-btn {
  box-shadow: 0 0 30px rgba(212,175,55,0.9), 0 4px 20px rgba(0,0,0,0.6);
  transform: scale(1.05);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
  margin: 20px 0;
}

/* ── Toast Notification ── */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
  pointer-events: all;
  border: 1px solid;
}

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

.toast-success {
  background: rgba(0,200,150,0.15);
  border-color: rgba(0,200,150,0.3);
  color: var(--success);
}

.toast-error {
  background: rgba(255,71,87,0.15);
  border-color: rgba(255,71,87,0.3);
  color: var(--danger);
}

.toast-warning {
  background: rgba(255,165,2,0.15);
  border-color: rgba(255,165,2,0.3);
  color: var(--warning);
}

.toast-info {
  background: rgba(212,175,55,0.12);
  border-color: rgba(212,175,55,0.3);
  color: var(--gold);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-20px) scale(0.9); }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 800;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #0D0D0D;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px;
  transform: translateY(100%);
  transition: var(--transition);
  box-shadow: 0 -8px 40px rgba(212,175,55,0.2);
  position: relative;
}

.modal-overlay.show .modal {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border-gold);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.modal-title {
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(90deg, rgba(212,175,55,0.06) 25%, rgba(212,175,55,0.12) 50%, rgba(212,175,55,0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Status Pills ── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-pending { background: rgba(255,165,2,0.12); color: var(--warning); border: 1px solid rgba(255,165,2,0.25); }
.status-approved, .status-success { background: rgba(0,200,150,0.12); color: var(--success); border: 1px solid rgba(0,200,150,0.25); }
.status-rejected { background: rgba(255,71,87,0.12); color: var(--danger); border: 1px solid rgba(255,71,87,0.25); }
.status-processing { background: rgba(59,158,255,0.12); color: var(--info); border: 1px solid rgba(59,158,255,0.25); }

/* ── Section Title ── */
.section-title {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-gold), transparent);
}

/* ── Rupiah Format ── */
.rupiah {
  font-family: var(--font-game);
  font-weight: 700;
  background: linear-gradient(135deg, #D4AF37, #FFD700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Avatar Ring ── */
.avatar-wrapper {
  position: relative;
  display: inline-block;
}

.avatar-img {
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.avatar-ring-default {
  border: 2px solid rgba(255,255,255,0.2);
}

.avatar-ring-platinum {
  border: 3px solid;
  border-image: linear-gradient(135deg, #4FC3F7, #D4AF37) 1;
  border-radius: 50% !important;
  box-shadow: 0 0 15px rgba(79,195,247,0.5), 0 0 15px rgba(212,175,55,0.3);
}

.avatar-ring-vip {
  border: 3px solid var(--gold);
  box-shadow: 0 0 20px rgba(212,175,55,0.7), 0 0 40px rgba(212,175,55,0.3);
}

.avatar-ring-vvip {
  border: 3px solid transparent;
  background: linear-gradient(#000, #000) padding-box,
              linear-gradient(135deg, #D4AF37, #B9F2FF, #D4AF37) border-box;
  box-shadow: 0 0 25px rgba(212,175,55,0.8), 0 0 50px rgba(212,175,55,0.4);
  animation: vvipRingPulse 2s ease-in-out infinite;
}

@keyframes vvipRingPulse {
  0%, 100% { box-shadow: 0 0 25px rgba(212,175,55,0.8), 0 0 50px rgba(212,175,55,0.4); }
  50% { box-shadow: 0 0 35px rgba(212,175,55,1), 0 0 70px rgba(212,175,55,0.6); }
}

/* ── Utility ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.px-20 { padding-left: 20px; padding-right: 20px; }
.py-16 { padding-top: 16px; padding-bottom: 16px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Gold Particle BG ── */
.particles-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: floatParticle linear infinite;
}

@keyframes floatParticle {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  10% { opacity: 0.6; }
  90% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* ── Gold Glow Pulse ── */
.glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: var(--shadow-gold); }
  50% { box-shadow: var(--shadow-gold-lg); }
}

/* ── Spinner ── */
.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--gold-dim);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Ripple Effect ── */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(212,175,55,0.3);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ── Content Padding ── */
.content {
  padding: 16px 20px;
}

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  gap: 12px;
}

.empty-state .material-icons-round {
  font-size: 3rem;
  color: var(--text-muted);
}

.empty-state p {
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  text-align: center;
}

/* ── Info Row ── */
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(212,175,55,0.08);
}

.info-row:last-child { border-bottom: none; }

.info-label {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.info-value {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

/* ── Countdown Timer ── */
.countdown {
  font-family: var(--font-game);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-align: center;
  filter: drop-shadow(0 0 10px rgba(212,175,55,0.6));
}

/* ── Progress Bar ── */
.progress-bar-wrapper {
  height: 6px;
  background: rgba(212,175,55,0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #D4AF37, #FFD700);
  border-radius: 3px;
  transition: width 0.5s ease;
  box-shadow: 0 0 8px rgba(212,175,55,0.6);
}

/* ── Copy UID ── */
.uid-text {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.uid-text:hover { color: var(--gold); }

/* ── Responsive ── */
@media (min-width: 480px) {
  .content { padding: 20px 24px; }
}

@media (min-width: 768px) {
  body { max-width: 480px; margin: 0 auto; }
  .bottom-nav { max-width: 480px; left: 50%; transform: translateX(-50%) ; }
  .toast-container { max-width: 440px; }
  }