/* Picocomputer 6502 Arcade Showcase Styles */
:root {
  --bg-main: #0a0e17;
  --bg-card: #111827;
  --bg-card-hover: #172033;
  --bg-cabinet: #050811;
  --border-color: #1f293d;
  --border-highlight: #38bdf8;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-cyan: #38bdf8;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-violet: #818cf8;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  
  --glow-cyan: 0 0 25px rgba(56, 189, 248, 0.25);
  --glow-amber: 0 0 25px rgba(245, 158, 11, 0.25);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.12), transparent 70%),
    radial-gradient(circle at 90% 80%, rgba(129, 140, 248, 0.05), transparent 40%),
    linear-gradient(180deg, #0a0e17 0%, #080c14 100%);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

a:hover {
  color: #7dd3fc;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Nav */
header.site-header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.brand-badge {
  background: linear-gradient(135deg, #0284c7, #6366f1);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-link {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: var(--text-main);
}

/* Hero Section */
.hero {
  padding: 48px 0 36px;
  text-align: center;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 9999px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 28px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(31, 41, 61, 0.6);
  max-width: 720px;
  margin: 0 auto;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Games Grid */
.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), var(--glow-cyan);
}

.game-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #030712;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  transition: transform 0.3s ease;
}

.game-card:hover .game-thumb {
  transform: scale(1.03);
}

.game-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.game-badge.rom-badge {
  left: 12px;
  right: auto;
  background: rgba(2, 132, 199, 0.85);
  border-color: rgba(56, 189, 248, 0.4);
  color: #fff;
}

.game-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-family: var(--font-mono);
}

.game-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}

.game-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.5);
  color: #ffffff;
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Breadcrumb Navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 20px 0 10px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent-cyan);
}

/* Game Page Layout */
.game-header {
  padding: 16px 0 24px;
}

.game-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.game-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.game-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Emulator Cabinet / Viewport */
.arcade-cabinet {
  background: var(--bg-cabinet);
  border: 2px solid #1e293b;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.15);
  overflow: hidden;
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
}

.cabinet-topbar {
  background: #0f172a;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cabinet-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: #e2e8f0;
}

.led-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-led 2s infinite;
}

@keyframes pulse-led {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

.cabinet-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cabinet-screen-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 640px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cabinet-screen-wrap.widescreen {
  aspect-ratio: 16 / 9;
}

.cabinet-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.cabinet-footer {
  background: #0f172a;
  border-top: 1px solid var(--border-color);
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cabinet-tips {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Detail Content Layout */
.game-details-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-bottom: 60px;
}

@media (max-width: 860px) {
  .game-details-grid {
    grid-template-columns: 1fr;
  }
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.content-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.content-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 18px 0 8px;
}

.content-card p {
  color: var(--text-muted);
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.content-card ul, .content-card ol {
  color: var(--text-muted);
  margin-left: 20px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.content-card li {
  margin-bottom: 6px;
}

/* Tables & Keyboards */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
}

.data-table th, .data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #e2e8f0;
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 4px;
  box-shadow: 0 2px 0 #0f172a;
}

.badge-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Sidebar Info List */
.info-list {
  list-style: none;
  margin: 0 !important;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--text-dim);
}

.info-value {
  color: #f1f5f9;
  font-weight: 500;
  font-family: var(--font-mono);
  text-align: right;
}

/* Media Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #000;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
}

/* Footer */
footer.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: #050811;
  padding: 40px 0 30px;
  font-size: 0.875rem;
  color: var(--text-dim);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .games-grid { grid-template-columns: 1fr; }
  .cabinet-footer { flex-direction: column; align-items: flex-start; }
}
