/* ============================================================
   Base Styles & Reset — Champions Battle
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  background: var(--bg-app);
}

body {
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Fixed localized brand glow in background */
.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: var(--glow-brand);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

input, select, textarea {
  font: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* === Typography === */
.display {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-family: var(--font-display);
}

.h1 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: var(--font-display);
}

.h2 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.015em;
  font-family: var(--font-display);
}

.h3 {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: var(--font-display);
}

.body {
  font-size: 15px;
  line-height: 1.48;
  font-weight: 400;
}

.body-strong {
  font-size: 15px;
  line-height: 1.48;
  font-weight: 600;
}

.caption {
  font-size: 13px;
  line-height: 1.38;
  font-weight: 400;
  color: var(--text-secondary);
}

.micro {
  font-size: 11px;
  line-height: 1.27;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Tayyor AI Section Overline */
.overline {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan-300);
}

.count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-secondary); }
.text-cyan      { color: var(--cyan-400); }
.text-indigo    { color: var(--indigo-400); }
.text-success   { color: var(--success-text); }
.text-danger    { color: var(--danger-text); }
.text-warning   { color: var(--warning-text); }
.text-center    { text-align: center; }

/* === Layout === */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
  padding-bottom: 84px;
}

.screen {
  padding: var(--space-4) var(--gutter);
  animation: fadeIn var(--dur-base) var(--ease-out);
}

.wrap {
  padding: 0 var(--gutter);
}

.section {
  margin-bottom: var(--space-6);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px var(--space-3);
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.section-title .see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan-400);
  transition: color var(--dur-fast) var(--ease-out);
}

.section-title .see-all:hover {
  color: var(--cyan-300);
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.w-full { width: 100%; }

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

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(0.95); }
}

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

@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

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

/* === Skeleton Loading === */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  border-radius: 4px;
}
.skeleton-text.w-60 { width: 60%; }
.skeleton-text.w-40 { width: 40%; }
.skeleton-text.w-80 { width: 80%; }
.skeleton-circle { border-radius: 50%; }
.skeleton-card {
  height: 100px;
  border-radius: var(--radius-card);
  margin-bottom: var(--space-3);
}

/* === States (Empty / Error / Loading) === */
.state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-5);
  text-align: center;
  gap: var(--space-3);
  background: var(--glass-fill);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  -webkit-backdrop-filter: var(--glass-blur-filter);
  backdrop-filter: var(--glass-blur-filter);
  box-shadow: var(--rim-top);
  margin: var(--space-4) 0;
}

.state-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tint-indigo);
  color: #fff;
  box-shadow: var(--shadow-brand);
  margin-bottom: var(--space-2);
}

.state-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.state-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  max-width: 280px;
  line-height: 1.45;
}

/* === Spinner === */
.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255,255,255,.12);
  border-top-color: var(--cyan-400);
  border-right-color: var(--indigo-400);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-9) 0;
}

/* === Toast Notification === */
.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20,21,32,.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: var(--text-primary);
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  z-index: var(--z-toast);
  box-shadow: 0 12px 36px rgba(0,0,0,.6), var(--rim-top);
  animation: slideUp var(--dur-base) var(--ease-out);
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* === Horizontal Scroll Track === */
.h-scroll {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-2);
  scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll > * { scroll-snap-align: start; flex-shrink: 0; }

/* === Back Header === */
.back-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0 var(--space-4);
  gap: var(--space-3);
}

.back-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--glass-fill);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  box-shadow: var(--rim-top);
  -webkit-backdrop-filter: var(--glass-blur-filter);
  backdrop-filter: var(--glass-blur-filter);
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-base) var(--ease-out);
}

.back-btn:active {
  transform: scale(0.96);
  background: var(--glass-fill-hover);
}

.back-header .title {
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-primary);
  flex: 1;
  text-align: center;
}
