/* =========================
   Global base
========================= */
body {
  margin: 0;
  font-family: system-ui, Arial, sans-serif;
  background: #0d0d0d;
  color: #fff;
}

:root{
  --bg:#0d0d0d;
  --panel:#151515;
  --text:#ffffff;
  --muted:#cfcfcf;
  --border:#1f1f1f;
  --accent:#ff9900;         /* ORANGE */

  /* HERO controls (homepage only) */
  --hero-max-h: 240px;      /* max image height; raise to see more (e.g. 280/320) */
  --hero-gap: 22px;         /* space between image and the “Live v0.2” line */
}

/* =========================
   Navbar
========================= */
.navbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: #111;
  color: #fff;
  border-bottom: 1px solid #1f1f1f;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-left, .nav-right { display: flex; align-items: center; gap: .75rem; }
.nav-center { display: flex; align-items: center; gap: 1rem; flex: 1; }

.logo { font-weight: 800; text-decoration: none; color:#fff; }
.logo .accent { color: var(--accent); } /* only “API” orange */

/* Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: .5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-tabs .tab-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .7rem;
  border-radius: 8px;
  color: var(--accent);                 /* orange by default */
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .2s, border-color .2s, color .2s;
}
.nav-tabs .tab-link:hover {
  color: #fff;
  background: #1b1b1b;
  border-color: var(--accent);
}
.nav-tabs .tab-link.active,
.nav-tabs .tab-link[aria-current="page"] {
  color: #fff;
  background: #1a1a1a;
  border-color: var(--accent);
  box-shadow: inset 0 -3px 0 var(--accent);  /* orange underline */
  font-weight: 700;
}

/* Search */
.nav-search {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-left: auto;
}
.nav-search input {
  width: min(420px, 42vw);
  padding: .5rem .7rem;
  border-radius: 10px;
  border: 1px solid #3a3a3a;
  background: #2a2a2a;
  color: #fff;
}
.nav-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255,153,0,.25);
}
.nav-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .46rem .6rem;
  border-radius: 10px;
  border: 1px solid #3a3a3a;
  background: #1b1b1b;
  color: #fff;
  cursor: pointer;
}
.nav-search button:hover { background: #232323; border-color: var(--accent); }

/* Profile */
.profile-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid var(--accent); /* orange ring */
  object-fit: cover;
}
.profile-name { font-weight: 600; color: white; margin-left: 10px; }
.profile-dropdown { display: flex; align-items: center; gap: 10px; position: relative; cursor: pointer; }
.profile-dropdown .dropdown-content {
  display: none;
  position: absolute;
  top: 50px;
  right: 0;
  background-color: #2a2a2a;
  min-width: 170px;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  flex-direction: column;
  overflow: hidden;
}
.profile-dropdown.active .dropdown-content { display: flex; }
.profile-dropdown .dropdown-content button {
  background: none;
  border: none;
  color: white;
  padding: 14px 18px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
}
.profile-dropdown .dropdown-content button:hover { background-color: var(--accent); color:#111; }

/* Global links + focus */
a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
*:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent); outline-offset: 2px; }

/* Buttons */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:.45rem;
  padding:.65rem .9rem; border-radius:10px; border:1px solid #2a2a2a;
  color:#111; background: linear-gradient(135deg, #ffb84d, var(--accent));
  font-weight:800; cursor:pointer; box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; color:#fff; border:1px solid var(--accent); }
.btn.ghost:hover { background: color-mix(in srgb, var(--accent) 15%, transparent); }

/* =========================
   Layout + Cards
========================= */
.section { padding: 2.2rem 1rem; }
.container { max-width: 1200px; margin: 0 auto; }
.grid { display:grid; gap:1rem; grid-template-columns: repeat(12, 1fr); }

.card {
  background: #151515;
  border: 1px solid #232323;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(0,0,0,.35);
}
.card h3 { margin:.25rem 0 .4rem; }
.pill {
  display:inline-block; font-size:.75rem; padding:.25rem .6rem; border-radius:999px;
  color:#111; background: var(--accent); font-weight:800;
}
.section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:.6rem; }

/* =========================
   HERO (homepage: full image, no crop)
========================= */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 400px at 60% -120px, rgba(255,153,0,.20), transparent 60%),
    linear-gradient(180deg, #101010, #0d0d0d);
  border-bottom:1px solid var(--border);
  padding: 0 1rem 1rem;              /* top 0; small space below content */
}

