/**
 * AndroidEmulator.org — Engine HUD & Technical Instrument Layouts
 * Spec: Linear × Raycast × RTINGS × PCGamingWiki
 */

@layer layouts, components;

@layer layouts {
  /* ==========================================================================
     1. Engine HUD (Hero Container)
     ========================================================================== */
  .ae-engine-hud {
    background: var(--ae-surface-1);
    border: 1px solid var(--ae-border-strong);
    border-radius: var(--ae-radius-xl);
    padding: var(--ae-space-8) var(--ae-space-8);
    margin: var(--ae-space-6) auto var(--ae-space-6);
    box-shadow: var(--ae-shadow-sm);
    position: relative;
    overflow: hidden;
  }

  .ae-hud-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--ae-space-6);
    margin-bottom: var(--ae-space-6);
  }

  .ae-hud-identity {
    display: flex;
    gap: var(--ae-space-5);
    align-items: center;
  }

  .ae-hud-logo-wrap {
    width: 68px;
    height: 68px;
    border-radius: var(--ae-radius-lg);
    background: var(--ae-surface-2);
    border: 1px solid var(--ae-border);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    overflow: hidden;
  }

  .ae-hud-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .ae-hud-title-wrap h1 {
    font-size: var(--ae-h1);
    font-weight: 800;
    color: var(--ae-text-1);
    margin: 0 0 4px;
    letter-spacing: -0.03em;
    line-height: 1.1;
  }

  .ae-hud-subtitle {
    font-size: var(--ae-text-md);
    color: var(--ae-text-3);
    margin: 0 0 var(--ae-space-2);
  }

  .ae-hud-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .ae-hud-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--ae-space-3);
    min-width: 320px;
  }

  .ae-hud-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ae-space-3);
    padding-top: var(--ae-space-5);
    border-top: 1px solid var(--ae-border-subtle);
  }

  /* ==========================================================================
     2. Quick Verdict Banner (Instant System Match)
     ========================================================================== */
  .ae-quick-verdict-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ae-space-4);
    background: var(--ae-surface-2);
    border: 1px solid var(--ae-border-strong);
    border-radius: var(--ae-radius-lg);
    padding: var(--ae-space-3) var(--ae-space-5);
    margin-bottom: var(--ae-space-6);
  }

  .ae-verdict-left {
    display: flex;
    align-items: center;
    gap: var(--ae-space-3);
  }

  .ae-verdict-system-tag {
    font-family: var(--ae-font-mono);
    font-size: var(--ae-text-xs);
    color: var(--ae-text-3);
    background: var(--ae-surface-1);
    padding: 3px 8px;
    border-radius: var(--ae-radius-sm);
    border: 1px solid var(--ae-border);
  }

  .ae-verdict-status {
    font-family: var(--ae-font-mono);
    font-size: var(--ae-text-sm);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .ae-verdict-fps {
    font-family: var(--ae-font-mono);
    font-size: var(--ae-text-sm);
    color: var(--ae-text-2);
    font-weight: 600;
  }

  /* ==========================================================================
     3. Two-Column Main Grid
     ========================================================================== */
  .ae-engine-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: var(--ae-space-8);
    margin-top: var(--ae-space-6);
  }

  .ae-hud-section {
    background: var(--ae-surface-1);
    border: 1px solid var(--ae-border);
    border-radius: var(--ae-radius-lg);
    padding: var(--ae-space-6);
    margin-bottom: var(--ae-space-6);
  }

  .ae-hud-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--ae-space-4);
    padding-bottom: var(--ae-space-3);
    border-bottom: 1px solid var(--ae-border-subtle);
  }

  .ae-hud-section-title {
    font-size: var(--ae-h4);
    font-weight: 700;
    color: var(--ae-text-1);
    margin: 0;
    letter-spacing: -0.01em;
  }

  /* ==========================================================================
     4. Technical Capabilities Matrix (4 Quadrants)
     ========================================================================== */
  .ae-capabilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--ae-space-4);
  }

  .ae-capability-quadrant {
    background: var(--ae-surface-2);
    border: 1px solid var(--ae-border);
    border-radius: var(--ae-radius-md);
    padding: var(--ae-space-4);
  }

  .ae-quadrant-title {
    font-family: var(--ae-font-sans);
    font-size: var(--ae-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ae-text-3);
    margin: 0 0 var(--ae-space-3);
  }

  .ae-quadrant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--ae-text-xs);
    padding: 4px 0;
    color: var(--ae-text-2);
  }

  .ae-check {
    color: var(--ae-green);
    font-weight: 700;
    font-family: var(--ae-font-mono);
  }

  .ae-unsupported {
    color: var(--ae-text-disabled);
    font-weight: 700;
    font-family: var(--ae-font-mono);
  }

  /* ==========================================================================
     5. Benchmarks Matrix (AE Score)
     ========================================================================== */
  .ae-benchmark-bars {
    display: flex;
    flex-direction: column;
    gap: var(--ae-space-3);
  }

  .ae-bench-row {
    display: grid;
    grid-template-columns: 140px 1fr 60px;
    align-items: center;
    gap: var(--ae-space-4);
    font-size: var(--ae-text-xs);
  }

  .ae-bench-label {
    font-weight: 600;
    color: var(--ae-text-2);
  }

  .ae-bench-meter-bg {
    height: 8px;
    background: var(--ae-surface-3);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
  }

  .ae-bench-meter-fill {
    height: 100%;
    background: var(--ae-blue);
    border-radius: 9999px;
  }

  .ae-bench-score {
    font-family: var(--ae-font-mono);
    font-weight: 700;
    text-align: right;
    color: var(--ae-text-1);
  }

  /* ==========================================================================
     6. Tested Games Grid (Playability Rows)
     ========================================================================== */
  .ae-game-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--ae-surface-2);
    border: 1px solid var(--ae-border-subtle);
    border-radius: var(--ae-radius-md);
    margin-bottom: var(--ae-space-2);
    transition: all var(--ae-transition-fast);
  }

  .ae-game-row:hover {
    border-color: var(--ae-border-strong);
    background: var(--ae-surface-1);
  }

  .ae-game-title {
    font-weight: 600;
    font-size: var(--ae-text-sm);
    color: var(--ae-text-1);
    text-decoration: none;
  }

  .ae-game-fps-badge {
    font-family: var(--ae-font-mono);
    font-size: var(--ae-text-xs);
    font-weight: 700;
    color: var(--ae-green);
    background: var(--ae-green-soft);
    border: 1px solid var(--ae-green-border);
    padding: 3px 8px;
    border-radius: var(--ae-radius-sm);
  }

  /* ==========================================================================
     Responsive Adjustments
     ========================================================================== */
  @media (max-width: 1024px) {
    .ae-engine-main-grid {
      grid-template-columns: 1fr;
    }
    .ae-hud-top {
      flex-direction: column;
    }
    .ae-hud-kpi-grid {
      width: 100%;
      min-width: 0;
    }
  }

  @media (max-width: 768px) {
    .ae-engine-hud {
      padding: var(--ae-space-5);
    }
    .ae-capabilities-grid {
      grid-template-columns: 1fr;
    }
    .ae-hud-title-wrap h1 {
      font-size: var(--ae-h2);
    }
    .ae-quick-verdict-banner {
      flex-direction: column;
      align-items: flex-start;
    }
  }
}
