/**
 * AndroidEmulator.org — Single Emulator Page v2 re-skin
 * "Hardware Console" decision-first layout. Scoped under .ae-emu-v2; uses the
 * ae design tokens (assets/css/tokens.css) so light/dark themes come for free.
 */

.ae-emu-v2 {
  --ae2-accent: var(--ae-blue);
  --ae2-surface: var(--ae-surface-1);
  --ae2-surface-2: var(--ae-surface-2);
  --ae2-border: var(--ae-border);
  --ae2-border-strong: var(--ae-border-strong);
  --ae2-text: var(--ae-text-1);
  --ae2-text-2: var(--ae-text-2);
  --ae2-text-3: var(--ae-text-3);
  --ae2-good: var(--ae-green);
  --ae2-warn: var(--ae-amber);
  --ae2-radius: var(--ae-radius-lg);
}

/* ---------- Hero ---------- */
.ae2-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ae2-border);
  border-radius: var(--ae-radius-xl);
  background:
    linear-gradient(160deg, var(--ae-surface-1) 0%, var(--ae-surface-2) 55%, var(--ae-blue-soft) 130%);
  padding: var(--ae-space-8);
  margin-bottom: var(--ae-space-8);
}
.ae2-hero__glow {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ae-blue-soft), transparent 70%);
  pointer-events: none;
}
.ae2-hero__top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ae-space-6);
  flex-wrap: wrap;
}
.ae2-hero__identity {
  display: flex;
  align-items: center;
  gap: var(--ae-space-5);
  min-width: 0;
}
.ae2-logo {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--ae-radius-lg);
  border: 1px solid var(--ae2-border-strong);
  background: var(--ae2-surface);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--ae-shadow-sm);
}
.ae2-logo__img { width: 100%; height: 100%; object-fit: cover; }
.ae2-logo__fallback {
  font-family: var(--ae-font-mono);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ae2-accent);
}
.ae2-hero__title {
  margin: 0 0 4px;
  font-size: clamp(1.8rem, 4.5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ae2-text);
}
.ae2-hero__subtitle {
  margin: 0 0 var(--ae-space-3);
  color: var(--ae2-text-2);
  font-size: var(--ae-text-md);
}
.ae2-hero__badges { display: flex; flex-wrap: wrap; gap: 8px; }

.ae2-badge {
  font-family: var(--ae-font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--ae-radius-pill);
  background: var(--ae2-surface-2);
  border: 1px solid var(--ae2-border);
  color: var(--ae2-text-2);
  white-space: nowrap;
}
.ae2-badge--plat { color: var(--ae2-text); }
.ae2-badge--verified { background: var(--ae-green-soft); border-color: var(--ae-green-border); color: var(--ae-green); }

.ae2-hero__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ae-space-2);
  text-align: center;
  flex-shrink: 0;
}
.ae2-score-ring {
  --ring-size: 108px;
  width: var(--ring-size);
  height: var(--ring-size);
  border-radius: 50%;
  background: conic-gradient(var(--ae2-accent) var(--pct), var(--ae2-surface-2) 0);
  display: grid;
  place-items: center;
}
.ae2-score-ring__inner {
  width: calc(var(--ring-size) - 16px);
  height: calc(var(--ring-size) - 16px);
  border-radius: 50%;
  background: var(--ae2-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--ae-shadow-xs);
}
.ae2-score-ring__inner strong { font-family: var(--ae-font-mono); font-size: 2rem; line-height: 1; color: var(--ae2-text); }
.ae2-score-ring__inner span { font-size: 0.6875rem; color: var(--ae2-text-3); font-family: var(--ae-font-mono); }
.ae2-score-ring__label { font-family: var(--ae-font-mono); font-size: 0.6875rem; color: var(--ae2-text-3); text-transform: uppercase; letter-spacing: 0.06em; }