/* Edge-to-edge container; image controls its own height */
.hero-media{
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  overflow: visible;                 /* no cropping */
  border-bottom: 1px solid var(--border);
  background: #0d0d0d;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-block: 6px;
}

/* Show the entire bitmap; keep it centered */
.hero-media picture,
.hero-media img{
  display: block;
  height: auto;
  width: auto;
  max-width: 100%;
  max-height: var(--hero-max-h);
  object-fit: contain;               /* show full image */
}

/* push the pill/H1 block down from the image */
.hero .wrap { display:grid; gap:1.1rem; grid-template-columns: 1fr; padding-top: var(--hero-gap); }
.hero h1 { font-size: clamp(1.9rem, 3.8vw, 3rem); line-height:1.1; margin:0; }
.hero p { color:#d8d8d8; max-width: 70ch; margin: .2rem 0 1rem; }
.hero .hero-actions { display:flex; gap:.6rem; flex-wrap:wrap; }

/* =========================
   Stats
========================= */
.stats { display:grid; gap:1rem; grid-template-columns: repeat(4, 1fr); }
.stat { background:#131313; border:1px solid #222; border-radius:14px; padding:1rem; }
.stat b { font-size:1.6rem; color: var(--accent); }

/* =========================
   Deck cards with thumbnails
========================= */
.deck-card { padding: 0; overflow: hidden; }
.deck-thumb img { width:100%; height:160px; object-fit:cover; display:block; }
.deck-body { padding: 1rem; }
.deck-body h3 { margin: .35rem 0 .25rem; }
.deck-link { color: var(--accent); font-weight: 700; }
.deck-link:hover { color:#fff; }

/* =========================
   Grids + Responsive
========================= */
.cols-3 > * { grid-column: span 4; }
.cols-4 > * { grid-column: span 3; }
@media (max-width: 980px){
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cols-4 > * { grid-column: span 6; }
}
@media (max-width: 680px){
  .stats { grid-template-columns: 1fr; }
  .cols-3 > *, .cols-4 > * { grid-column: span 12; }
}

/* =========================
   Mobile nav
========================= */
.nav-toggle { display: none; background: none; border: 1px solid #2f2f2f; color: #fff; border-radius: 8px; padding: .35rem .5rem; cursor: pointer; }
@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; }
  .nav-center {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 56px;
    background: #111;
    border-top: 1px solid #1f1f1f;
    padding: .75rem 1rem;
    flex-direction: column;
    gap: .75rem;
    z-index: 1000;
  }
  .nav-center.open { display: flex; }
  .nav-tabs { flex-wrap: wrap; }
  .nav-search { width: 100%; margin-left: 0; }
  .nav-search input { width: 100%; }
}

/* =========================
   Deck detail page styles
========================= */
.crumbs { display:flex; align-items:center; gap:.5rem; color:var(--muted); }
.crumbs a { color: var(--accent); }
.crumbs span { opacity:.8; }

.deck-hero {
  position: relative;
  border-bottom:1px solid var(--border);
  background:#0f0f0f;
}
.deck-hero img {
  width:100%; height:240px; object-fit:cover; display:block; filter:saturate(1.05) contrast(1.05);
  border-bottom:1px solid #1a1a1a;
}
.deck-hero-overlay { padding: 1rem 1rem 1.2rem; }
.deck-hero .hero-actions { display:flex; gap:.6rem; flex-wrap:wrap; margin-top:.4rem; }

/* 8-card grid */
.card-grid { display:grid; gap:.75rem; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px){ .card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px){ .card-grid { grid-template-columns: repeat(2, 1fr); } }

/* small card component */
.card-mini { background:#141414; border:1px solid #222; border-radius:12px; padding:.55rem; }
.card-mini-thumb { position:relative; border-radius:10px; overflow:hidden; background:#1b1b1b; }
.card-mini-thumb img { width:100%; height:96px; object-fit:cover; display:block; }
.card-mini-thumb .elixir {
  position:absolute; bottom:6px; right:6px;
  background:var(--accent); color:#111; font-weight:900; font-size:.85rem;
  padding:.15rem .45rem; border-radius:999px; border:1px solid #1114;
}
.card-mini-meta { padding:.4rem .1rem 0; }
.card-mini-meta .name { font-weight:700; }

/* deck stats list */
.stat-row { display:flex; align-items:center; justify-content:space-between; padding:.4rem 0; border-bottom:1px dashed #2a2a2a; }
.stat-row:last-child { border-bottom:none; }
.deck-hero.full img {
  object-fit: contain;
  background: #0d0d0d;
}
