* ============================================================
   GLOBAL FIXES — REQUIRED FOR ANDROID + MOBILE COMPATIBILITY
   ============================================================ */

/* Disable Android forced dark mode */
html {
  color-scheme: only light;
  forced-color-adjust: none;
  -webkit-text-size-adjust: 100%;
}

/* Theme variables (MUST be at top for Android compatibility) */
:root {
  --bg: #050505;
  --bg-panel: #111111;
  --bg-panel-alt: #181818;
  --gold: #d4af37;
  --gold-soft: #f5d76e;
  --text: #f5f5f5;
  --muted: #aaaaaa;
  --danger: #ff4d4d;
  --success: #00ff9c;
  --border: #2a2a2a;
}

/* Hard fallback for older devices */
body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ============================================================
   LAYOUT + BRAND HEADER
   ============================================================ */

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Spinning coin placed on the LEFT */
.brand-coin {
  width: 48px;
  height: 48px;
  position: relative;
  transform-style: preserve-3d;
  animation: spinCoin 3.5s linear infinite;
}

.brand-coin .coin-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  backface-visibility: hidden;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.35);
}

.brand-coin .coin-front {
  background-image: url("coin-front.png");
}

.brand-coin .coin-back {
  background-image: url("coin-back.png");
  transform: rotateY(180deg);
}

@keyframes spinCoin {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.nav a.active {
  border-color: var(--gold);
  color: var(--gold-soft);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* ============================================================
   PANELS
   ============================================================ */

.panel {
  background: linear-gradient(145deg, var(--bg-panel), var(--bg-panel-alt));
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}

.panel-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-soft);
}

.panel-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ============================================================
   STATUS DOTS
   ============================================================ */

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 6px rgba(255, 77, 77, 0.7);
}

.dot.ok {
  background: var(--success);
  box-shadow: 0 0 6px rgba(0, 255, 156, 0.7);
}

.dot.loading {
  background: var(--gold-soft);
  box-shadow: 0 0 6px rgba(245, 215, 110, 0.7);
}

/* ============================================================
   WALLET HEADER COIN
   ============================================================ */

.wallet-coin {
  width: 60px;
  height: 60px;
  position: relative;
  transform-style: preserve-3d;
  animation: spinCoin 3.5s linear infinite;
  cursor: pointer;
}

.wallet-coin .coin-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  backface-visibility: hidden;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.35);
}

.wallet-coin .coin-front {
  background-image: url("coin-front.png");
}

.wallet-coin .coin-back {
  background-image: url("coin-back.png");
  transform: rotateY(180deg);
}

.wallet-coin.online {
  box-shadow: 0 0 18px rgba(0, 255, 156, 0.6);
}

.wallet-coin.offline {
  box-shadow: 0 0 18px rgba(255, 77, 77, 0.6);
}

.wallet-coin.balance-pulse {
  animation: pulseGold 0.6s ease-out;
}

@keyframes pulseGold {
  0% { box-shadow: 0 0 4px rgba(212,175,55,0.2); }
  50% { box-shadow: 0 0 22px rgba(212,175,55,0.8); }
  100% { box-shadow: 0 0 4px rgba(212,175,55,0.2); }
}

.wallet-coin.fast-spin {
  animation: spinCoinFast 0.8s linear;
}

@keyframes spinCoinFast {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(720deg); }
}

/* ============================================================
   TABLES + INPUTS + BUTTONS
   ============================================================ */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.table th, .table td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
}

input, textarea {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #050505;
  color: var(--text);
}

.btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-soft);
  cursor: pointer;
}