@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Orbitron:wght@600;700;800&display=swap');

:root {
  --primary-color: #a855f7;
  --primary-light: #c084fc;
  --primary-dark: #7e22ce;
  --bg-deep: #0a0605;
  --bg-card: rgba(12, 8, 18, 0.88);
  --bg-sidebar: rgba(14, 6, 4, 0.96);
  --border: color-mix(in srgb, var(--primary-color) 12%, transparent);
  --border-glow: color-mix(in srgb, var(--primary-color) 50%, transparent);
  --accent: var(--primary-color);
  --accent-light: var(--primary-light);
  --accent-dark: var(--primary-dark);
  --gold: #ffb347;
  --green: #2ecc71;
  --text: #f5ebe8;
  --text-muted: #b89588;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --glass: blur(12px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, color-mix(in srgb, var(--primary-color) 18%, transparent), transparent),
    radial-gradient(ellipse 60% 50% at 80% 80%, color-mix(in srgb, var(--primary-dark) 14%, transparent), transparent),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 140, 0, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; text-decoration: none; }

.win-feed-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  backdrop-filter: var(--glass);
  border-right: 1px solid var(--border);
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 10;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}

.win-feed-sidebar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary-dark), var(--primary-color), var(--gold));
}

.win-feed-header {
  padding: 20px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.win-feed-header h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: livePulse 2s ease infinite;
  box-shadow: 0 0 8px var(--primary-color);
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.win-feed-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.win-feed-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
}

.win-feed-item:hover {
  background: color-mix(in srgb, var(--primary-color) 12%, transparent);
  border-color: var(--border-glow);
  transform: translateX(4px);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary-color) 20%, transparent);
}

.win-feed-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.win-feed-item:hover .win-feed-avatar {
  border-color: var(--accent);
}

.win-feed-body { flex: 1; min-width: 0; }

.win-feed-name {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-feed-reward {
  font-size: 0.78rem;
  margin-top: 3px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-feed-case {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.win-feed-empty {
  padding: 32px 18px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.page-wrapper {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  margin-bottom: 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 6, 5, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  margin-left: -24px;
  margin-right: -24px;
  padding-left: 24px;
  padding-right: 24px;
}

#nav-user {
  margin-left: auto;
  flex-shrink: 0;
  min-width: 200px;
  display: flex;
  justify-content: flex-end;
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: 1px;
}
.logo-img { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-img img { height: 48px; width: 48px; max-width: 48px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(168, 85, 247, 0.35)); }
.logo-wordmark {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--primary-light);
  text-shadow: 0 0 12px color-mix(in srgb, var(--primary-color) 50%, transparent);
  white-space: nowrap;
}
.logo-img:hover img { opacity: 0.92; }
.coin-icon { display: inline-block; vertical-align: -2px; margin-left: 2px; }
.logo:hover { opacity: 0.9; }

nav { display: flex; gap: 12px; align-items: center; }

.header-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: color-mix(in srgb, var(--primary-color) 10%, transparent);
  border: 2px solid color-mix(in srgb, var(--primary-color) 35%, transparent);
  border-radius: 50px;
  padding: 6px 8px 6px 8px;
  box-shadow: 0 4px 20px rgba(255, 69, 0, 0.15);
}

.header-profile-guest {
  border-style: dashed;
  opacity: 0.95;
}

.header-avatar-guest {
  opacity: 0.7;
  filter: grayscale(0.4);
}

.nav-balance-guest {
  color: var(--text-muted) !important;
}

.header-avatar-link { display: flex; line-height: 0; order: -1; align-items: center; }

.header-avatar-wrap {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  padding: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex-shrink: 0;
  line-height: 0;
}

.header-frame-default {
  background: transparent;
  border: 2px solid var(--accent);
  padding: 2px;
}

.header-avatar-wrap[class*="frame-"] {
  border: none;
}

.header-avatar-wrap .header-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  box-shadow: none;
  display: block;
  background: transparent;
}

.header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  transition: all 0.2s;
  box-shadow: 0 0 14px color-mix(in srgb, var(--primary-color) 40%, transparent);
}

.header-avatar-link:hover .header-avatar-wrap .header-avatar {
  transform: scale(1.05);
}

.header-avatar-link:hover .header-avatar-wrap {
  filter: brightness(1.1);
}

.nav-balance {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.95rem;
  font-family: 'Orbitron', sans-serif;
  white-space: nowrap;
}

.btn-donate {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #fff;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 50px;
  border: none;
  font-size: 0.85rem;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary-color) 35%, transparent);
}

.btn-donate:hover {
  box-shadow: 0 6px 24px rgba(255, 69, 0, 0.5);
  transform: translateY(-2px);
  color: #fff;
}

.btn-donate-guest {
  opacity: 0.75;
}

.btn-login {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: #fff;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 50px;
  border: none;
  font-size: 0.82rem;
  box-shadow: 0 4px 14px rgba(255, 87, 34, 0.3);
  white-space: nowrap;
}

.btn-login:hover {
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 69, 0, 0.45);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary-color) 35%, transparent);
}

.btn-success {
  background: linear-gradient(135deg, #ff8a50, #ff5722);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 140, 0, 0.3);
}

.btn-danger { background: linear-gradient(135deg, #ed4245, #c0392b); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #fee75c, #f1c40f); color: #000; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-sm { padding: 8px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

.hero-compact {
  text-align: center;
  padding: 16px 0 28px;
}

.hero-compact p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 520px;
  margin: 0 auto;
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  scroll-margin-top: 80px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 1px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-glow), transparent);
}

.daily-case-card {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.12) 0%, rgba(255, 69, 0, 0.08) 100%);
  border: 2px solid rgba(255, 87, 34, 0.55);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  margin-bottom: 36px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(255, 87, 34, 0.15), var(--shadow);
}

.daily-case-card::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 87, 34, 0.1), transparent 30%);
  animation: dailySpin 8s linear infinite;
}

@keyframes dailySpin {
  to { transform: rotate(360deg); }
}

.daily-case-inner {
  position: relative;
  z-index: 1;
}

.daily-case-card.claimed {
  border-color: var(--border);
  opacity: 0.9;
}

.daily-case-card.claimed::before {
  animation: none;
  opacity: 0;
}

.daily-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ff8a50, #ff5722);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Orbitron', sans-serif;
}

