/* =========================================================
   NOVARA · components.css — buttons, cards, modal, forms, tabs
   ========================================================= */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: transform var(--dur-std) var(--ease-out),
              box-shadow var(--dur-std) var(--ease-out),
              background var(--dur-std) var(--ease-out),
              border-color var(--dur-std) var(--ease-out),
              filter var(--dur-std) var(--ease-out),
              opacity var(--dur-std) var(--ease-out);
}
.btn:active { transform: translateY(1px); }

.btn-sm { padding: 8px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

.btn-primary {
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 8px 24px rgba(124,58,237,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 700ms var(--ease-out);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover { box-shadow: var(--glow-mix), 0 8px 24px rgba(124,58,237,0.45); }

.btn-secondary {
  color: var(--text-0);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(124,58,237,0.55);
  box-shadow: var(--glow-violet);
}

.btn-ghost {
  color: var(--text-1);
  background: transparent;
  border: 1px solid transparent;
}
.btn-ghost:hover {
  color: var(--text-0);
  background: rgba(255,255,255,0.05);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Burger ---------- */
.btn-burger {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border-radius: var(--r-2);
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.03);
}
.btn-burger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text-0);
  border-radius: 2px;
  transition: transform var(--dur-std), opacity var(--dur-std);
}
.btn-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.btn-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.btn-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Tabs (horizontal scroll rail) ---------- */
.tabs-rail {
  position: relative;
  margin-bottom: var(--s-5);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent 100%);
}
.tabs-rail::-webkit-scrollbar { display: none; }
.tabs {
  display: inline-flex;
  gap: var(--s-2);
  padding: 6px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--stroke);
  width: max-content;
  max-width: none;
}
.tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  color: var(--text-1);
  font-weight: 500;
  font-size: 0.875rem;
  transition: color var(--dur-std), background var(--dur-std), box-shadow var(--dur-std);
  white-space: nowrap;
}
.tabs .tab .tab-icon { display: inline-flex; color: currentColor; }
.tabs .tab .tab-count {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.08);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-2);
  line-height: 1;
}
.tabs .tab:hover { color: var(--text-0); background: rgba(255,255,255,0.04); }
.tabs .tab.active {
  color: #fff;
  background: var(--grad-brand);
  box-shadow: var(--glow-violet);
}
.tabs .tab.active .tab-count { background: rgba(0,0,0,0.25); color: #fff; }

/* ---------- Games controls: search + filter chip ---------- */
.games-controls {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}
.search-input {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 320px;
  min-width: 0;
  max-width: 460px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke);
  border-radius: var(--r-pill);
  padding: 0 12px 0 16px;
  transition: border-color var(--dur-std), box-shadow var(--dur-std), background var(--dur-std);
}
.search-input:focus-within {
  border-color: rgba(124,58,237,0.55);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.14);
  background: rgba(124,58,237,0.05);
}
.search-input .search-icon {
  width: 16px; height: 16px;
  color: var(--text-2);
  flex-shrink: 0;
  margin-right: 10px;
}
.search-input input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 11px 0;
  font-size: 0.9375rem;
  color: var(--text-0);
  min-width: 0;
}
.search-input input::-webkit-search-cancel-button { display: none; }
.search-input input::placeholder { color: var(--text-2); }
.search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text-1);
  flex-shrink: 0;
  transition: background var(--dur-std), color var(--dur-std);
}
.search-clear:hover { background: rgba(255,255,255,0.18); color: var(--text-0); }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(124,58,237,0.14);
  border: 1px solid rgba(124,58,237,0.45);
  color: var(--text-0);
  font-size: 0.8125rem;
  font-weight: 500;
}
.filter-chip-label strong { margin-left: 6px; font-weight: 700; }
.filter-chip-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  color: #fff;
  transition: background var(--dur-std);
}
.filter-chip-clear:hover { background: rgba(0,0,0,0.55); }

/* ---------- Cards (generic) ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid var(--stroke);
  border-radius: var(--r-3);
  backdrop-filter: blur(12px);
}

/* ---------- Game card (image-based) ---------- */
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  background: transparent;
  border: 0;
  text-align: left;
  transition: transform var(--dur-std) var(--ease-out);
  isolation: isolate;
}
.game-card:hover { transform: translateY(-4px); }
.game-card:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 4px; border-radius: var(--r-2); }

