/* ============================================
   Emulator Matrix Hub & System Detail Pages
   ============================================ */

/* --- Hub Hero --- */
.emu-hub-hero {
  text-align: center;
  padding: 100px 24px 48px;
  position: relative;
}
.emu-hub-inner { max-width: var(--max-width); margin: 0 auto; }
.emu-hub-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--cyan); padding: 6px 16px;
  border: 1px solid rgba(0,180,216,0.3);
  border-radius: 4px; margin-bottom: 20px;
  background: rgba(0,180,216,0.08);
}
.emu-hub-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800; color: var(--chrome-white);
  margin-bottom: 12px; line-height: 1.1;
}
.emu-hub-subtitle {
  font-size: 16px; color: var(--chrome-silver);
  max-width: 600px; margin: 0 auto; line-height: 1.6;
}

/* --- Hub Filters --- */
.emu-hub-filters {
  position: sticky; top: var(--nav-height); z-index: 80;
  background: rgba(0,0,17,0.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--panel-border);
  padding: 12px 0;
}
.emu-hub-filters-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
}

/* --- System Grid --- */
.emu-system-grid-wrap {
  max-width: var(--max-width); margin: 0 auto; padding: 32px 24px 64px;
}
.emu-system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.emu-system-card {
  background: var(--bg-panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px; padding: 20px;
  text-decoration: none; color: inherit;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.emu-system-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 8px 32px rgba(0,180,216,0.1);
}

/* --- System Card Elements --- */
.esc-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.esc-abbr {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 900; color: var(--cyan);
  letter-spacing: 1px;
}
.esc-gen {
  font-family: var(--font-heading);
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted);
  padding: 3px 8px; border-radius: 4px;
  background: rgba(255,255,255,0.05);
}
.esc-name {
  font-family: var(--font-heading);
  font-size: 15px; font-weight: 700; color: var(--chrome-white);
  margin-bottom: 2px;
}
.esc-year {
  font-size: 12px; color: var(--text-muted); margin-bottom: 16px;
}
.esc-stats {
  display: flex; gap: 16px; margin-bottom: 12px;
  padding-top: 12px; border-top: 1px solid var(--panel-border);
}
.esc-stat { text-align: center; flex: 1; }
.esc-stat-num {
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 800; color: var(--chrome-white);
  display: block; line-height: 1;
}
.esc-perfect-num { color: var(--green); }
.esc-stat-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted); margin-top: 4px;
}
.esc-tagline {
  font-size: 12px; color: var(--chrome-silver); line-height: 1.5;
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--panel-border);
}

/* ============================================
   System Detail Page
   ============================================ */

/* --- Breadcrumb --- */
.emu-breadcrumb {
  max-width: var(--max-width); margin: 0 auto;
  padding: 80px 24px 0; font-size: 13px; color: var(--text-muted);
}
.emu-breadcrumb a { color: var(--chrome-silver); text-decoration: none; }
.emu-breadcrumb a:hover { color: var(--cyan); }
.emu-breadcrumb span { margin: 0 6px; opacity: 0.4; }

/* --- System Hero --- */
.emu-hero {
  max-width: var(--max-width); margin: 0 auto; padding: 24px 24px 0;
}
.emu-hero-inner {
  display: grid; grid-template-columns: 200px 1fr; gap: 40px;
  align-items: start; padding-bottom: 32px;
}
.emu-system-icon-wrap {
  background: linear-gradient(135deg, #0a0a2e, #111144);
  border-radius: 16px; border: 1px solid var(--panel-border);
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
}
.emu-system-icon-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.emu-system-abbr-large {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 900; color: var(--cyan);
  letter-spacing: 2px; opacity: 0.6;
}
.emu-hero-badges { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.badge-gen { background: rgba(0,180,216,0.1); color: var(--cyan); border: 1px solid rgba(0,180,216,0.2); }
.badge-mfr { background: rgba(255,255,255,0.05); color: var(--chrome-silver); border: 1px solid rgba(255,255,255,0.08); }
.emu-hero-name {
  font-family: var(--font-heading);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900; color: var(--chrome-white);
  line-height: 1.1; margin-bottom: 8px;
}
.emu-hero-tagline {
  font-size: 15px; color: var(--chrome-silver);
  line-height: 1.6; margin-bottom: 20px;
}

/* --- Quick Stats --- */
.emu-quick-stats {
  display: flex; gap: 16px; flex-wrap: wrap;
}
.eqs-item {
  background: rgba(0,20,80,0.3); border: 1px solid var(--panel-border);
  border-radius: 8px; padding: 12px 20px; text-align: center;
  flex: 1; min-width: 100px;
}
.eqs-num {
  font-family: var(--font-heading);
  font-size: 28px; font-weight: 900; color: var(--chrome-white);
  line-height: 1;
}
.eqs-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted); margin-top: 4px;
}

