* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  background: radial-gradient(circle at top, #241247 0%, var(--bg-deep) 68%);
  color: var(--text-primary);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* =========================================================
   GERBANG LOGIN GOOGLE (AUTH GATE)
   ========================================================= */
.auth-gate {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, var(--bg-card-elevated) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.auth-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 18px;
}

.auth-hero-img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  background: rgba(18, 9, 36, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px;
}

.auth-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.auth-subtitle {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.btn-secondary-demo {
  width: 100%;
  max-width: 300px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-gold);
  background: rgba(255, 190, 46, 0.1);
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-secondary-demo:hover {
  background: rgba(255, 190, 46, 0.18);
  transform: translateY(-1px);
}

.auth-note {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =========================================================
   APP SHELL & TOP HEADER
   ========================================================= */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 540px;
  margin: 0 auto;
  position: relative;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.user-mini-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--accent-gold);
  background: var(--bg-card);
  flex-shrink: 0;
}

.header-name {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.header-level-badge {
  font-size: 0.73rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.top-balances {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pill-balance {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.pill-rolling {
  border-color: var(--border-gold);
  color: var(--accent-gold);
}

.pill-doge {
  border-color: var(--border-doge);
  color: var(--accent-doge);
}

.pill-balance small {
  font-size: 0.65rem;
  opacity: 0.85;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot-gold {
  background: var(--accent-gold);
}

.dot-cyan {
  background: var(--accent-doge);
}

/* =========================================================
   AREA KONTEN UTAMA (VIEW CONTAINER)
   ========================================================= */
.view-container {
  flex: 1;
  padding: 16px 14px calc(var(--nav-height) + 24px);
}

.card {
  background: linear-gradient(180deg, var(--bg-card-elevated) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.muted-text {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Tombol Umum */
.btn-primary {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--accent-gold) 0%, var(--accent-gold-dark) 100%);
  color: #160a2c;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
}

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

/* =========================================================
   BOTTOM NAVIGATION (6 MENU UTAMA)
   ========================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 540px;
  height: var(--nav-height);
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-subtle);
  padding: 4px 4px env(safe-area-inset-bottom, 6px);
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 700;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-item .nav-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  transition: transform 0.15s ease;
}

.nav-item .nav-emoji {
  font-size: 1.25rem;
  line-height: 26px;
  height: 26px;
}

.nav-item.active {
  color: var(--accent-gold);
  background: rgba(255, 190, 46, 0.12);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px) scale(1.06);
}