.game-card .gc-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-2);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--stroke);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: border-color var(--dur-std), box-shadow var(--dur-std);
}
.game-card:hover .gc-cover {
  border-color: rgba(124,58,237,0.55);
  box-shadow: var(--glow-mix), 0 18px 40px rgba(0,0,0,0.4);
}

.game-card .gc-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity var(--dur-lg) var(--ease-out), transform 600ms var(--ease-out);
}
.game-card .gc-img.loaded { opacity: 1; }
.game-card:hover .gc-img.loaded { transform: scale(1.05); }

.game-card .gc-fallback {
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-3);
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  color: rgba(255,255,255,0.95);
  text-align: center;
  line-height: 1.05;
  text-shadow: 0 2px 12px rgba(0,0,0,0.55);
  letter-spacing: -0.01em;
  background: var(--grad-brand);
}

.game-card .gc-badges-tl {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}
.game-card .gc-badges-tr {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 3;
  display: flex;
  gap: 4px;
  pointer-events: none;
}

.gc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.gc-badge.is-new       { background: var(--grad-brand); border-color: transparent; box-shadow: var(--glow-violet); }
.gc-badge.is-hot       { background: linear-gradient(135deg, #F59E0B, #EF4444); border-color: transparent; box-shadow: 0 0 16px rgba(239,68,68,0.35); }
.gc-badge.is-jackpot   { background: linear-gradient(135deg, #FBBF24, #F97316); border-color: transparent; color: #0E0B1F; box-shadow: 0 0 18px rgba(251,191,36,0.35); }

.gc-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  min-width: 28px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.18);
}
.gc-chip.is-fs   { background: rgba(124,58,237,0.65); border-color: rgba(124,58,237,0.85); }
.gc-chip.is-bb   { background: rgba(34,211,238,0.55); border-color: rgba(34,211,238,0.85); }
.gc-chip.is-hd   { background: rgba(16,185,129,0.55); border-color: rgba(16,185,129,0.85); }
.gc-chip.is-live { background: rgba(239,68,68,0.7); border-color: rgba(239,68,68,0.9); }

.game-card .gc-overlay {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--s-3);
  background: linear-gradient(180deg, rgba(7,7,12,0) 0%, rgba(7,7,12,0.55) 40%, rgba(7,7,12,0.9) 100%);
  opacity: 0;
  transition: opacity var(--dur-std) var(--ease-out);
  z-index: 4;
}
.game-card:hover .gc-overlay,
.game-card:focus-visible .gc-overlay { opacity: 1; }
.game-card .gc-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  background: var(--grad-brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.8125rem;
  box-shadow: var(--glow-mix);
  transform: scale(0.9);
  transition: transform var(--dur-std) var(--ease-spring);
}
.game-card:hover .gc-play { transform: scale(1); }

.game-card .gc-meta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-0);
  text-align: center;
}
.game-card .gc-rtp {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(34,211,238,0.2);
  border: 1px solid rgba(34,211,238,0.5);
  font-weight: 700;
  color: var(--accent-2-soft);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
}
.game-card .gc-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  color: var(--text-1);
}
.game-card .gc-online .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 10px #10B981;
  animation: card-pulse 1.6s ease-in-out infinite;
}
@keyframes card-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.6; transform: scale(1.2); }
}

.game-card .gc-footer {
  padding: 10px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.game-card .gc-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-0);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-card .gc-provider {
  font-size: 0.75rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Skeleton loader ---------- */
.game-skeleton {
  display: flex;
  flex-direction: column;
}
.game-skeleton .sk-cover {
  aspect-ratio: 1 / 1;
  border-radius: var(--r-2);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.02) 100%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.4s linear infinite;
  border: 1px solid var(--stroke);
}
.game-skeleton .sk-title {
  margin-top: 10px;
  height: 12px;
  width: 70%;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.4s linear infinite;
}
.game-skeleton .sk-sub {
  margin-top: 6px;
  height: 10px;
  width: 45%;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 100%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.4s linear infinite;
}
@keyframes sk-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ---------- Load more + empty/error states ---------- */
.load-more {
  display: flex;
  justify-content: center;
  margin-top: var(--s-6);
}
.load-more-sentinel {
  height: 1px;
  width: 100%;
  margin-top: var(--s-4);
  pointer-events: none;
}
.game-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-7) var(--s-4);
  color: var(--text-1);
  text-align: center;
}
.game-state svg { color: var(--text-2); }
.game-state p { max-width: 40ch; }
.game-state-error svg { color: var(--danger); }

