/* ==========================================================================
   WARCLASH — UI/UX Pro Max Esports Tournament Design System
   Typography: Chakra Petch (Display/Headings) + Inter (UI/Body/Data)
   Palette: Crisp Slate Surfaces (#F8FAFC / #FFFFFF), Deep Navy (#0F172A),
            Controlled Esports Orange (#EA580C / #F97316)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --color-bg: #f6f8fc;
  --color-surface: #ffffff;
  --color-subtle: #f1f5f9;
  --color-dark: #07152b;
  --color-dark-2: #0f254a;
  --color-text: #0f172a;
  --color-text-2: #334155;
  --color-muted: #64748b;
  --color-border: rgba(0, 168, 255, 0.22);
  --color-border-strong: rgba(0, 168, 255, 0.38);

  --color-primary: #ff5500;
  --color-primary-hover: #e04800;
  --color-primary-soft: #fff7ed;
  --color-blue: #00a8ff;
  --color-blue-soft: #e0f2fe;
  --color-success: #059669;
  --color-success-soft: #dcfce7;
  --color-danger: #ef4444;
  --color-danger-soft: #fef2f2;
  --color-warning: #f59e0b;
  --color-warning-soft: #fef3c7;

  --grad-brand: linear-gradient(90deg, #ff5500 0%, #ff8800 45%, #00a8ff 100%);
  --grad-orange: linear-gradient(135deg, #ff5500 0%, #ff9500 100%);

  --font-heading: 'Chakra Petch', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-xs: 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 6px 20px rgba(0, 168, 255, 0.12), 0 4px 12px rgba(255, 102, 0, 0.08);
  --shadow-md: 0 10px 28px rgba(0, 168, 255, 0.16), 0 6px 16px rgba(255, 102, 0, 0.10);

  --nav-height: 60px;
  --bottom-nav-height: 68px;
}

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

html, body {
  font-family: var(--font-body);
  background: #0f172a;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mobile-frame-shell {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background: #f8fafc;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

@media (min-width: 520px) {
  body {
    padding: 16px 0;
    background: radial-gradient(circle at top, #1e293b 0%, #090d16 100%);
  }
  .mobile-frame-shell {
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
    border-radius: 30px;
    border: 6px solid #1e293b;
  }
}

h1, h2, h3, .brand-logo, .hero-title {
  font-family: var(--font-heading);
}

img, svg {
  display: block;
  max-width: 100%;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Header & Navigation (Inside Mobile Frame) ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 90;
  height: 58px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.header-inner {
  width: 100%;
  height: 100%;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  flex-shrink: 0;
}

.header-user-name {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.header-user-tier {
  font-size: 10.5px;
  font-weight: 700;
  color: #d97706;
  display: flex;
  align-items: center;
  gap: 3px;
}

.wallet-pill-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f172a;
  color: #ffffff;
  padding: 4px 4px 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.wallet-pill-plus {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0284c7;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notice-bar-dark {
  background: #111827;
  color: #fff;
  border-radius: 14px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}

.notice-tag {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.quick-5-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.quick-5-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.quick-5-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-5-item span {
  font-size: 10.5px;
  font-weight: 700;
  color: #334155;
  line-height: 1.15;
}

.view-all-dark {
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.top-games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.game-tile-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
}

.game-tile-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.85;
  overflow: hidden;
}

.game-tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-tile-footer {
  background: #ffffff;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--color-subtle);
  border-color: var(--color-border-strong);
}

.notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--color-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.4px;
  line-height: 1;
  white-space: nowrap;
}

.brand-war { color: #00a8ff; font-style: italic; }
.brand-clash { color: #ff6b00; font-style: italic; }

.desktop-nav {
  display: none;
  align-items: center;
  gap: 4px;
}

.desktop-nav a {
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text-2);
  transition: color 0.15s ease, background 0.15s ease;
}

.desktop-nav a:hover {
  color: var(--color-text);
  background: var(--color-subtle);
}

.desktop-nav a.active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-user-pill {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-pill);
  background: var(--color-subtle);
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 600;
}

.header-user-pill img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---------- Main Container (Scrolls Inside Fixed Header & Bottom Nav) ---------- */
.main-container {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px 20px;
}

