/* ═══════════════════════════════════════════════════
   LGF · components.css
   Hero · Search · Cards · Table · Badges · Toast
═══════════════════════════════════════════════════ */

/* ════════════════════════════════════
   HERO
════════════════════════════════════ */
.hero {
  padding: var(--s6) 0 var(--s5);
  position: relative;
  overflow: hidden;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--s3);
}
.hero-eyebrow-line {
  width: 32px;
  height: 1px;
  background: var(--amber);
  opacity: .5;
}

.hero-title {
  font-family: var(--f-display);
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.01em;
  text-transform: uppercase;
  margin-bottom: var(--s3);
  position: relative;
}
.hero-title-main { color: var(--t1); display: block; }
.hero-title-accent {
  color: transparent;
  -webkit-text-stroke: 1px var(--amber);
  display: block;
  opacity: .85;
}
.hero-title-sub {
  color: var(--t3);
  font-size: .48em;
  display: block;
  letter-spacing: .12em;
  margin-top: 4px;
}

.hero-desc {
  font-family: var(--f-body);
  font-size: clamp(13px, 1.4vw, 15px);
  color: var(--t2);
  max-width: 580px;
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: var(--s4);
}

/* Hero chips */
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}
.hchip {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .06em;
  padding: 3px 10px;
  border-radius: var(--r1);
  border: 1px solid var(--b2);
  color: var(--t3);
  background: var(--surface);
  transition: color var(--fast), border-color var(--fast);
}
.hchip:hover { color: var(--t2); border-color: var(--b3); }

/* ════════════════════════════════════
   STATS STRIP
════════════════════════════════════ */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--b1);
  border-radius: var(--r3);
  overflow: hidden;
  margin-bottom: var(--s4);
  background: var(--surface);
  position: relative;
}
.stats-strip::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: .4;
}
.sstrip-cell {
  padding: var(--s3) var(--s4);
  border-right: 1px solid var(--b1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sstrip-cell:last-child { border-right: none; }
.sstrip-n {
  font-family: var(--f-mono);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 600;
  color: var(--amber);
  line-height: 1;
  letter-spacing: -.02em;
}
.sstrip-l {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--t3);
}

/* ════════════════════════════════════
   MOBILE SEARCH (below hero, mobile only)
════════════════════════════════════ */
.mobile-search {
  display: none;
  margin-bottom: var(--s4);
}
@media (max-width: 900px) {
  .mobile-search { display: block; }
}
.msearch-wrap {
  position: relative;
}
.msearch-ico {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--t3);
  pointer-events: none;
  display: flex;
}
#mobile-search-input {
  width: 100%;
  height: 42px;
  background: var(--surface);
  border: 1px solid var(--b2);
  border-radius: var(--r3);
  padding: 0 40px 0 40px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--t1);
  outline: none;
  transition: border-color var(--base), box-shadow var(--base);
}
#mobile-search-input::placeholder { color: var(--t3); }
#mobile-search-input:focus {
  border-color: var(--amber-line);
  box-shadow: 0 0 0 3px var(--amber-glow);
}
.msearch-clear {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  display: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--float);
  border: 1px solid var(--b2);
  color: var(--t2);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  transition: background var(--fast);
}
.msearch-clear.on { display: flex; }
.msearch-clear:hover { background: var(--b3); }

/* Mobile filter pills */
.mobile-pills {
  display: none;
  gap: 6px;
  margin-bottom: var(--s4);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(245,166,35,.2) transparent;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.mobile-pills::-webkit-scrollbar { height: 2px; }
.mobile-pills::-webkit-scrollbar-thumb { background: rgba(245,166,35,.2); border-radius:1px; }
@media (pointer:coarse) {
  .mobile-pills { scrollbar-width:none; }
  .mobile-pills::-webkit-scrollbar { display:none; }
}
@media (max-width: 900px) { .mobile-pills { display: flex; } }

.mpill {
  flex-shrink: 0;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .06em;
  padding: 5px 13px;
  border-radius: var(--rpill);
  border: 1px solid var(--b2);
  background: var(--surface);
  color: var(--t3);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--fast);
}
.mpill:hover { color: var(--t1); border-color: var(--b3); }
.mpill.on {
  color: var(--amber);
  border-color: var(--amber-line);
  background: var(--amber-dim);
}