/* ---------- Provider grid ---------- */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--s-3);
}
.provider-tile {
  position: relative;
  padding: var(--s-4) var(--s-3);
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--r-2);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  color: var(--text-0);
  cursor: pointer;
  text-align: center;
  transition: transform var(--dur-std), border-color var(--dur-std), box-shadow var(--dur-std), background var(--dur-std);
  overflow: hidden;
}
.provider-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-brand-soft);
  opacity: 0;
  transition: opacity var(--dur-std);
  pointer-events: none;
}
.provider-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(124,58,237,0.5);
  box-shadow: var(--glow-violet);
}
.provider-tile:hover::before { opacity: 1; }
.provider-tile.active {
  border-color: rgba(34,211,238,0.65);
  box-shadow: var(--glow-cyan);
}
.provider-tile .p-monogram {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--grad-brand);
  color: #fff;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.provider-tile .p-name {
  position: relative;
  font-family: 'Unbounded', sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.provider-tile .p-popular {
  position: absolute;
  top: 6px; right: 6px;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  background: rgba(34,211,238,0.18);
  border: 1px solid rgba(34,211,238,0.45);
  color: var(--accent-2-soft);
  text-transform: uppercase;
}

/* ---------- Hero stats chips ---------- */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-5);
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid var(--stroke-soft);
}
.hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-1);
  font-size: 0.8125rem;
}
.hero-stat strong {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-0);
  font-variant-numeric: tabular-nums;
}
.pulse-dot.pulse-green { background: #10B981; }
.pulse-dot.pulse-green::after { border-color: #10B981; }

/* ---------- Form fields ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}
.field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: 0.02em;
}
.field-control {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke);
  border-radius: var(--r-2);
  padding: 0 var(--s-4);
  transition: border-color var(--dur-std), box-shadow var(--dur-std), background var(--dur-std);
}
.field-control:focus-within {
  border-color: rgba(124,58,237,0.65);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.18);
  background: rgba(124,58,237,0.06);
}
.field-control .field-icon {
  width: 16px; height: 16px;
  color: var(--text-2);
  flex-shrink: 0;
  margin-right: var(--s-3);
}
.field-control input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 14px 0;
  font-size: 0.9375rem;
  color: var(--text-0);
  min-width: 0;
}
.field-control input::placeholder { color: var(--text-2); }
.field-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-2);
  color: var(--text-2);
  border-radius: var(--r-1);
  transition: color var(--dur-std), background var(--dur-std);
}
.field-toggle:hover { color: var(--text-0); background: rgba(255,255,255,0.05); }

.field.invalid .field-control {
  border-color: rgba(239,68,68,0.55);
  background: rgba(239,68,68,0.05);
}
.field.invalid .field-control:focus-within {
  box-shadow: 0 0 0 4px rgba(239,68,68,0.18);
}
.field-error {
  display: none;
  color: var(--danger);
  font-size: 0.8125rem;
  line-height: 1.3;
}
.field.invalid .field-error { display: block; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-0);
  overflow: auto;
}
.modal[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal::backdrop {
  background: rgba(3, 2, 10, 0.75);
  backdrop-filter: blur(14px);
}
.modal-panel {
  position: relative;
  width: min(440px, calc(100% - 32px));
  margin: auto;
  padding: var(--s-7) var(--s-6) var(--s-6);
  background: linear-gradient(180deg, #17133A 0%, #0E0B1F 100%);
  border: 1px solid var(--stroke);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-lifted), var(--glow-mix);
  animation: modal-in var(--dur-lg) var(--ease-spring) both;
  overflow: hidden;
}
.modal-panel::before {
  content: "";
  position: absolute;
  top: -2px; left: 16px; right: 16px;
  height: 2px;
  background: var(--grad-brand);
  border-radius: 2px;
  opacity: 0.9;
}
.modal-panel::after {
  content: "";
  position: absolute;
  top: -120px; right: -120px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.5), transparent 60%);
  pointer-events: none;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--stroke);
  color: var(--text-1);
  transition: color var(--dur-std), background var(--dur-std), border-color var(--dur-std);
  z-index: 2;
}
.modal-close:hover { color: var(--text-0); background: rgba(255,255,255,0.1); }

.modal-brand {
  display: flex; align-items: center; gap: var(--s-2);
  margin-bottom: var(--s-4);
  position: relative; z-index: 1;
}
.modal-brand .brand-mark { width: 32px; height: 32px; }
.modal-brand .brand-name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
}
.modal-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--s-2);
  position: relative; z-index: 1;
}
.modal-sub {
  color: var(--text-1);
  font-size: 0.9375rem;
  margin-bottom: var(--s-5);
  position: relative; z-index: 1;
}

/* ---------- Auth tabs inside modal ---------- */
.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke);
  border-radius: var(--r-pill);
  padding: 4px;
  margin-bottom: var(--s-5);
  isolation: isolate;
}
.auth-tab {
  position: relative;
  z-index: 2;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  color: var(--text-1);
  font-weight: 600;
  font-size: 0.875rem;
  transition: color var(--dur-std);
}
.auth-tab.active { color: #fff; }
.auth-tabs-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  left: 4px;
  background: var(--grad-brand);
  border-radius: var(--r-pill);
  box-shadow: var(--glow-violet);
  transition: transform var(--dur-std) var(--ease-out);
  z-index: 1;
}
.auth-tabs[data-active="login"] .auth-tabs-thumb {
  transform: translateX(100%);
}