/* ---------- Buttons (44px+ Touch Target) ---------- */
.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

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

.btn-primary, .btn-gradient {
  background: var(--grad-brand);
  color: #fff;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 16px rgba(255, 85, 0, 0.24), 0 4px 12px rgba(0, 168, 255, 0.18);
}

.btn-primary:hover, .btn-gradient:hover {
  opacity: 0.94;
}

.btn-dark {
  background: var(--color-dark);
  color: #fff;
}

.btn-dark:hover { background: var(--color-dark-2); }

.btn-joined {
  background: var(--color-success);
  color: #fff;
}

.btn-joined:hover { background: #047857; }

.btn-outline {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
}

.btn-outline:hover { background: var(--color-subtle); }

.btn-danger-outline {
  background: var(--color-surface);
  color: var(--color-danger);
  border: 1px solid #fecaca;
}

.btn-danger-outline:hover { background: var(--color-danger-soft); }

.btn:disabled, .btn-disabled {
  background: #e2e8f0 !important;
  color: #64748b !important;
  border-color: transparent !important;
  cursor: not-allowed;
  transform: none !important;
}

.btn-sm {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 12.5px;
}

.btn-block { width: 100%; }

/* ---------- Sliding Hero Banner Carousel ---------- */
.hero-slider {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-dark);
  margin-bottom: 14px;
  border: 1px solid #1e293b;
  box-shadow: var(--shadow-sm);
}

.hero-slides {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}

.hero-slide {
  flex: 0 0 100%;
  width: 100%;
  position: relative;
  height: 138px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-slide-img-only img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-slide-text {
  padding: 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
}

.slider-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.55);
}

.slider-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

.slider-dot.active {
  width: 18px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
}

@media (min-width: 640px) {
  .hero-slide { height: 185px; }
}

@media (min-width: 992px) {
  .hero-slide { height: 225px; }
}

/* ---------- Hero Banner (Compact Mobile-First) ---------- */
.hero-banner {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid #1e293b;
  box-shadow: var(--shadow-sm);
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0.28;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(234, 88, 12, 0.22);
  border: 1px solid rgba(251, 146, 60, 0.45);
  color: #fed7aa;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.hero-title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.3px;
}

.hero-tagline {
  font-size: 12.5px;
  color: #cbd5e1;
  margin-top: 5px;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* ---------- Tournament Overview Strip (Clean, Not Repetitive Cards) ---------- */
.overview-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-xs);
}

.overview-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.overview-item:hover { background: var(--color-subtle); }

.overview-ico {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qi-orange { background: var(--color-primary-soft); color: var(--color-primary); }
.qi-blue { background: var(--color-blue-soft); color: var(--color-blue); }
.qi-amber { background: var(--color-warning-soft); color: var(--color-warning); }
.qi-slate { background: var(--color-subtle); color: var(--color-text); }

.overview-val { font-size: 14px; font-weight: 800; color: var(--color-text); line-height: 1.2; }
.overview-lbl { font-size: 11.5px; color: var(--color-muted); }

/* ---------- Section Headers ---------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #090d16;
}

.section-icon {
  color: var(--color-primary);
  display: inline-flex;
}

.view-all-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  min-height: 36px;
}

/* ---------- Filter Pills ---------- */
.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar { display: none; }

.pill-btn {
  min-height: 38px;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-2);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
}

.pill-btn.active {
  background: var(--color-dark);
  color: #fff;
  border-color: var(--color-dark);
}

/* ---------- Tournament Cards (Mobile-First Stacked Banner + Clean Grid) ---------- */
.tournament-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.t-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.t-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

.t-banner-wrap {
  position: relative;
  width: 100%;
  height: 136px;
  background: var(--color-dark);
  overflow: hidden;
}