/* ════════════════════════════════════
   SECTION CARDS
════════════════════════════════════ */
.sections-list {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vw, 16px);
}

.sec {
  border: 1px solid var(--b1);
  border-radius: var(--r3);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--base);
  position: relative;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

/* top accent line */
.sec::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--sc, var(--amber));
  opacity: 0;
  transition: opacity var(--base);
}
.sec:hover::after,
.sec.active::after { opacity: .6; }

.sec:hover { border-color: var(--b2); }

/* Section header */
.sec-hd {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: clamp(12px,1.5vw,16px) clamp(14px,2vw,20px);
  cursor: pointer;
  user-select: none;
  transition: background var(--fast);
  position: relative;
}
.sec-hd::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--sc, var(--amber));
  opacity: .7;
  border-radius: 0 1px 1px 0;
}
.sec-hd:hover { background: rgba(255,255,255,.018); }

.sec-ico {
  width: clamp(32px,3.5vw,40px);
  height: clamp(32px,3.5vw,40px);
  border-radius: var(--r2);
  background: color-mix(in srgb, var(--sc, var(--amber)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--sc, var(--amber)) 20%, transparent);
  display: flex; align-items:center; justify-content:center;
  font-size: clamp(14px,1.6vw,18px);
  flex-shrink: 0;
}

.sec-info { flex:1; min-width:0; }
.sec-title {
  font-family: var(--f-display);
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--t1);
  margin-bottom: 2px;
}
.sec-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sec-cnt {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--t3);
}
.sec-tags { display:flex; gap:4px; }
.sec-stag {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .05em;
  padding: 1px 6px;
  border-radius: var(--r1);
  background: color-mix(in srgb, var(--sc, var(--amber)) 8%, transparent);
  color: color-mix(in srgb, var(--sc, var(--amber)) 80%, var(--t2));
  border: 1px solid color-mix(in srgb, var(--sc, var(--amber)) 16%, transparent);
}

.sec-chev {
  flex-shrink: 0;
  color: var(--t3);
  transition: transform var(--base), color var(--fast);
}
.sec-hd:hover .sec-chev { color: var(--t2); }
.sec.closed .sec-chev { transform: rotate(-90deg); }
.sec.closed .sec-body { display: none; }

/* ════════════════════════════════════
   TABLE
════════════════════════════════════ */
.sec-body { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

thead tr {
  background: rgba(255,255,255,.014);
  border-bottom: 1px solid var(--b1);
}
thead th {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--t3);
  padding: 8px clamp(12px,1.5vw,20px);
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
}
thead th:first-child {
  color: color-mix(in srgb, var(--sc, var(--amber)) 70%, var(--t3));
}

tbody tr {
  border-bottom: 1px solid rgba(255,255,255,.03);
  transition: background var(--fast);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.022); }
tbody tr.hide { display: none; }

td {
  padding: clamp(9px,1.2vw,12px) clamp(12px,1.5vw,20px);
  vertical-align: middle;
}

/* Flag col */
.td-f {
  width: 50%;
  min-width: clamp(200px, 35%, 420px);
  max-width: clamp(200px, 42%, 500px);
}
.flag-wrap {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  width: 100%;
}
.flag-pill {
  font-family: var(--f-mono);
  font-size: clamp(10.5px, 1.1vw, 12.5px);
  font-weight: 500;
  color: var(--sc, var(--amber));
  background: color-mix(in srgb, var(--sc, var(--amber)) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--sc, var(--amber)) 15%, transparent);
  padding: 4px 10px;
  border-radius: var(--r1);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.6;
  display: inline-block;
  flex: 1;
  transition: background var(--fast), border-color var(--fast);
}
tbody tr:hover .flag-pill {
  background: color-mix(in srgb, var(--sc, var(--amber)) 12%, transparent);
  border-color: color-mix(in srgb, var(--sc, var(--amber)) 26%, transparent);
}

