@import 'variables.css';

/* CSS Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1.1;
}

/* Glassmorphism Navigation */
.nav-bar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.25rem 4rem;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--border-glass);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-primary);
  text-decoration: none;
  background: var(--grad-fuse);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
}

/* Interactive Elements (Emil Design) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), filter 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
  transform-origin: center;
  border: none;
  outline: none;
}

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

.btn-primary {
  background: var(--grad-fuse);
  color: var(--bg-base);
  box-shadow: 0 4px 14px rgba(255, 185, 33, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 6px 20px rgba(255, 185, 33, 0.4);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Forms & Inputs */
.search-container {
  position: relative;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 1.2rem 1.5rem;
  padding-right: 120px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(19, 23, 34, 0.7);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.2rem;
  text-transform: uppercase;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
  text-transform: none;
}

.search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(255, 185, 33, 0.15);
}

.search-btn {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  padding: 0 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

/* Hero Section (Parallax Host) */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 0 2rem;
}

.hero-bg-glow {
  position: absolute;
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(0, 165, 249, 0.08) 0%, rgba(10, 13, 20, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.layer-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24vw;
  font-family: var(--font-display);
  color: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
  user-select: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  width: 100%;
}

.badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  background: rgba(255, 185, 33, 0.1);
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 185, 33, 0.2);
}

.hero-title {
  font-size: 5.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero-title span {
  background: var(--grad-fuse);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.35rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Sections & Cards */
.content-section {
  position: relative;
  z-index: 20;
  background: var(--bg-base);
  padding: 6rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  transition: transform 300ms var(--ease-out), box-shadow 300ms ease, background 300ms ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: var(--grad-fuse);
  opacity: 0;
  transition: opacity 300ms ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  background: var(--bg-surface-elevated);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  background: rgba(0, 165, 249, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--accent-blue);
}

.feature-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  font-family: var(--font-display);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Animations */
.fade-in-up {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}

@starting-style {
  .fade-in-up {
    opacity: 0;
    transform: translateY(30px);
  }
}

.delay-1 { transition-delay: 100ms; }
.delay-2 { transition-delay: 200ms; }
.delay-3 { transition-delay: 300ms; }

/* Footer */
footer {
  background: #05070a;
  padding: 4rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 4rem;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 600px;
  margin: 0 auto;
}

/* =====================================================================
   SHARED COMPONENTS & PAGE MODULES (injected by js/components.js)
   ===================================================================== */

/* ---- Navigation (component) ---- */
.nav-bar {
  padding: 1rem 2rem;
  gap: 1rem;
}
.nav-inner {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav-link.active { color: var(--text-primary); }
.nav-link.active::after {
  content: '';
  display: block;
  height: 2px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--grad-fuse);
}
.nav-right { display: flex; align-items: center; gap: 1rem; }

/* Language switcher */
.lang-switcher { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  padding: 0.45rem 0.8rem; border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.85rem; cursor: pointer;
  transition: color .2s, border-color .2s;
}
.lang-btn:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.25); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--bg-surface); border: var(--border-glass);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  min-width: 150px; overflow: hidden; z-index: 1100;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .18s var(--ease-out), transform .18s var(--ease-out);
}
.lang-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.lang-option {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.7rem 1rem; background: none; border: none; color: var(--text-secondary);
  font-size: 0.9rem; font-weight: 600; cursor: pointer; text-align: left;
}
.lang-option:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.lang-option.active { color: var(--accent-gold); }

/* Mobile hamburger */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; padding: 8px;
}
.nav-toggle span { display: block; height: 2px; background: var(--text-primary); border-radius: 2px; margin: 5px 0; transition: transform .25s var(--ease-out), opacity .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: var(--nav-height); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10,13,20,0.97); backdrop-filter: blur(16px);
    border-bottom: var(--border-glass);
    padding: 1rem 2rem 2rem; max-height: 0; overflow: hidden;
    transition: max-height .3s var(--ease-out);
  }
  .nav-links.open { max-height: 90vh; }
  .nav-links .nav-link { padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .nav-bar { padding: 1rem 1.25rem; }
}

/* ---- Page scaffold ---- */
.page-wrap { max-width: var(--container-max); margin: 0 auto; padding: 0 2rem; }
.page-head { padding: calc(var(--nav-height) + 3rem) 0 2rem; }
.page-head h1 { font-size: 3.25rem; margin-bottom: 0.5rem; }
.page-head .accent { color: var(--accent-gold); }
.page-head .lead { color: var(--text-secondary); font-size: 1.15rem; max-width: 680px; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 2px;
  font-size: 0.8rem; font-weight: 700; color: var(--accent-elixir); margin-bottom: 0.75rem;
}