.ae2-hero__summary {
  margin-top: var(--ae-space-6);
  color: var(--ae2-text-2);
  font-size: var(--ae-text-base);
  line-height: 1.7;
  max-width: 780px;
}

.ae2-hero__kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ae-space-3);
  margin-top: var(--ae-space-6);
}
.ae2-kpi {
  background: var(--ae2-surface);
  border: 1px solid var(--ae2-border);
  border-radius: var(--ae-radius-md);
  padding: var(--ae-space-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ae2-kpi__label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ae2-text-3); font-weight: 600; }
.ae2-kpi__value { font-family: var(--ae-font-mono); font-size: 1.5rem; font-weight: 800; color: var(--ae2-text); line-height: 1; }
.ae2-kpi__value i { font-style: normal; font-size: 0.75rem; color: var(--ae2-text-3); font-weight: 600; }

.ae2-hero__actions { margin-top: var(--ae-space-6); display: flex; flex-wrap: wrap; gap: var(--ae-space-3); }

/* ---------- Buttons ---------- */
.ae2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--ae-radius-md);
  font-family: var(--ae-font-sans);
  font-size: var(--ae-text-sm);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--ae-transition-fast);
  border: 1px solid transparent;
  line-height: 1.2;
}
.ae2-btn--primary { background: var(--ae2-accent); color: #fff; border-color: var(--ae2-accent); }
.ae2-btn--primary:hover { background: var(--ae-blue-hover); border-color: var(--ae-blue-hover); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15, 98, 254, 0.25); }
.ae2-btn--secondary { background: var(--ae2-surface-2); color: var(--ae2-text); border-color: var(--ae2-border-strong); }
.ae2-btn--secondary:hover { background: var(--ae-surface-3); }
.ae2-btn--ghost { background: transparent; color: var(--ae2-text-2); }
.ae2-btn--ghost:hover { background: var(--ae2-surface-2); color: var(--ae2-text); }
.ae2-btn--sm { padding: 7px 12px; font-size: 0.75rem; }

/* ---------- Sticky Navigator ---------- */
.ae2-nav {
  position: sticky;
  top: var(--ae-header-height);
  z-index: 50;
  background: var(--ae-canvas); /* fallback for browsers without color-mix() */
  background: color-mix(in srgb, var(--ae-canvas) 78%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ae2-border);
  margin-bottom: var(--ae-space-8);
}
.ae2-nav__inner {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px 2px;
}
.ae2-nav__inner::-webkit-scrollbar { display: none; }
.ae2-nav__link {
  white-space: nowrap;
  padding: 7px 13px;
  border-radius: var(--ae-radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ae2-text-2);
  text-decoration: none;
  transition: all var(--ae-transition-fast);
  border: 1px solid transparent;
}
.ae2-nav__link:hover { background: var(--ae2-surface-2); color: var(--ae2-text); }
.ae2-nav__link.is-active { background: var(--ae-blue-soft); color: var(--ae2-accent); border-color: var(--ae-blue-border); }

/* ---------- Verdict ---------- */
.ae2-verdict {
  border: 1px solid var(--ae2-border);
  border-radius: var(--ae-radius-xl);
  background: var(--ae2-surface);
  padding: var(--ae-space-6);
  margin-bottom: var(--ae-space-8);
}
.ae2-verdict__head { display: flex; align-items: center; justify-content: space-between; gap: var(--ae-space-3); flex-wrap: wrap; margin-bottom: var(--ae-space-4); }
.ae2-verdict__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ae-space-4); }
.ae2-verdict__card { border-radius: var(--ae-radius-lg); padding: var(--ae-space-5); border: 1px solid var(--ae2-border); }
.ae2-verdict__card--good { background: var(--ae-green-soft); border-color: var(--ae-green-border); }
.ae2-verdict__card--warn { background: var(--ae-amber-soft); border-color: var(--ae-amber-border); }
.ae2-verdict__label { display: block; font-family: var(--ae-font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ae2-text-3); font-weight: 700; margin-bottom: 6px; }
.ae2-verdict__text { margin: 0; font-size: var(--ae-text-base); line-height: 1.6; color: var(--ae2-text); }