/* --- Compatibility Section --- */
.emu-compat-section {
  max-width: var(--max-width); margin: 0 auto; padding: 32px 24px;
}
.emu-compat-inner {}
.emu-section-label {
  font-family: var(--font-heading);
  font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 16px;
}

/* --- Rating Filter --- */
.emu-rating-filter {
  display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap;
}

/* --- Compatibility Table --- */
.emu-compat-table-wrap {
  background: var(--bg-panel); border: 1px solid var(--panel-border);
  border-radius: 12px; overflow: hidden; margin-bottom: 16px;
}
.emu-compat-table { width: 100%; border-collapse: collapse; }
.emu-compat-table thead {
  background: rgba(0,180,216,0.05);
}
.emu-compat-table th {
  font-family: var(--font-heading);
  font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--cyan); padding: 12px 16px; text-align: left;
}
.emu-compat-table th:last-child { text-align: right; }
.emu-compat-row {
  border-top: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s;
}
.emu-compat-row:hover { background: rgba(0,180,216,0.02); }
.emu-ct-name {
  padding: 12px 16px; font-size: 14px; font-weight: 600;
}
.emu-ct-name a { color: var(--chrome-white); text-decoration: none; }
.emu-ct-name a:hover { color: var(--cyan); }
.emu-ct-brand {
  padding: 12px 16px; font-size: 13px; color: var(--chrome-silver);
}
.emu-ct-price {
  padding: 12px 16px; font-family: var(--font-heading);
  font-size: 14px; font-weight: 700; color: var(--cyan);
}
.emu-ct-chip {
  padding: 12px 16px; font-size: 12px; color: var(--text-muted);
}
.emu-ct-rating { padding: 12px 16px; }
.emu-ct-link {
  padding: 12px 16px; text-align: right;
}
.emu-ct-link a {
  font-size: 12px; color: var(--cyan); text-decoration: none;
  font-weight: 600;
}
.emu-ct-link a:hover { text-decoration: underline; }

/* --- Main Layout (content + sidebar) --- */
.emu-main-layout {
  max-width: var(--max-width); margin: 0 auto; padding: 32px 24px 64px;
  display: grid; grid-template-columns: 1fr 300px; gap: 32px;
}
.emu-content {}

/* --- Emulator Recommendation Cards --- */
.emu-recs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.emu-rec-card {
  background: var(--bg-panel); border: 1px solid var(--panel-border);
  border-radius: 12px; padding: 20px;
  transition: border-color 0.2s;
}
.emu-rec-card:hover { border-color: rgba(0,180,216,0.3); }
.erc-name {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 800; color: var(--chrome-white);
  margin-bottom: 4px;
}
.erc-platforms {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--cyan); margin-bottom: 10px;
}
.erc-notes {
  font-size: 13px; color: var(--chrome-silver); line-height: 1.6;
  margin-bottom: 12px;
}
.erc-link {
  font-family: var(--font-heading);
  font-size: 12px; font-weight: 600; color: var(--cyan);
  text-decoration: none;
}
.erc-link:hover { text-decoration: underline; }

/* --- About Section --- */
.emu-about {
  background: var(--bg-panel); border: 1px solid var(--panel-border);
  border-radius: 12px; padding: 24px;
}
.emu-about p {
  font-size: 14px; color: var(--chrome-silver); line-height: 1.7;
}

/* --- Sidebar --- */
.emu-sidebar { position: sticky; top: calc(var(--nav-height) + 60px); }
.emu-sb-device-name {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 700; color: var(--chrome-white);
  margin-bottom: 4px;
}
.sb-text {
  font-size: 13px; color: var(--chrome-silver); line-height: 1.5;
  margin-bottom: 12px;
}

/* --- Cross-link from device pages --- */
a.emu-card { text-decoration: none; color: inherit; }
a.emu-card:hover { border-color: var(--cyan); }
.emu-name a { color: inherit; text-decoration: none; }
.emu-name a:hover { color: var(--cyan); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .emu-hub-hero { padding: 80px 16px 32px; }

  .emu-hub-filters-inner { padding: 0 16px; }

  .emu-system-grid-wrap { padding: 24px 16px 48px; }
  .emu-system-grid {
    grid-template-columns: 1fr;
  }

  .emu-breadcrumb { padding: 72px 16px 0; }

  .emu-hero { padding: 16px 16px 0; }
  .emu-hero-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .emu-system-icon-wrap {
    width: 120px; height: 120px;
    margin: 0 auto;
  }
  .emu-system-abbr-large { font-size: 28px; }
  .emu-hero-right { text-align: center; }
  .emu-hero-badges { justify-content: center; }
  .emu-quick-stats { justify-content: center; }

  .emu-compat-section { padding: 24px 16px; }
  .emu-compat-table-wrap { overflow-x: auto; }
  .emu-compat-table { min-width: 600px; }

  .emu-main-layout {
    grid-template-columns: 1fr;
    padding: 24px 16px 48px;
  }
  .emu-sidebar { position: static; }

  .emu-recs {
    grid-template-columns: 1fr;
  }
}