/* ---- Cards / panels ---- */
.panel {
  background: var(--bg-surface); border: var(--border-glass);
  border-radius: var(--radius-lg); padding: 1.75rem;
}
.panel + .panel { margin-top: 1.5rem; }
.panel-title { font-size: 1.5rem; margin-bottom: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

/* ---- Pills / chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.75rem; border-radius: 100px; font-size: 0.8rem; font-weight: 600;
  background: rgba(255,255,255,0.06); color: var(--text-secondary);
}
.chip.gold { background: rgba(255,185,33,0.12); color: var(--accent-gold); }
.chip.elixir { background: rgba(224,53,230,0.12); color: var(--accent-elixir); }
.chip.blue { background: rgba(0,165,249,0.12); color: var(--accent-blue); }
.chip.green { background: rgba(6,214,160,0.12); color: var(--success); }

/* ---- Tier list ---- */
.tier-row {
  display: flex; align-items: stretch; gap: 1rem; margin-bottom: 0.75rem;
  background: var(--bg-surface); border: var(--border-glass); border-radius: var(--radius-md);
  overflow: hidden;
}
.tier-label {
  width: 80px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 2.5rem; color: #0A0D14;
}
.tier-S .tier-label { background: var(--tier-s); }
.tier-A .tier-label { background: var(--tier-a); }
.tier-B .tier-label { background: var(--tier-b); }
.tier-C .tier-label { background: var(--tier-c); }
.tier-D .tier-label { background: var(--tier-d); }
.tier-F .tier-label { background: var(--tier-f); color: #fff; }
.tier-items { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0.9rem; flex: 1; align-content: center; }
.tier-entity {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.8rem;
  background: var(--bg-surface-elevated); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md); font-weight: 600; font-size: 0.9rem; cursor: pointer;
  transition: transform .15s var(--ease-out), border-color .2s; text-decoration: none; color: var(--text-primary);
}
.tier-entity:hover { transform: translateY(-2px); border-color: var(--accent-gold); }
.entity-img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; background: rgba(255,255,255,0.05); }

