:root {
  --bg-primary: #0d0f12;
  --bg-secondary: #161a22;
  --bg-card: rgba(26, 32, 44, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.05);
  
  --accent-gold: #f59e0b;
  --accent-orange: #ff6b00;
  --accent-neon: #10b981;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: var(--font-family);
  background: radial-gradient(circle at top, #1e2230 0%, #0d0f12 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-bottom: 75px;
}

/* Header bar */
.top-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: rgba(13, 15, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
}

.user-badge .avatar-icon {
  font-size: 20px;
}

.balances {
  display: flex;
  gap: 12px;
}

.pill-balance {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Main Container & Screens */
.screen-container {
  flex: 1;
  padding: 16px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.screen {
  display: none;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glass Card */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
}

/* Hero Avatar Section */
.hero-section {
  text-align: center;
  position: relative;
  padding: 24px 16px;
}

.tiger-avatar-box {
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
  border: 2px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  position: relative;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.25);
  animation: pulseAvatar 3s ease-in-out infinite alternate;
}

@keyframes pulseAvatar {
  0% { transform: scale(1); box-shadow: 0 0 20px rgba(245, 158, 11, 0.2); }
  100% { transform: scale(1.04); box-shadow: 0 0 35px rgba(245, 158, 11, 0.4); }
}

.tiger-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.tiger-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* Status Bars */
.stat-bar-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.stat-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
}

.fill-exp {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.fill-satiety {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.fill-health {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Quick Actions */
.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
}

.btn-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: #fff;
}

/* Hunt Boss Card */
.boss-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
}

.boss-icon {
  font-size: 38px;
}

.boss-info {
  flex: 1;
}

.boss-title {
  font-weight: 700;
  font-size: 15px;
}

.boss-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Inventory Grid */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.inv-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
  position: relative;
  transition: all 0.15s ease;
}

.inv-item:active {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--accent-gold);
}

.inv-item-icon {
  font-size: 32px;
  margin-bottom: 4px;
}

.inv-item-name {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-item-qty {
  font-size: 11px;
  color: var(--accent-gold);
  font-weight: 700;
  margin-top: 2px;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(13, 15, 18, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  max-width: 500px;
  margin: 0 auto;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s ease;
}

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

.nav-icon {
  font-size: 20px;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid var(--accent-gold);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