/* Copy btn */
.cbtn {
  display: inline-flex; align-items:center; justify-content:center;
  width: 24px; height: 24px;
  border-radius: var(--r1);
  border: 1px solid transparent;
  color: var(--t4);
  flex-shrink: 0;
  margin-top: 2px;
  transition: color var(--fast), background var(--fast), border-color var(--fast), opacity var(--fast);
  opacity: 0;
}
tbody tr:hover .cbtn { opacity:1; color:var(--t3); }
.cbtn:hover {
  color: var(--sc, var(--amber)) !important;
  background: color-mix(in srgb, var(--sc, var(--amber)) 10%, transparent);
  border-color: color-mix(in srgb, var(--sc, var(--amber)) 20%, transparent);
}
.cbtn.done {
  opacity: 1 !important;
  color: #4ecdc4 !important;
  background: rgba(78,205,196,.1);
  border-color: rgba(78,205,196,.25);
}
/* Always visible on touch */
@media (pointer:coarse) { .cbtn { opacity: 1 !important; } }

/* Desc col */
.td-d {
  font-size: clamp(12px, 1.2vw, 13.5px);
  color: var(--t2);
  line-height: 1.55;
  font-weight: 300;
}

/* Type col */
.td-t { width: 54px; text-align: center; }
.tbadge {
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .06em;
  padding: 2px 7px;
  border-radius: var(--r1);
  display: inline-block;
}
.tb-env  { background:rgba(245,166,35,.1);  color:#f5a623; border:1px solid rgba(245,166,35,.2); }
.tb-flag { background:rgba(139,125,255,.1); color:#8b7dff; border:1px solid rgba(139,125,255,.2); }
.tb-cmd  { background:rgba(78,205,196,.1);  color:#4ecdc4; border:1px solid rgba(78,205,196,.2); }
.tb-val  { background:rgba(232,81,42,.1);   color:#e8512a; border:1px solid rgba(232,81,42,.2); }

/* Search highlight */
mark {
  background: rgba(245,166,35,.22);
  color: var(--amber);
  border-radius: 1px;
  padding: 0 1px;
}

/* ════════════════════════════════════
   NO RESULTS
════════════════════════════════════ */
.no-res {
  display: none;
  text-align: center;
  padding: var(--s7) var(--s4);
  color: var(--t3);
}
.no-res.on { display: block; }
.no-res-ico { font-size: 36px; margin-bottom: var(--s3); }
.no-res-title {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--t2);
  margin-bottom: 8px;
}
.no-res-sub { font-family: var(--f-mono); font-size: 12px; }

/* ════════════════════════════════════
   TOAST
════════════════════════════════════ */
#toast {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--raise);
  border: 1px solid rgba(78,205,196,.3);
  border-radius: var(--r2);
  padding: 10px 16px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: #4ecdc4;
  box-shadow: 0 8px 32px rgba(0,0,0,.6), 0 0 24px rgba(78,205,196,.06);
  transform: translateY(64px) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--spring), opacity .22s;
}
#toast.on { transform: translateY(0) scale(1); opacity: 1; }

/* ════════════════════════════════════
   BACK TO TOP
════════════════════════════════════ */
#back-top {
  position: fixed;
  bottom: 24px; left: 24px;
  z-index: 200;
  width: 36px; height: 36px;
  border-radius: var(--r2);
  background: var(--raise);
  border: 1px solid var(--b2);
  color: var(--t3);
  display: flex; align-items:center; justify-content:center;
  cursor: pointer;
  opacity: 0; transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--base), transform var(--base), color var(--fast), border-color var(--fast);
}
#back-top.on { opacity:1; transform:translateY(0); pointer-events:auto; }
#back-top:hover { color:var(--amber); border-color:var(--amber-line); }