.auth-forgot {
  display: block;
  text-align: right;
  font-size: 0.8125rem;
  color: var(--text-1);
  margin-top: var(--s-3);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color var(--dur-std), text-decoration-color var(--dur-std);
}
.auth-forgot:hover { color: var(--accent-2-soft); text-decoration-color: currentColor; }

.auth-switch {
  margin-top: var(--s-5);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-1);
}
.auth-switch .link {
  color: var(--accent-2-soft);
  font-weight: 600;
  margin-left: 4px;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--dur-std);
}
.auth-switch .link:hover { text-decoration-color: currentColor; }

.auth-legal {
  margin-top: var(--s-4);
  font-size: 0.75rem;
  color: var(--text-2);
  line-height: 1.5;
  text-align: center;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 16px; left: 16px; right: 16px;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--s-4) var(--s-5);
  display: flex;
  align-items: center;
  gap: var(--s-4);
  background: linear-gradient(180deg, rgba(28,24,64,0.96), rgba(14,11,31,0.96));
  border: 1px solid var(--stroke);
  border-radius: var(--r-2);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lifted);
  z-index: 50;
  animation: cookie-in 400ms var(--ease-out) both;
}
@keyframes cookie-in {
  from { transform: translateY(32px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.cookie-banner p {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-1);
  margin: 0;
}
.cookie-banner .cookie-actions {
  display: flex;
  gap: var(--s-2);
  flex-shrink: 0;
}

/* ---------- Lang switcher ---------- */
.lang-switcher {
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-0);
  transition: background var(--dur-std), border-color var(--dur-std);
}
.lang-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(124,58,237,0.45); }
.lang-btn .lang-flag { font-size: 1rem; line-height: 1; }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
  background: linear-gradient(180deg, #17133A 0%, #0E0B1F 100%);
  border: 1px solid var(--stroke);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-lifted);
  z-index: 40;
}
.lang-menu[hidden] { display: none; }
.lang-menu li {
  padding: 8px 12px;
  border-radius: var(--r-1);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-1);
  cursor: pointer;
  transition: background var(--dur-micro), color var(--dur-micro);
}
.lang-menu li:hover,
.lang-menu li.active { background: rgba(124,58,237,0.18); color: var(--text-0); }
.lang-menu li .lang-flag { font-size: 1rem; }
.lang-menu li .lang-code { margin-left: auto; color: var(--text-2); font-size: 0.75rem; font-weight: 600; }