.t-banner-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.t-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.1) 55%, rgba(15, 23, 42, 0.65) 100%);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.t-badges-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.t-badges-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-ff { background: var(--color-dark); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.badge-free { background: var(--color-success); color: #fff; }
.badge-free-soft { background: var(--color-success-soft); color: var(--color-success); border: 1px solid #a7f3d0; }
.status-live { background: var(--color-danger); color: #fff; }
.status-upcoming { background: var(--color-blue); color: #fff; }
.status-completed { background: #475569; color: #fff; }

.t-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.t-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #090d16;
  line-height: 1.25;
  word-break: break-word;
}

.t-title a:hover { color: var(--color-primary); }

.t-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

.t-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.t-meta-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t-meta-item svg {
  color: #334155;
  flex-shrink: 0;
}

.t-slots-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.t-slots-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: #090d16;
}

.t-slots-bar {
  width: 100%;
  height: 6px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.t-slots-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
}

.t-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

/* ---------- Winners List (Clean Rows, Not Heavy Boxes) ---------- */
.winners-list {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 22px;
}

.winner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
}

.winner-row:last-child { border-bottom: none; }

/* ---------- Announcement Strip ---------- */
.notice-strip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 20px;
}

.notice-strip h3 { font-size: 14.5px; font-weight: 700; }
.notice-strip p { font-size: 12.5px; color: var(--color-muted); margin-top: 2px; }

/* ---------- Cards, Forms, Room Credentials, Alerts ---------- */
.card-box {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs);
  margin-bottom: 16px;
}

.room-credentials-box {
  background: var(--color-dark);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid #334155;
  margin-bottom: 16px;
}

.room-cred-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.room-cred-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.copy-mini-btn {
  background: var(--color-subtle);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
}

.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  font-size: 14px;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success { background: var(--color-success-soft); color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: var(--color-danger-soft); color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: var(--color-blue-soft); color: #075985; border: 1px solid #bae6fd; }
.alert-warning { background: var(--color-warning-soft); color: #92400e; border: 1px solid #fde68a; }

/* ---------- Profile Page (Exact WarClash Photo Aesthetic) ---------- */
.profile-hero-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.profile-hero-card::after {
  content: '';
  position: absolute;
  right: -28px;
  top: -18px;
  width: 135px;
  height: 155px;
  background: linear-gradient(135deg, #ff7a00 0%, #00a8ff 100%);
  opacity: 0.20;
  transform: rotate(22deg);
  border-radius: 26px;
  pointer-events: none;
}

.profile-avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #00a8ff;
  box-shadow: 0 0 12px rgba(0, 168, 255, 0.30);
  flex-shrink: 0;
}

.profile-name { font-size: 18.5px; font-weight: 800; line-height: 1.25; }

.profile-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-muted);
  margin-top: 4px;
}

.stats-3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.stat-mini-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  text-align: center;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.stat-mini-val { font-size: 20px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-mini-lbl { font-size: 11.5px; font-weight: 600; color: var(--color-muted); }

.ff-id-card {
  background: var(--grad-brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 8px 22px rgba(255, 85, 0, 0.24), 0 4px 12px rgba(0, 168, 255, 0.20);
  margin-bottom: 14px;
}

.ff-id-card .copy-mini-btn {
  background: #ffffff;
  color: #ff5500;
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 13px;
  font-weight: 800;
}

.ff-id-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }

.ff-id-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-list-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-bottom: 16px;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  font-weight: 600;
}

.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--color-bg); }
.menu-item-left { display: flex; align-items: center; gap: 10px; }

.menu-badge-new {
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* ---------- Modals ---------- */
.wc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wc-modal-backdrop.open { display: flex; }

.wc-modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.wc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.avatar-opt {
  position: relative;
  cursor: pointer;
  border-radius: 12px;
  padding: 4px;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.avatar-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.avatar-opt img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-opt:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

/* ---------- 4-Column Quick Action Cards (Exact Photo Match) ---------- */
.quick-4-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.quick-4-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.quick-4-card span {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.quick-4-ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flame-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--grad-orange);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Horizontal Tournament Card (Exact Photo Match) ---------- */
.t-card-horiz {
  background: var(--color-surface);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  border: 1.5px solid var(--color-border);
  border-left: 4px solid #ff6b00;
  box-shadow: var(--shadow-sm);
}

.t-horiz-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.t-horiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.t-horiz-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
}

.t-horiz-art {
  width: 96px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-dark);
}