/* Tier list filter tabs */
.seg-tabs { display: inline-flex; background: var(--bg-surface); border: var(--border-glass); border-radius: var(--radius-md); padding: 4px; margin-bottom: 1.5rem; flex-wrap: wrap; }
.seg-tab {
  padding: 0.55rem 1.1rem; border-radius: var(--radius-sm); border: none; background: none;
  color: var(--text-secondary); font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all .2s;
}
.seg-tab.active { background: var(--grad-fuse); color: #0A0D14; }

/* ---- Data table ---- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 0.9rem 1rem; text-align: left; }
.data-table thead th {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.data-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.04); transition: background .15s; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.data-table .rank { font-family: var(--font-display); font-size: 1.4rem; color: var(--accent-gold); width: 50px; }
.num { font-variant-numeric: tabular-nums; }

/* ---- Progress bars (usage / win rate) ---- */
.bar { height: 8px; border-radius: 100px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 100px; background: var(--grad-fuse); }
.bar.green > span { background: linear-gradient(90deg, var(--success), var(--accent-blue)); }

/* ---- Meta / army cards ---- */
.meta-card { background: var(--bg-surface); border: var(--border-glass); border-radius: var(--radius-lg); padding: 1.5rem; transition: transform .25s var(--ease-out), box-shadow .25s; }
.meta-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.meta-card .army-comp { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.metric { display: flex; justify-content: space-between; align-items: baseline; margin-top: 0.5rem; }
.metric .k { color: var(--text-secondary); font-size: 0.85rem; }
.metric .v { font-family: var(--font-display); font-size: 1.4rem; }
.v.good { color: var(--success); } .v.mid { color: var(--warning); } .v.bad { color: var(--danger); }

/* ---- Events / maps ---- */
.event-card { display: flex; gap: 1.25rem; align-items: center; background: var(--bg-surface); border: var(--border-glass); border-radius: var(--radius-lg); padding: 1.5rem; }
.event-icon { width: 56px; height: 56px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.event-meta { flex: 1; }
.event-timer { font-family: var(--font-display); font-size: 1.5rem; color: var(--accent-gold); }

/* ---- Timeline (balance changes) ---- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: rgba(255,255,255,0.1); }
.tl-item { position: relative; margin-bottom: 2rem; }
.tl-item::before { content: ''; position: absolute; left: -2rem; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg-base); border: 3px solid var(--accent-gold); }
.tl-date { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; }
.change { display: flex; gap: 0.6rem; align-items: baseline; margin-top: 0.5rem; }
.change .tag { font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 4px; text-transform: uppercase; }
.tag.buff { background: rgba(6,214,160,0.15); color: var(--success); }
.tag.nerf { background: rgba(255,77,109,0.15); color: var(--danger); }
.tag.new { background: rgba(0,165,249,0.15); color: var(--info); }

/* ---- Coach panel ---- */
.coach-panel { background: linear-gradient(135deg, rgba(224,53,230,0.08), rgba(0,165,249,0.05)); border: 1px solid rgba(224,53,230,0.25); border-radius: var(--radius-lg); padding: 1.75rem; }
.coach-panel h3 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.6rem; margin-bottom: 1rem; }
.coach-advice { display: flex; gap: 0.75rem; padding: 0.9rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.coach-advice:last-child { border-bottom: none; }
.coach-advice .ico { flex-shrink: 0; width: 24px; height: 24px; color: var(--accent-gold); }
.coach-advice.prio-high .ico { color: var(--danger); }
.coach-advice.prio-low .ico { color: var(--success); }

/* Score ring */
.score-ring { --val: 0; width: 120px; height: 120px; border-radius: 50%;
  background: conic-gradient(var(--accent-gold) calc(var(--val) * 1%), rgba(255,255,255,0.07) 0);
  display: grid; place-items: center; }
.score-ring .inner { width: 96px; height: 96px; border-radius: 50%; background: var(--bg-surface); display: grid; place-items: center; }
.score-ring .num { font-family: var(--font-display); font-size: 2.4rem; }

/* ---- Loading / empty / error states ---- */
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 37%, rgba(255,255,255,0.04) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-md); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.state-msg { text-align: center; padding: 3rem 1rem; color: var(--text-secondary); }
.state-msg svg { width: 48px; height: 48px; margin-bottom: 1rem; color: var(--text-muted); }
.spinner { width: 38px; height: 38px; border: 3px solid rgba(255,255,255,0.12); border-top-color: var(--accent-gold); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Toast ---- */
.toast-host { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 0.6rem; align-items: center; }
.toast { background: var(--bg-surface); border: var(--border-glass); box-shadow: var(--shadow-md); border-radius: var(--radius-md); padding: 0.9rem 1.4rem; font-weight: 600; opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(255,77,109,0.4); }

/* ---- Footer (component) ---- */
.site-footer { background: #05070a; border-top: 1px solid rgba(255,255,255,0.05); margin-top: 4rem; padding: 3.5rem 2rem 2rem; }
.footer-grid { max-width: var(--container-max); margin: 0 auto; display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 2rem; }
.footer-grid h4 { font-family: var(--font-body); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 1rem; }
.footer-grid a { display: block; color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; padding: 0.3rem 0; transition: color .2s; }
.footer-grid a:hover { color: var(--text-primary); }
.footer-bottom { max-width: var(--container-max); margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.05); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---- Admin ---- */
.admin-stat { background: var(--bg-surface); border: var(--border-glass); border-radius: var(--radius-lg); padding: 1.5rem; }
.admin-stat .big { font-family: var(--font-display); font-size: 2.8rem; color: var(--accent-gold); }
.admin-gate { max-width: 420px; margin: calc(var(--nav-height) + 4rem) auto; }
.input {
  width: 100%; padding: 0.9rem 1rem; border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.15); background: rgba(19,23,34,0.7);
  color: var(--text-primary); font-family: var(--font-body); font-size: 1rem; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--accent-gold); box-shadow: 0 0 0 3px rgba(255,185,33,0.15); }
label.field { display: block; margin-bottom: 1rem; }
label.field span { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.4rem; font-weight: 600; }

/* ---- Profile / Clan identity ---- */
.player-identity { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1rem; }
.exp-badge {
  width: 64px; height: 64px; flex-shrink: 0; background: var(--grad-fuse);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.8rem; color: #fff;
  box-shadow: 0 4px 15px rgba(255, 185, 33, 0.3);
}
.player-name { font-size: 3.25rem; line-height: 1; }
.player-tag { color: var(--text-secondary); font-size: 1.1rem; font-family: monospace; }
.clan-name { color: var(--accent-gold); font-weight: 600; text-decoration: none; }
.clan-name:hover { text-decoration: underline; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.stat-box {
  background: var(--bg-surface-elevated); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius-lg);
  padding: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem;
}
.stat-label { color: var(--text-secondary); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; }
.stat-value { font-family: var(--font-display); font-size: 2.4rem; color: var(--text-primary); }

.tabs { display: flex; gap: 0.5rem; margin-top: 2.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); flex-wrap: wrap; }
.tab { padding: 0.9rem 1.5rem; color: var(--text-secondary); font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s; font-size: 1rem; }
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent-gold); border-bottom-color: var(--accent-gold); }

.equipment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.hero-card { background: var(--bg-surface); border: var(--border-glass); border-radius: var(--radius-lg); padding: 1.25rem; display: flex; gap: 1.25rem; align-items: center; }
.hero-avatar { width: 80px; height: 80px; flex-shrink: 0; border-radius: var(--radius-md); background: rgba(255,255,255,0.05); }
.hero-info h3 { font-size: 1.4rem; margin-bottom: 0.2rem; }
.hero-level { color: var(--accent-gold); font-weight: 600; }
.eq-slots { display: flex; gap: 0.4rem; margin-top: 0.6rem; flex-wrap: wrap; }
.eq-slot { width: 38px; height: 38px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: bold; }

/* Search bar used on profile/clan pages */
.lookup-form { display: flex; gap: 0.75rem; max-width: 520px; margin-top: 1.5rem; }
.lookup-form .input { flex: 1; }

/* ---- Utility ---- */
.muted { color: var(--text-muted); }
.center { text-align: center; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.flex { display: flex; } .between { justify-content: space-between; } .items-center { align-items: center; } .gap-2 { gap: 1rem; } .wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
@media (max-width: 600px) {
  .page-head h1 { font-size: 2.4rem; }
  .hero-title { font-size: 3.2rem; }
  .nav-bar { padding: 1rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