.daily-icon {
  font-size: 4rem;
  margin: 8px 0;
  filter: drop-shadow(0 0 20px rgba(255, 87, 34, 0.5));
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.daily-case-card h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.daily-desc { color: var(--text-muted); margin: 8px 0 20px; }

.daily-timer {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  font-family: 'Orbitron', sans-serif;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.case-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  transition: all 0.3s ease;
  overflow: hidden;
}

.case-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--tier-color, var(--accent));
  opacity: 0.8;
}

.case-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 24px rgba(255, 87, 34, 0.12);
}

.case-card.tier-budget { --tier-color: #95a5a6; }
.case-card.tier-common { --tier-color: #2ecc71; }
.case-card.tier-rare { --tier-color: #3498db; }
.case-card.tier-epic { --tier-color: #9b59b6; }
.case-card.tier-legend { --tier-color: #f1c40f; }

.case-icon {
  font-size: 3.2rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.case-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.case-desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 12px;
  min-height: 2.5em;
}

.case-price {
  font-family: 'Orbitron', sans-serif;
  color: var(--gold);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 12px 0 16px;
}

.case-drops {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-bottom: 16px;
  min-height: 48px;
}

.drop-chip {
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}

.drop-chip.rarity-uncommon { border-color: rgba(46, 204, 113, 0.4); color: #2ecc71; }
.drop-chip.rarity-rare { border-color: rgba(52, 152, 219, 0.4); color: #3498db; }
.drop-chip.rarity-epic { border-color: rgba(155, 89, 182, 0.4); color: #9b59b6; }
.drop-chip.rarity-legendary { border-color: rgba(241, 196, 15, 0.4); color: #f1c40f; }

.profile-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}

.profile-card > * { position: relative; z-index: 1; }

.profile-luck-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px auto 4px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 25%, #1a1a2e), color-mix(in srgb, #2ecc71 20%, #1a1a2e));
  border: 1px solid color-mix(in srgb, #2ecc71 45%, var(--accent));
  box-shadow: 0 0 16px color-mix(in srgb, #2ecc71 30%, transparent);
}
.profile-luck-icon { font-size: 1.1rem; }
.profile-luck-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.profile-luck-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #2ecc71;
  text-shadow: 0 0 8px color-mix(in srgb, #2ecc71 50%, transparent);
}

.shop-type-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 999px;
}

.bg-midnight::before { background: linear-gradient(135deg, #0a0a20, #1a1a40); }
.bg-neon-grid::before {
  background:
    linear-gradient(rgba(0,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,255,0.08) 1px, transparent 1px),
    linear-gradient(135deg, #0a1020, #1a0040);
  background-size: 24px 24px, 24px 24px, 100% 100%;
}
.bg-sunset::before { background: linear-gradient(135deg, #ff6b35, #f7c59f, #2a1a3e); }
.bg-forest::before { background: linear-gradient(135deg, #0d2818, #1a4a2e, #0a1a10); }
.bg-void::before { background: radial-gradient(circle at 50% 30%, #2a0050, #0a0a15); }
.bg-aurora::before {
  background: linear-gradient(135deg, #00ff88, #5865f2, #ff00ff, #0a0a20);
  animation: auroraShift 8s ease infinite;
}
.bg-ocean::before { background: linear-gradient(135deg, #001a33, #003366, #006994); }
.bg-lava::before { background: linear-gradient(135deg, #1a0000, #4a0000, #ff4500); animation: auroraShift 6s ease infinite; }
.bg-sakura::before { background: linear-gradient(135deg, #2a1020, #ffb7c5, #ff69b4); }
.bg-thunder::before { background: linear-gradient(135deg, #0a0a20, #1a1a40, #5865f2); }
.bg-cosmic::before { background: radial-gradient(circle at 30% 40%, #667eea, #0a0a20 70%); }
.bg-matrix::before {
  background:
    linear-gradient(rgba(0,255,0,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,0,0.12) 1px, transparent 1px),
    linear-gradient(135deg, #001100, #002200);
  background-size: 20px 20px, 20px 20px, 100% 100%;
}
.bg-blood_moon::before { background: radial-gradient(circle at 50% 20%, #8b0000, #1a0000); }
.bg-galaxy::before { background: radial-gradient(ellipse at center, #764ba2, #0a0a20 60%); animation: auroraShift 10s ease infinite; }
.bg-desert::before { background: linear-gradient(135deg, #c68642, #e6a857, #2a1810); }
.bg-ice_cave::before { background: linear-gradient(135deg, #a8d8ea, #6bb3d9, #1a3a4a); }

@keyframes auroraShift {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.45; }
}

.avatar-wrap {
  width: 130px;
  height: 130px;
  margin: 0 auto 20px;
  border-radius: 50%;
  padding: 5px;
  background: #333;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-card .avatar-wrap {
  width: 130px;
  height: 130px;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: transparent;
}

.frame-bronze { background: linear-gradient(135deg, #cd7f32, #8b4513); box-shadow: 0 0 16px #cd7f32; border-radius: 50%; }
.frame-silver { background: linear-gradient(135deg, #c0c0c0, #808080); box-shadow: 0 0 16px #c0c0c0; border-radius: 50%; }
.frame-neon { background: linear-gradient(135deg, #0ff, #f0f); box-shadow: 0 0 24px #0ff; animation: pulse 2s infinite; border-radius: 50%; }
.frame-dragon { background: linear-gradient(135deg, #ff4500, #ffd700); box-shadow: 0 0 24px #ff4500; }
.frame-mythic { background: linear-gradient(135deg, #9b59b6, #e74c3c, #f1c40f); box-shadow: 0 0 28px #9b59b6; animation: pulse 1.5s infinite; }
.frame-emerald { background: linear-gradient(135deg, #2ecc71, #27ae60); box-shadow: 0 0 18px #2ecc71; border-radius: 50%; }
.frame-ruby { background: linear-gradient(135deg, #e74c3c, #c0392b); box-shadow: 0 0 18px #e74c3c; }
.frame-frost { background: linear-gradient(135deg, #a8d8ea, #6bb3d9); box-shadow: 0 0 20px #a8d8ea; }
.frame-shadow { background: linear-gradient(135deg, #2c2c54, #474787); box-shadow: 0 0 22px #474787; }
.frame-crystal { background: linear-gradient(135deg, #e0f7fa, #80deea, #4dd0e1); box-shadow: 0 0 24px #4dd0e1; animation: pulse 2.5s infinite; }
.frame-plasma { background: linear-gradient(135deg, #7b2ff7, #00d4ff); box-shadow: 0 0 22px #7b2ff7; animation: pulse 2s infinite; }
.frame-lava { background: linear-gradient(135deg, #ff4e00, #ff0000, #ff8800); box-shadow: 0 0 24px #ff4e00; }
.frame-ocean { background: linear-gradient(135deg, #0077be, #00bcd4); box-shadow: 0 0 20px #0077be; }
.frame-sakura { background: linear-gradient(135deg, #ffb7c5, #ff69b4); box-shadow: 0 0 18px #ffb7c5; }
.frame-thunder { background: linear-gradient(135deg, #ffd700, #fff, #5865f2); box-shadow: 0 0 26px #ffd700; animation: pulse 1.8s infinite; }
.frame-cosmic { background: linear-gradient(135deg, #667eea, #764ba2, #f093fb); box-shadow: 0 0 28px #764ba2; animation: pulse 2.2s infinite; }
.frame-vampire { background: linear-gradient(135deg, #8b0000, #2c003e); box-shadow: 0 0 22px #8b0000; }
.frame-hologram { background: linear-gradient(135deg, #00ffff, #ff00ff, #ffff00); box-shadow: 0 0 24px #00ffff; animation: pulse 1.5s infinite; }
.frame-golden_crown { background: linear-gradient(135deg, #ffd700, #ffec8b, #daa520); box-shadow: 0 0 30px #ffd700; animation: pulse 2s infinite; }
.frame-inferno { background: linear-gradient(135deg, #ff0000, #ff6600, #ffcc00); box-shadow: 0 0 30px #ff3300; animation: pulse 1.2s infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.75; } }

.profile-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.name-cyan { color: #0ff; text-shadow: 0 0 12px #0ff; }
.name-purple { color: #b57edc; text-shadow: 0 0 12px #b57edc; }
.name-gold { color: #ffd700; text-shadow: 0 0 16px #ffd700; }
.name-red { color: #ff4444; text-shadow: 0 0 12px #ff4444; }
.name-lime { color: #57f287; text-shadow: 0 0 12px #57f287; }
.name-pink { color: #ff69b4; text-shadow: 0 0 12px #ff69b4; }
.name-ice { color: #a8d8ea; text-shadow: 0 0 14px #a8d8ea; }

.stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 28px;
  min-width: 120px;
}

.stat-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
}

.stat-label { color: var(--text-muted); font-size: 0.8rem; margin-top: 4px; }

.cosmetics-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.cosmetic-tag {
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: 50px;
  background: rgba(255, 87, 34, 0.15);
  border: 1px solid rgba(255, 87, 34, 0.35);
  color: var(--accent-light);
}

.inventory { margin-top: 36px; text-align: left; }

.inventory h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  flex-wrap: wrap;
  gap: 10px;
  transition: background 0.2s;
}

.item:hover { background: rgba(255, 255, 255, 0.06); }

.item-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.rarity-common { border-left-color: #95a5a6; }
.rarity-uncommon { border-left-color: #2ecc71; }
.rarity-rare { border-left-color: #3498db; }
.rarity-epic { border-left-color: #9b59b6; }
.rarity-legendary { border-left-color: #f1c40f; }

.feed-rarity-common { color: #95a5a6; }
.feed-rarity-uncommon { color: #2ecc71; }
.feed-rarity-rare { color: #3498db; }
.feed-rarity-epic { color: #9b59b6; }
.feed-rarity-legendary { color: #f1c40f; }

.result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.result-overlay.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.spin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 2, 1, 0.92);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.spin-overlay.show {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.spin-panel {
  width: min(720px, 96vw);
  background: color-mix(in srgb, var(--bg-deep) 85%, var(--primary-color) 8%) !important;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--primary-color) 40%, transparent);
  border-radius: var(--radius-lg);
  padding: 28px 20px 32px;
  box-shadow: var(--shadow);
}

.spin-title {
  font-family: 'Orbitron', sans-serif;
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--accent-light);
}

.spin-viewport {
  position: relative;
  overflow: hidden;
  height: 130px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
}

.spin-viewport::before,
.spin-viewport::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.spin-viewport::before {
  left: 0;
  background: linear-gradient(90deg, rgba(10, 6, 5, 0.95), transparent);
}

.spin-viewport::after {
  right: 0;
  background: linear-gradient(-90deg, rgba(10, 6, 5, 0.95), transparent);
}

.spin-pointer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  z-index: 3;
  box-shadow: 0 0 12px var(--accent);
}

.spin-track {
  display: flex;
  align-items: stretch;
  height: 100%;
  will-change: transform;
}

.spin-item {
  flex: 0 0 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.spin-item.rarity-uncommon { background: rgba(46, 204, 113, 0.06); }
.spin-item.rarity-rare { background: rgba(52, 152, 219, 0.08); }
.spin-item.rarity-epic { background: rgba(155, 89, 182, 0.1); }
.spin-item.rarity-legendary { background: rgba(241, 196, 15, 0.12); }

.spin-emoji {
  font-size: 2rem;
  line-height: 1;
}

.spin-label {
  font-size: 0.72rem;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.2;
  max-width: 120px;
}

.spin-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 130px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.admin-hint {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(254, 231, 92, 0.08);
  border: 1px dashed rgba(254, 231, 92, 0.35);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: #fee75c;
  text-align: center;
}

.result-modal {
  background: color-mix(in srgb, var(--bg-deep) 85%, var(--primary-color) 8%) !important;
  border: 2px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  color: var(--text);
  box-shadow: 0 0 60px color-mix(in srgb, var(--primary-color) 25%, transparent);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.result-icon { font-size: 4rem; margin-bottom: 16px; animation: floatIcon 2s ease infinite; }

.result-reward-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  margin: 12px 0;
}

.result-rarity {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.admin-panel {
  margin-top: 40px;
  padding: 28px;
  background: color-mix(in srgb, var(--bg-deep) 85%, var(--primary-color) 8%) !important;
  border: 2px dashed color-mix(in srgb, var(--primary-color) 45%, transparent);
  color: var(--text);
  border-radius: var(--radius-lg);
}

.admin-panel h2 { color: #ed4245; margin-bottom: 16px; font-family: 'Orbitron', sans-serif; }
.admin-section { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.admin-section h3 { margin-bottom: 10px; font-size: 0.95rem; color: #fee75c; }
.admin-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }

input, select {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.2);
}

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 0.85rem; }

.shop-form {
  max-width: 440px;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: var(--glass);
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.shop-page-title {
  font-family: 'Orbitron', sans-serif;
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.preview {
  margin-top: 16px;
  padding: 14px;
  background: rgba(255, 87, 34, 0.1);
  border: 1px solid rgba(255, 87, 34, 0.25);
  border-radius: var(--radius);
  color: var(--accent-light);
}

.result-overlay.show {
  display: flex;
  animation: fadeIn 0.25s ease;
}

/* Case spin roulette */
.spin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 2, 1, 0.92);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.spin-overlay.show {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.spin-panel {
  width: min(720px, 96vw);
  background: color-mix(in srgb, var(--bg-deep) 85%, var(--primary-color) 8%) !important;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--primary-color) 40%, transparent);
  border-radius: var(--radius-lg);
  padding: 28px 20px 32px;
  box-shadow: var(--shadow);
}

.spin-title {
  font-family: 'Orbitron', sans-serif;
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--accent-light);
}

.spin-viewport {
  position: relative;
  overflow: hidden;
  height: 130px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
}

.spin-viewport::before,
.spin-viewport::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.spin-viewport::before {
  left: 0;
  background: linear-gradient(90deg, rgba(10, 6, 5, 0.95), transparent);
}

.spin-viewport::after {
  right: 0;
  background: linear-gradient(-90deg, rgba(10, 6, 5, 0.95), transparent);
}

.spin-pointer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  z-index: 3;
  box-shadow: 0 0 12px var(--accent);
}

.spin-track {
  display: flex;
  align-items: stretch;
  height: 100%;
  will-change: transform;
}

.spin-item {
  flex: 0 0 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.spin-item.rarity-uncommon { background: rgba(46, 204, 113, 0.06); }
.spin-item.rarity-rare { background: rgba(52, 152, 219, 0.08); }
.spin-item.rarity-epic { background: rgba(155, 89, 182, 0.1); }
.spin-item.rarity-legendary { background: rgba(241, 196, 15, 0.12); }

.spin-emoji {
  font-size: 2rem;
  line-height: 1;
}

.spin-label {
  font-size: 0.72rem;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.2;
  max-width: 120px;
}

.spin-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 130px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.admin-hint {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(254, 231, 92, 0.08);
  border: 1px dashed rgba(254, 231, 92, 0.35);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: #fee75c;
  text-align: center;
}

.frame-plasma { background: linear-gradient(135deg, #7b2ff7, #00d4ff); box-shadow: 0 0 22px #7b2ff7; animation: pulse 2s infinite; }
.frame-lava { background: linear-gradient(135deg, #ff4e00, #ff0000, #ff8800); box-shadow: 0 0 24px #ff4e00; }
.frame-ocean { background: linear-gradient(135deg, #0077be, #00bcd4); box-shadow: 0 0 20px #0077be; }
.frame-sakura { background: linear-gradient(135deg, #ffb7c5, #ff69b4); box-shadow: 0 0 18px #ffb7c5; }
.frame-thunder { background: linear-gradient(135deg, #ffd700, #fff, #5865f2); box-shadow: 0 0 26px #ffd700; animation: pulse 1.8s infinite; }
.frame-cosmic { background: linear-gradient(135deg, #667eea, #764ba2, #f093fb); box-shadow: 0 0 28px #764ba2; animation: pulse 2.2s infinite; }
.frame-vampire { background: linear-gradient(135deg, #8b0000, #2c003e); box-shadow: 0 0 22px #8b0000; }
.frame-hologram { background: linear-gradient(135deg, #00ffff, #ff00ff, #ffff00); box-shadow: 0 0 24px #00ffff; animation: pulse 1.5s infinite; }
.frame-golden_crown { background: linear-gradient(135deg, #ffd700, #ffec8b, #daa520); box-shadow: 0 0 30px #ffd700; animation: pulse 2s infinite; }
.frame-inferno { background: linear-gradient(135deg, #ff0000, #ff6600, #ffcc00); box-shadow: 0 0 30px #ff3300; animation: pulse 1.2s infinite; }

.bg-ocean::before { background: linear-gradient(135deg, #001a33, #003366, #006994); }
.bg-lava::before { background: linear-gradient(135deg, #1a0000, #4a0000, #ff4500); animation: auroraShift 6s ease infinite; }
.bg-sakura::before { background: linear-gradient(135deg, #2a1020, #ffb7c5, #ff69b4); }
.bg-thunder::before { background: linear-gradient(135deg, #0a0a20, #1a1a40, #5865f2); }
.bg-cosmic::before { background: radial-gradient(circle at 30% 40%, #667eea, #0a0a20 70%); }
.bg-matrix::before {
  background:
    linear-gradient(rgba(0,255,0,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,0,0.12) 1px, transparent 1px),
    linear-gradient(135deg, #001100, #002200);
  background-size: 20px 20px, 20px 20px, 100% 100%;
}
.bg-blood_moon::before { background: radial-gradient(circle at 50% 20%, #8b0000, #1a0000); }
.bg-galaxy::before { background: radial-gradient(ellipse at center, #764ba2, #0a0a20 60%); animation: auroraShift 10s ease infinite; }
.bg-desert::before { background: linear-gradient(135deg, #c68642, #e6a857, #2a1810); }
.bg-ice_cave::before { background: linear-gradient(135deg, #a8d8ea, #6bb3d9, #1a3a4a); }

.name-red { color: #ff4444; text-shadow: 0 0 12px #ff4444; }
.name-lime { color: #57f287; text-shadow: 0 0 12px #57f287; }
.name-pink { color: #ff69b4; text-shadow: 0 0 12px #ff69b4; }
.name-ice { color: #a8d8ea; text-shadow: 0 0 14px #a8d8ea; }

.case-result { display: none; }

#error-msg {
  display: none;
  background: rgba(237, 66, 69, 0.15);
  border: 1px solid rgba(237, 66, 69, 0.4);
  color: #ff6b6b;
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  text-align: center;
}

.claim-code {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  padding: 18px;
  border-radius: var(--radius);
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 16px 0;
  word-break: break-all;
}

footer {
  text-align: center;
  padding: 40px 0 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.loading-text {
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
  font-size: 0.95rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.logo-animated {
  background: linear-gradient(90deg, var(--accent-light), #fff, var(--accent-light));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: logoShine 4s linear infinite;
}
@keyframes logoShine { to { background-position: 200% center; } }

.avatar-frame-animated {
  padding: 3px !important;
  background: linear-gradient(135deg, var(--accent), #ffd700, var(--accent)) !important;
  background-size: 200% 200% !important;
  animation: frameRotate 3s linear infinite;
}
@keyframes frameRotate {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.cases-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.category-tabs { display: flex; gap: 8px; }
.category-tab {
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}
.category-tab.active { border-color: var(--accent); background: rgba(255,87,34,0.15); }
.bulk-select-wrap { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }

.case-skin-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  overflow: hidden;
}
.case-skin-preview img { width: 100%; height: 48px; object-fit: cover; background: #1a0a08; }

.daily-choice-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }

.list-interactive .list-item,
.list-item.item,
.shop-card,
.upgrade-skin-pick {
  color: #fff;
  transition: color 0.2s, background 0.2s, font-weight 0.2s;
}
.list-interactive .list-item:hover,
.list-item.item:hover,
.upgrade-skin-pick:hover,
.upgrade-target-pick:hover {
  color: #ed4245;
  font-weight: 600;
  background: rgba(237, 66, 69, 0.08);
  border-color: #ed4245;
  box-shadow: 0 0 10px rgba(237, 66, 69, 0.2);
}
.shop-card:hover h3,
.shop-card:hover p {
  color: #ed4245;
}
.case-drop-row:hover .case-drop-name {
  color: #ed4245;
}
.shop-card:hover {
  border-color: #ed4245;
  box-shadow: 0 0 10px rgba(237, 66, 69, 0.2);
}

.item-tooltip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 160px;
  max-width: 240px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.88) !important;
  border: 1px solid color-mix(in srgb, var(--primary-color) 40%, transparent);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  color: var(--text);
  z-index: 3000;
  pointer-events: none;
  text-align: center;
}
.list-item:hover .item-tooltip,
.case-drop-row:hover .item-tooltip,
.shop-card:hover .item-tooltip { display: block; animation: tooltipFade 0.2s ease; }
.item-tooltip-name { display: block; font-weight: 600; color: var(--gold); font-size: 0.85rem; }
.item-tooltip-rarity { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: capitalize; }
.item-tooltip-value { display: block; font-size: 0.8rem; color: var(--accent-light); margin-top: 4px; }
.item-tooltip-type { display: block; font-size: 0.7rem; color: var(--text-muted); }
@keyframes tooltipFade { from { opacity: 0; transform: translateX(-50%) translateY(4px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

.upgrade-wheel-wrap { position: relative; width: 280px; height: 280px; margin: 0 auto; }
.upgrade-wheel-wrap canvas { display: block; width: 100%; height: 100%; }
.upgrade-wheel-hand {
  position: absolute;
  inset: 0;
  width: 280px;
  height: 280px;
  pointer-events: none;
  z-index: 2;
  transform: rotate(0deg);
  transform-origin: 140px 140px;
}
.wheel-hand-line { stroke: var(--gold); stroke-width: 4; stroke-linecap: round; }
.wheel-hand-tip { fill: var(--gold); }
.wheel-hand-hub { fill: #2a2a32; stroke: #888; stroke-width: 2; }
.upgrade-target-list { max-height: 320px; overflow-y: auto; }
.upgrade-target-pick { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(255,255,255,0.03); cursor: pointer; text-align: left; color: #fff; position: relative; transition: border-color 0.2s, box-shadow 0.2s; }
.upgrade-target-pick img { width: 44px; height: 32px; object-fit: contain; }
.upgrade-target-pick.active {
  border-color: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 50%, transparent), inset 0 0 8px color-mix(in srgb, var(--accent) 15%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, rgba(255,255,255,0.03));
}
.upgrade-target-selected-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  vertical-align: middle;
}
.upgrade-target-name { flex: 1; min-width: 0; }
.upgrade-target-img { width: 120px; height: 90px; object-fit: contain; display: block; margin: 0 auto 8px; }
.staff-badge { display: inline-block; background: linear-gradient(90deg, var(--accent), var(--gold)); color: #111; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-bottom: 6px; }

.daily-eligible .daily-badge { animation: dailyPulse 2s ease infinite; }
@keyframes dailyPulse { 0%, 100% { box-shadow: 0 0 0 rgba(255, 179, 71, 0); } 50% { box-shadow: 0 0 16px rgba(255, 179, 71, 0.45); } }
.daily-claim-burst { animation: dailyBurst 1.2s ease; }
@keyframes dailyBurst { 0% { transform: scale(1); } 40% { transform: scale(1.03); filter: brightness(1.2); } 100% { transform: scale(1); } }
@keyframes dailyReveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.result-modal { animation: dailyReveal 0.35s ease; }

.frame-ember { box-shadow: 0 0 12px #ff5722; animation: frameEmber 2s ease infinite; }
@keyframes frameEmber { 0%, 100% { box-shadow: 0 0 8px #ff5722; } 50% { box-shadow: 0 0 20px #ffb347; } }
.frame-aurora { animation: frameAurora 4s linear infinite; }
@keyframes frameAurora { 0% { filter: hue-rotate(0deg); } 100% { filter: hue-rotate(360deg); } }
.frame-pulse-gold { animation: framePulseGold 1.5s ease infinite; }
@keyframes framePulseGold { 0%, 100% { box-shadow: 0 0 6px var(--gold); } 50% { box-shadow: 0 0 18px var(--gold); } }
.frame-void-ring { box-shadow: 0 0 0 2px #1a1040, 0 0 16px #6a0dad; animation: frameVoid 3s ease infinite; }
@keyframes frameVoid { 50% { box-shadow: 0 0 0 2px #2a1850, 0 0 24px #9b59b6; } }
.frame-solar { background: linear-gradient(135deg, #ff5722, #ffb347, #ff5722) !important; background-size: 200% 200% !important; animation: frameSolar 2s linear infinite; }
@keyframes frameSolar { to { background-position: 200% center; } }

.admin-case-drops { max-height: 280px; overflow-y: auto; margin: 12px 0; }
.admin-drop-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.admin-drop-weight { width: 72px; padding: 4px 8px; border-radius: 6px; background: #1a0a08; color: #fff; border: 1px solid var(--border); }

.multi-spin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(5,2,1,0.95);
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.multi-spin-overlay.show { display: flex; }
.multi-spin-panel {
  width: min(720px, 96vw);
  background: color-mix(in srgb, var(--bg-deep) 85%, var(--primary-color) 8%) !important;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--primary-color) 40%, transparent);
  border-radius: var(--radius-lg);
}
.multi-spin-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 4px 0;
}
.multi-spin-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.multi-spin-row-label {
  flex: 0 0 28px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}
.multi-spin-row .multi-spin-viewport { flex: 1; height: 100px; }
.multi-spin-row { margin-bottom: 8px; }
.multi-spin-viewport {
  position: relative;
  overflow: hidden;
  height: 90px;
  border-radius: var(--radius);
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
}
.multi-spin-track { display: flex; height: 100%; }
.multi-spin-loading { color: var(--text-muted); text-align: center; padding: 40px; }
.bulk-single-viewport { width: 100%; max-width: 560px; margin: 0 auto; }
.bulk-single-track { display: flex; height: 100%; }
.multi-spin-counter { text-align: center; color: var(--gold); margin: 8px 0 12px; font-weight: 600; }
.upgrade-claim-area { margin-top: 16px; text-align: center; }
.upgrade-reward-pending { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(46,204,113,0.08); }

.spin-skin-img { width: 64px; height: 48px; object-fit: contain; }
.result-skin-img { max-width: 180px; max-height: 120px; margin: 12px auto; display: block; }

.bulk-wins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin: 16px 0; }
.bulk-win-item img { width: 100%; height: 60px; object-fit: contain; }

.upgrade-layout { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 20px; }
.upgrade-arrow { font-size: 3rem; text-align: center; color: var(--accent); font-weight: 900; }
.upgrade-skin-list { max-height: 400px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.upgrade-skin-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.upgrade-skin-pick img { width: 48px; height: 36px; object-fit: contain; }
.upgrade-skin-pick.active { border-color: var(--accent); }
.multiplier-btns { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.upgrade-chance { text-align: center; color: var(--gold); margin: 12px 0; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.shop-card { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); }
.shop-card-img { width: 100%; height: 100px; object-fit: contain; margin-bottom: 8px; }
.shop-deposit-banner { text-align: center; padding: 24px; margin-bottom: 32px; border: 1px dashed var(--accent); border-radius: var(--radius-lg); }
.shop-section { margin-bottom: 32px; }
.shop-test-pay { margin-top: 24px; color: var(--text-muted); }

.inv-skin-thumb { width: 48px; height: 36px; object-fit: contain; margin-right: 8px; }
.inv-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.inv-tab { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: #fff; cursor: pointer; }
.inv-tab.active { border-color: var(--accent); }

.admin-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-tab { padding: 8px 14px; border: 1px solid var(--border); background: transparent; color: #fff; border-radius: 8px; cursor: pointer; }
.admin-tab.active { background: rgba(255,87,34,0.2); border-color: var(--accent); }

.item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-dup { font-size: 0.75rem; color: var(--gold); font-weight: 700; }

.tab-count { font-size: 0.8rem; opacity: 0.75; margin-left: 4px; }

/* removed duplicate header-avatar-wrap block — see header section above */

.case-card-clickable { cursor: default; transition: transform 0.2s, box-shadow 0.2s; }
.case-card-clickable:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(255,87,34,0.25); }
.case-card-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 8px; text-align: center; }

.case-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(5,2,1,0.92);
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.case-detail-overlay.show { display: flex; }

.case-detail-panel {
  width: min(520px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  background: color-mix(in srgb, var(--bg-deep) 85%, var(--primary-color) 8%) !important;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--primary-color) 40%, transparent);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  z-index: 1;
}
.case-detail-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}
.case-detail-header { display: flex; gap: 16px; margin-bottom: 20px; align-items: flex-start; }
.case-detail-icon { font-size: 2.5rem; }
.case-detail-desc { color: var(--text-muted); font-size: 0.9rem; margin: 6px 0; }
.case-detail-price { color: var(--gold); margin-top: 8px; }
.case-detail-subtitle { margin: 16px 0 10px; font-size: 1rem; color: var(--accent-light); }
.case-drops-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; margin-top: 20px; margin-bottom: 0; }
.case-detail-actions-top {
  border-top: none;
  border-bottom: 1px solid var(--border);
  padding-top: 0;
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.profile-user-id {
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
}
.inv-list.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.inv-grid-item {
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  padding: 12px;
}
.inv-grid-item img {
  width: 100%;
  max-width: 120px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 8px;
}
.upgrade-target-range {
  font-size: 0.85rem;
  color: var(--gold);
  margin: 0 0 10px;
}
.admin-player-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.admin-player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
}
.admin-player-row:hover {
  border-color: #ed4245;
  color: #ed4245;
}
.case-drop-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  position: relative;
}
.drop-thumb { width: 48px; height: 36px; object-fit: contain; border-radius: 4px; }
.drop-thumb-emoji { font-size: 1.5rem; width: 48px; text-align: center; }
.case-drop-info { flex: 1; min-width: 0; }
.case-drop-type { display: block; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.case-drop-name { display: block; font-size: 0.9rem; color: #fff; }
.drop-value { font-size: 0.75rem; color: var(--gold); }
.case-drop-chance { font-weight: 700; color: var(--accent-light); min-width: 48px; text-align: right; }
.case-detail-actions { border-top: 1px solid var(--border); padding-top: 16px; }
.bulk-in-panel { display: block; margin-bottom: 10px; color: var(--text-muted); }
.bulk-count-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bulk-count-btn { min-width: 52px; padding: 8px 14px; font-weight: 600; }
.case-total-cost { margin: 12px 0; font-size: 1.1rem; }
.balance-hint { font-size: 0.85rem; color: var(--text-muted); margin-left: 8px; }
.case-cant-afford { color: #ed4245; font-size: 0.85rem; margin-top: 8px; }
.shop-empty { color: var(--text-muted); padding: 16px; text-align: center; }

@media (max-width: 768px) {
  .upgrade-layout { grid-template-columns: 1fr; }
  body { flex-direction: column; }
  .win-feed-sidebar {
    width: 100%;
    height: auto;
    max-height: 220px;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .win-feed-sidebar::before {
    width: 100%;
    height: 3px;
    left: 0;
    right: 0;
    bottom: auto;
  }
  header { position: relative; }
  .logo-img img { height: 40px; width: 40px; max-width: 40px; }
  .logo-wordmark { font-size: 0.9rem; }
  .cards { grid-template-columns: 1fr; }
  .header-profile { padding: 5px 5px 5px 10px; }
  .nav-balance { font-size: 0.85rem; }
}

/* Site theme picker */
.theme-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.theme-picker-overlay.show { display: flex; }
.theme-picker-box {
  background: color-mix(in srgb, var(--bg-deep) 85%, var(--primary-color) 8%) !important;
  border: 2px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  color: var(--text);
  box-shadow: 0 0 40px color-mix(in srgb, var(--primary-color) 25%, transparent);
}
.theme-picker-hint { color: var(--text-muted); font-size: 0.9rem; margin: 8px 0 16px; }
.theme-picker-box input[type="color"] {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  background: transparent;
}
.theme-color-preview {
  height: 40px;
  border-radius: var(--radius);
  margin: 12px 0 20px;
  border: 1px solid var(--border);
}
.theme-picker-actions { display: flex; gap: 10px; justify-content: center; }

/* Inventory search & bulk sell */
.inv-search-input {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 0.95rem;
}
.inv-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent);
}
.inv-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.inv-bulk-select-all { font-size: 0.85rem; color: var(--text-muted); cursor: pointer; }
.inv-bulk-check { margin-right: 6px; cursor: pointer; }
.inv-bulk-check input { width: 16px; height: 16px; accent-color: var(--accent); }

/* Daily claim chest animation */
.daily-chest-open {
  animation: dailyChestOpen 0.85s ease;
}
@keyframes dailyChestOpen {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 179, 71, 0); }
  35% { transform: scale(1.06); box-shadow: 0 0 32px rgba(255, 179, 71, 0.55), 0 0 0 8px color-mix(in srgb, var(--gold) 30%, transparent); }
  70% { transform: scale(1.02); box-shadow: 0 0 48px rgba(255, 179, 71, 0.35); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 179, 71, 0); }
}
.daily-reveal-item { animation: dailyReveal 0.4s ease backwards; }
.daily-reveal-item:nth-child(2) { animation-delay: 0.08s; }
.daily-reveal-item:nth-child(3) { animation-delay: 0.16s; }
.daily-reveal-item:nth-child(4) { animation-delay: 0.24s; }
.daily-reveal-item:nth-child(5) { animation-delay: 0.32s; }
.star { will-change: transform; transition: transform 0.1s linear; }

.bg-effect-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
  opacity: 0.85;
}
.profile-card > *:not(.bg-effect-layer) { position: relative; z-index: 1; }

.daily-gold-explosion { position: relative; overflow: visible; }
.daily-gold-burst {
  position: absolute;
  inset: -20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.daily-gold-burst.active { opacity: 1; }
.daily-gold-burst span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--gold);
  animation: dailyGoldParticle 1.2s ease-out forwards;
}
.daily-gold-burst::before,
.daily-gold-burst::after {
  content: '';
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0;
  pointer-events: none;
}
.daily-gold-burst.active::before { animation: dailyGoldRing 1.2s ease-out forwards; }
.daily-gold-burst.active::after { animation: dailyGoldRing 1.2s ease-out 0.15s forwards; }
@keyframes dailyGoldRing {
  0% { transform: scale(0.6); opacity: 0.85; }
  100% { transform: scale(1.8); opacity: 0; }
}
.daily-gold-burst span:nth-child(1) { animation-delay: 0s; --burst-angle: 0deg; }
.daily-gold-burst span:nth-child(2) { animation-delay: 0.05s; --burst-angle: 72deg; }
.daily-gold-burst span:nth-child(3) { animation-delay: 0.1s; --burst-angle: 144deg; }
.daily-gold-burst span:nth-child(4) { animation-delay: 0.15s; --burst-angle: 216deg; }
.daily-gold-burst span:nth-child(5) { animation-delay: 0.2s; --burst-angle: 288deg; }
@keyframes dailyGoldParticle {
  0% { transform: rotate(var(--burst-angle)) translateY(0) scale(1); opacity: 1; }
  100% { transform: rotate(var(--burst-angle)) translateY(-80px) scale(0.2); opacity: 0; }
}
@keyframes dailyGoldExplosionRing {
  0% { box-shadow: 0 0 0 0 rgba(255, 179, 71, 0.7); }
  50% { box-shadow: 0 0 0 24px rgba(255, 179, 71, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 179, 71, 0); }
}
.daily-gold-explosion.daily-chest-open { animation: dailyChestOpen 0.85s ease, dailyGoldExplosionRing 1.2s ease; }

/* Nickname cosmetic styles */
.nick-gold { color: #ffd700; text-shadow: 0 0 12px #ffd700; }
.nick-neon { color: var(--primary-light); text-shadow: 0 0 14px var(--primary-color); }
.nick-gradient {
  background: linear-gradient(90deg, var(--primary-color), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nick-custom { color: var(--nick-color, var(--gold)); text-shadow: 0 0 10px var(--nick-color, var(--gold)); }
.nick-custom-gradient,
.nick-grad-red-orange,
.nick-grad-green-yellow,
.nick-grad-blue-purple,
.nick-grad-gold-ice {
  background: linear-gradient(90deg, var(--nick-grad-start, var(--primary-color)), var(--nick-grad-end, var(--gold)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.gradient-picker-label { display: block; margin: 8px 0; color: var(--text-muted); font-size: 0.9rem; }
.gradient-picker-label input { width: 100%; height: 40px; margin-top: 4px; border: none; border-radius: var(--radius); cursor: pointer; }
.gradient-preview-text { font-family: 'Orbitron', sans-serif; font-size: 1.2rem; font-weight: 700; margin: 12px 0 20px; }
.case-discount-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ed4245, #fee75c);
  color: #111;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

.admin-shop-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 8px; }
.admin-shop-table th, .admin-shop-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.admin-shop-table input { width: 100%; min-width: 60px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--border); background: rgba(0,0,0,0.35); color: var(--text); }
.admin-shop-form { flex-wrap: wrap; }
.admin-shop-form input, .admin-shop-form select { flex: 1 1 120px; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border); background: rgba(0,0,0,0.35); color: var(--text); }

.admin-panel select option,
.admin-panel select optgroup {
  background: #141018;
  color: var(--text);
}
.admin-panel .item-tooltip,
.admin-panel [data-tooltip] {
  background: rgba(0, 0, 0, 0.88) !important;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--primary-color) 40%, transparent);
}

.inv-case-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  background: rgba(168, 85, 247, 0.12);
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--primary-color) 35%, transparent);
}

/* StalZone category tab accent */
.category-tab[data-category="stalzone"].active {
  border-color: #39ff14;
  background: rgba(57, 255, 20, 0.12);
}
.case-preview-emoji { font-size: 1.4rem; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; }

/* StalZone frames */
.frame-sz-radioactive { box-shadow: 0 0 12px #39ff14, inset 0 0 8px rgba(57,255,20,0.3); border: 2px solid #39ff14 !important; }
.frame-sz-rusty-steel { box-shadow: inset 0 0 10px rgba(139,90,43,0.5); border: 2px solid #8b5a2b !important; }
.frame-sz-anomaly-glow { box-shadow: 0 0 16px var(--primary-color), 0 0 24px #39ff14; border: 2px solid var(--primary-color) !important; animation: pulseGlow 2s infinite; }
.frame-sz-radiation { border: 2px dashed #39ff14 !important; background: rgba(57,255,20,0.08); }
.frame-sz-stalker { border: 2px solid #666 !important; box-shadow: 0 0 8px rgba(255,255,255,0.15); }
.frame-sz-hunter { border: 2px solid #ffd700 !important; box-shadow: 0 0 10px rgba(255,215,0,0.4); }
.frame-sz-monolith { border: 2px solid #888 !important; box-shadow: 0 0 20px rgba(200,200,255,0.5); }
.frame-sz-psi { border: 2px solid #a855f7 !important; box-shadow: 0 0 14px rgba(168,85,247,0.6); }

/* Case Battles */
.battle-hero { text-align: center; margin: 24px 0; }
.battle-subtitle { color: var(--text-muted); max-width: 520px; margin: 8px auto 0; }
.battle-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 40px; }
@media (max-width: 900px) { .battle-layout { grid-template-columns: 1fr; } }
.battle-panel { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.battle-panel h2 { margin: 0 0 16px; font-size: 1.1rem; }
.battle-case-picker { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; margin-bottom: 16px; }
.battle-case-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.battle-selection-summary { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 4px; }
.battle-case-chip {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 10px 12px; border-radius: 10px; border: 2px solid var(--border);
  cursor: pointer; font-size: 0.85rem; text-align: left;
  background: rgba(0,0,0,0.35); color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  min-width: 140px; max-width: 200px;
}
.battle-case-chip:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.battle-case-chip.selected {
  border-color: var(--accent);
  background: rgba(255,87,34,0.12);
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 45%, transparent), inset 0 0 12px rgba(255,87,34,0.08);
}
.chip-selected-badge {
  position: absolute; top: 6px; right: 6px;
  font-size: 0.65rem; font-weight: 700; color: #fff;
  background: var(--accent); padding: 2px 6px; border-radius: 4px;
}
.battle-case-chip input { display: none; }
.chip-price { color: var(--gold); font-size: 0.8rem; }
.battle-label { display: block; margin: 12px 0; font-size: 0.9rem; }
.battle-cost { margin: 12px 0; }
.battle-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.battle-lobby-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.battle-empty { color: var(--text-muted); font-size: 0.9rem; }
.battle-arena { margin-top: 24px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.battle-arena.hidden { display: none; }
.battle-arena-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.battle-duel { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: start; }
.battle-vs { font-size: 2rem; font-weight: 800; color: var(--accent); align-self: center; text-shadow: 0 0 20px var(--accent); }
.battle-side { text-align: center; }
.battle-side-label { font-weight: 600; margin-bottom: 8px; }
.battle-total { font-size: 1.3rem; color: var(--gold); margin-bottom: 12px; }
.battle-reels { display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.battle-reel-card { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: rgba(0,0,0,0.35); border: 1px solid var(--border); text-align: left; }
.battle-reel-card img { width: 40px; height: 40px; object-fit: contain; }
.reel-name { flex: 1; font-size: 0.85rem; }
.reel-value { color: var(--gold); font-size: 0.85rem; }
.battle-result-banner { margin-top: 24px; padding: 24px; border-radius: 12px; text-align: center; }
.battle-result-banner.hidden { display: none; }
.battle-win { background: linear-gradient(135deg, rgba(46,204,113,0.2), rgba(255,215,0,0.15)); border: 1px solid #2ecc71; animation: battleWinPulse 1s ease infinite alternate; }
.battle-lose { background: rgba(231,76,60,0.15); border: 1px solid #e74c3c; }
@keyframes battleCardIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }
@keyframes battleWinPulse { from { box-shadow: 0 0 20px rgba(46,204,113,0.3); } to { box-shadow: 0 0 40px rgba(255,215,0,0.5); } }

/* Settings modal */
.settings-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.75); display: flex; align-items: center; justify-content: center; padding: 16px; }
.settings-modal.hidden { display: none; }
.settings-panel { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.settings-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 20px 0; }
.settings-header h2 { margin: 0; font-size: 1.2rem; }
.settings-body { padding: 16px 20px; }
.settings-section { margin-bottom: 20px; }
.settings-section h3 { margin: 0 0 10px; font-size: 0.95rem; color: var(--text-muted); }
.settings-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9rem; }
.settings-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.settings-field input { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: rgba(0,0,0,0.35); color: var(--text); }
.settings-hint { font-size: 0.8rem; color: var(--text-muted); margin: 8px 0; }
.settings-footer { padding: 0 20px 20px; text-align: right; }

/* Low quality mode */
body.low-quality-mode .starfield-bg,
body.low-quality-mode .bg-effect-layer,
body.low-quality-mode .live-dot,
body.low-quality-mode .case-card,
body.low-quality-mode .profile-card::before { animation: none !important; }
body.low-quality-mode .star { display: none; }
body.low-quality-mode * { scroll-behavior: auto !important; }