/* ---------- Chips / Section head ---------- */
.ae2-chip {
  font-family: var(--ae-font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--ae-radius-pill);
  background: var(--ae2-surface-2);
  border: 1px solid var(--ae2-border);
  color: var(--ae2-text-2);
  white-space: nowrap;
}
.ae2-chip--best { background: var(--ae-blue-soft); color: var(--ae2-accent); border-color: var(--ae-blue-border); }
.ae2-chip--accent { background: var(--ae-blue-soft); color: var(--ae2-accent); border-color: var(--ae-blue-border); }
.ae2-chip--verified { background: var(--ae-green-soft); color: var(--ae-green); border-color: var(--ae-green-border); }

.ae2-section { margin-bottom: var(--ae-space-10); scroll-margin-top: calc(var(--ae-header-height) + 72px); }
.ae2-section__head { display: flex; align-items: center; justify-content: space-between; gap: var(--ae-space-3); flex-wrap: wrap; margin-bottom: var(--ae-space-5); }
.ae2-section-title { margin: 0; font-size: var(--ae-h3); font-weight: 800; letter-spacing: -0.02em; color: var(--ae2-text); }
.ae2-section--panel {
  border: 1px solid var(--ae2-border);
  border-radius: var(--ae-radius-xl);
  background: linear-gradient(180deg, var(--ae2-surface), var(--ae-surface-2));
  padding: var(--ae-space-6);
}
.ae2-lead { margin: 0 0 var(--ae-space-5); color: var(--ae2-text-2); max-width: 620px; }

/* ---------- Grid/rail ---------- */
.ae2-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--ae-space-8); align-items: start; }
.ae2-rail { display: flex; flex-direction: column; gap: var(--ae-space-6); position: sticky; top: calc(var(--ae-header-height) + 64px); }
.ae2-card { border: 1px solid var(--ae2-border); border-radius: var(--ae-radius-lg); background: var(--ae2-surface); padding: var(--ae-space-5); }
.ae2-card__title { font-family: var(--ae-font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ae2-text-3); font-weight: 700; margin-bottom: var(--ae-space-4); }

/* ---------- Capabilities quadrants ---------- */
.ae2-quads { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--ae-space-4); }
.ae2-quad { border: 1px solid var(--ae2-border); border-radius: var(--ae-radius-lg); background: var(--ae2-surface); padding: var(--ae-space-5); }
.ae2-quad__title { margin: 0 0 var(--ae-space-3); font-size: var(--ae-text-sm); font-weight: 700; color: var(--ae2-text); }
.ae2-quad__row { display: flex; align-items: center; justify-content: space-between; gap: var(--ae-space-3); padding: 7px 0; border-bottom: 1px dashed var(--ae2-border); font-size: 0.8125rem; }
.ae2-quad__row:last-child { border-bottom: none; }
.ae2-quad__row > span:first-child { color: var(--ae2-text-2); }
.ae2-ok { color: var(--ae2-good); font-weight: 700; }
.ae2-no { color: var(--ae2-text-3); }
.ae2-mono { font-family: var(--ae-font-mono); font-size: 0.8125rem; color: var(--ae2-text); }

/* ---------- Specs ---------- */
.ae2-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; border: 1px solid var(--ae2-border); border-radius: var(--ae-radius-lg); overflow: hidden; background: var(--ae2-border); }
.ae2-spec { background: var(--ae2-surface); padding: var(--ae-space-3) var(--ae-space-4); display: flex; flex-direction: column; gap: 2px; }
.ae2-spec span { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ae2-text-3); font-weight: 600; }
.ae2-spec strong { font-family: var(--ae-font-mono); font-size: var(--ae-text-sm); color: var(--ae2-text); }
.ae2-specs--stack { grid-template-columns: 1fr; }
.ae2-specs--stack .ae2-spec { border-bottom: 1px solid var(--ae2-border); }
.ae2-specs--stack .ae2-spec:last-child { border-bottom: none; }