/* ════════════════════════════════════
   SECTION COLOR VARS
════════════════════════════════════ */
.sc-proton    { --sc: #f5a623; }
.sc-dxvk      { --sc: #8b7dff; }
.sc-nvidia    { --sc: #4ecdc4; }
.sc-wayland   { --sc: #e8a838; }
.sc-gamescope { --sc: #e8512a; }
.sc-gamemode  { --sc: #f06292; }
.sc-wine      { --sc: #a78bfa; }
.sc-steam     { --sc: #56cfb2; }
.sc-mangohud  { --sc: #f5a623; }
.sc-mesa      { --sc: #6bcb77; }
.sc-upscaling { --sc: #d881f5; }
.sc-vkd3d     { --sc: #f97316; }
.sc-vkbasalt  { --sc: #38bdf8; }
.sc-prime     { --sc: #c5f135; }

/* ════════════════════════════════════
   ANIMATIONS
════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeIn {
  from { opacity:0; } to { opacity:1; }
}
@keyframes scanLine {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

.hero       { animation: fadeIn .6s ease both; }
.stats-strip{ animation: fadeUp .5s .08s ease both; }
.sec { animation: fadeUp .45s ease both; }
.sec:nth-child(1)  { animation-delay:.05s; }
.sec:nth-child(2)  { animation-delay:.09s; }
.sec:nth-child(3)  { animation-delay:.13s; }
.sec:nth-child(4)  { animation-delay:.17s; }
.sec:nth-child(5)  { animation-delay:.21s; }
.sec:nth-child(6)  { animation-delay:.25s; }
.sec:nth-child(7)  { animation-delay:.29s; }
.sec:nth-child(8)  { animation-delay:.33s; }
.sec:nth-child(9)  { animation-delay:.37s; }
.sec:nth-child(10) { animation-delay:.41s; }
.sec:nth-child(11) { animation-delay:.45s; }
.sec:nth-child(12) { animation-delay:.49s; }
.sec:nth-child(13) { animation-delay:.53s; }
.sec:nth-child(14) { animation-delay:.57s; }

/* ════════════════════════════════════
   MOBILE TABLE → CARD ROWS
════════════════════════════════════ */
@media (max-width: 600px) {

  .stats-strip { grid-template-columns: repeat(2,1fr); }
  .sstrip-cell:nth-child(2) { border-right: none; }
  .sstrip-cell:nth-child(1),
  .sstrip-cell:nth-child(2) { border-bottom: 1px solid var(--b1); }

  .sec-hd { padding: 12px 14px; gap: 10px; }
  .sec-ico { width:30px; height:30px; font-size:14px; }
  .sec-title { font-size: 12px; }
  .sec-tags { display:none; }

  table thead { display: none; }
  table, table tbody, table tr { display:block; width:100%; }

  table tbody tr {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255,255,255,.035);
  }
  table tbody tr:last-child { border-bottom:none; }
  table tbody tr.hide { display:none; }

  table td {
    display: block;
    padding: 0;
    width: 100% !important;
  }

  .td-f { width:100%; min-width:unset; max-width:unset; }
  .flag-wrap { display:flex; align-items:flex-start; gap:7px; width:100%; }
  .flag-pill {
    font-size: 11px;
    padding: 4px 9px;
    flex:1;
    display:block;
    line-height: 1.6;
  }
  .cbtn { opacity:1 !important; width:26px; height:26px; margin-top:3px; }
  .td-d { font-size:12px; padding-top:1px; line-height:1.5; }
  .td-t { display:block !important; text-align:left; padding-top:2px; }
  .tbadge { font-size:9px; padding:2px 7px; }

  #toast { right:12px; left:12px; bottom:14px; justify-content:center; }
  #back-top { left:12px; bottom:14px; }
}

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