.t-horiz-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Daily Rewards Banner (Exact Photo Match) ---------- */
.daily-rewards-banner {
  border-radius: 16px;
  padding: 14px 18px;
  background: linear-gradient(115deg, #07152b 0%, #0d366b 55%, #0088ff 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}

.gift-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--grad-orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.daily-rewards-banner h3 {
  font-size: 16px;
  font-weight: 800;
  font-style: italic;
}

.daily-rewards-banner p {
  font-size: 12px;
  color: #cbd5e1;
  margin-top: 2px;
}

/* ---------- Diamond Packs & Payment ---------- */
.pay-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 8px;
}

.pay-method-opt {
  position: relative;
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--color-surface);
}

.pay-method-opt input { position: absolute; opacity: 0; }
.pay-method-opt:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.diamond-pack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.diamond-pack-opt {
  position: relative;
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  border-radius: 14px;
  padding: 14px 8px 10px;
  text-align: center;
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
}

.diamond-pack-opt input { position: absolute; opacity: 0; }
.diamond-pack-opt:has(input:checked) {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.pack-extra {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.pack-price {
  margin-top: 6px;
  background: var(--grad-orange);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

/* ---------- Auth Pages ---------- */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: var(--color-bg);
}

.auth-container { width: 100%; max-width: 420px; }

.auth-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.auth-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--color-muted);
  margin: 6px 0 20px;
}

/* ---------- Mobile Bottom Navigation ---------- */
.bottom-nav {
  flex-shrink: 0;
  width: 100%;
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--color-surface);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 95;
}

.bottom-nav-item {
  flex: 1;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  padding: 6px 0;
}

.bottom-nav-item.active { color: var(--color-primary); }

.bottom-nav-center {
  position: relative;
  top: -15px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
}

.bottom-center-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--grad-orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(255, 85, 0, 0.38);
  border: 4px solid #fff;
}

/* ---------- Side Drawer ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 110;
  display: none;
}

.drawer-backdrop.open { display: block; }

.side-drawer {
  position: fixed;
  top: 0;
  left: -290px;
  width: 280px;
  height: 100vh;
  background: var(--color-surface);
  z-index: 120;
  transition: left 0.22s ease;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 8px 0 28px rgba(15, 23, 42, 0.14);
}

.side-drawer.open { left: 0; }

.drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text-2);
}

.drawer-link:hover, .drawer-link.active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: 12.5px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  font-weight: 600;
  color: var(--color-text-2);
}

.footer-links a:hover { color: var(--color-primary); }

/* ---------- Toast ---------- */
.toast-box {
  position: fixed;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-dark);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  box-shadow: var(--shadow-md);
  display: none;
  max-width: calc(100vw - 32px);
  text-align: center;
}

/* ---------- Responsive Breakpoints ---------- */
@media (min-width: 640px) {
  .overview-strip { grid-template-columns: repeat(4, 1fr); }
  .tournament-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
  .main-container { padding: 14px 14px 20px; }
}

@media (max-width: 480px) {
  .room-cred-grid { grid-template-columns: 1fr; }
}

@media (max-width: 359px) {
  .brand-logo { font-size: 18px; }
  .header-left, .header-right { gap: 6px; }
  .header-right .btn-sm { padding: 7px 10px; font-size: 12px; }
  .overview-strip { grid-template-columns: 1fr; }
  .t-meta-grid { grid-template-columns: 1fr; }
  .t-meta-item[style*="span 2"] { grid-column: auto !important; }
  .t-card-actions { flex-direction: column; }
  .t-card-actions .btn { width: 100%; }
}