/* ---------- Bars ---------- */
.ae2-bars { display: flex; flex-direction: column; gap: var(--ae-space-4); }
.ae2-bar { display: grid; grid-template-columns: 180px 1fr 64px; align-items: center; gap: var(--ae-space-4); }
.ae2-bar__label { font-size: var(--ae-text-sm); color: var(--ae2-text-2); }
.ae2-bar__meter { height: 10px; border-radius: var(--ae-radius-pill); background: var(--ae2-surface-2); overflow: hidden; border: 1px solid var(--ae2-border); }
.ae2-bar__fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ae2-accent), var(--ae-cyan)); }
.ae2-bar__score { font-family: var(--ae-font-mono); font-size: 0.8125rem; font-weight: 700; color: var(--ae2-text); text-align: right; }

/* ---------- Table ---------- */
.ae2-table-wrap { overflow-x: auto; border: 1px solid var(--ae2-border); border-radius: var(--ae-radius-lg); }
.ae2-table { width: 100%; border-collapse: collapse; font-size: var(--ae-text-sm); }
.ae2-table th { text-align: left; padding: 12px 16px; background: var(--ae2-surface-2); border-bottom: 1px solid var(--ae2-border); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ae2-text-3); font-weight: 700; white-space: nowrap; }
.ae2-table td { padding: 13px 16px; border-bottom: 1px solid var(--ae2-border); color: var(--ae2-text-2); }
.ae2-table tr:last-child td { border-bottom: none; }
.ae2-table tr:hover td { background: var(--ae-surface-2); }

/* ---------- Games ---------- */
.ae2-games { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--ae-space-3); }
.ae2-game {
  display: flex; align-items: center; justify-content: space-between; gap: var(--ae-space-3);
  padding: var(--ae-space-3) var(--ae-space-4); border: 1px solid var(--ae2-border);
  border-radius: var(--ae-radius-md); background: var(--ae2-surface);
}
.ae2-game a { color: var(--ae2-text); font-weight: 600; font-size: var(--ae-text-sm); text-decoration: none; }
.ae2-game a:hover { color: var(--ae2-accent); }
.ae2-fps { font-family: var(--ae-font-mono); font-size: 0.6875rem; color: var(--ae2-good); font-weight: 700; white-space: nowrap; }

/* ---------- Alternatives rail ---------- */
.ae2-alt-list { display: flex; flex-direction: column; gap: 6px; }
.ae2-alt { padding: 8px 10px; border-radius: var(--ae-radius-md); font-size: var(--ae-text-sm); color: var(--ae2-text-2); text-decoration: none; }
.ae2-alt:hover { background: var(--ae2-surface-2); color: var(--ae2-accent); }

/* ---------- Prose / muted ---------- */
.ae2-prose { color: var(--ae2-text-2); font-size: var(--ae-text-base); line-height: 1.8; }
.ae2-prose p { margin: 0 0 1em; }
.ae2-muted { color: var(--ae2-text-3); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .ae2-grid { grid-template-columns: 1fr; }
  .ae2-rail { position: static; }
}
@media (max-width: 760px) {
  .ae2-hero { padding: var(--ae-space-5); }
  .ae2-hero__top { flex-direction: column; align-items: flex-start; }
  .ae2-hero__score { flex-direction: row; gap: var(--ae-space-4); }
  .ae2-hero__kpis { grid-template-columns: repeat(2, 1fr); }
  .ae2-verdict__grid { grid-template-columns: 1fr; }
  .ae2-quads { grid-template-columns: 1fr; }
  .ae2-specs { grid-template-columns: 1fr; }
  .ae2-bar { grid-template-columns: 1fr; gap: 6px; }
  .ae2-bar__score { text-align: left; }
  .ae2-games { grid-template-columns: 1fr; }
}
