/* GBA-Gen1Recomp Design System & Landing Page Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700;800&family=Fira+Code:wght@400;500;600&display=swap');

:root {
  /* Color Tokens */
  --bg-dark: #090d0a;
  --bg-card: #111712;
  --bg-card-hover: #162018;
  --bg-card-alt: #0d130e;
  --bg-glass: rgba(17, 23, 18, 0.75);
  --bg-input: #151d16;
  
  --border-subtle: rgba(16, 185, 129, 0.15);
  --border-glow: rgba(16, 185, 129, 0.35);
  --border-active: #10b981;

  --text-primary: #f0fdf4;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent-emerald: #10b981;
  --accent-mint: #00e676;
  --accent-emerald-dark: #059669;
  --accent-amber: #f59e0b;
  --accent-amber-light: #fbbf24;
  --accent-blue: #3b82f6;
  --accent-red: #ef4444;

  --shadow-emerald: 0 0 25px rgba(16, 185, 129, 0.15);
  --shadow-emerald-lg: 0 10px 40px rgba(0, 230, 118, 0.2);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 100% 50%, rgba(0, 230, 118, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Container */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Announcement Top Bar */
.announcement-bar {
  background: #0e7236;
  color: #ffffff;
  padding: 0.5rem 0;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 100;
}

.announcement-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.announcement-text {
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.35;
  flex: 1;
}

.announcement-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  white-space: nowrap;
}

.announcement-links a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  transition: opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.announcement-links a:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.announcement-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.25rem;
}

.announcement-close:hover {
  color: #fff;
}

/* Navigation Header */
.site-header {
  position: sticky;
  top: 0;
  background: #0d1410;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 90;
  padding: 0.75rem 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: #22c55e;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #071a0e;
  font-weight: 800;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-btn {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: #c9d1d9;
  transition: color 0.2s ease;
  white-space: nowrap;
  line-height: 1.3;
  text-align: center;
}

.nav-btn:hover {
  color: #ffffff;
}

.nav-btn-green {
  background: #22c55e;
  color: #052210;
  font-weight: 700;
  border-radius: 20px;
  padding: 0.42rem 1.05rem;
  font-size: 0.875rem;
}

.nav-btn-green:hover {
  background: #16a34a;
  color: #ffffff;
}

.nav-btn-gold {
  background: #f97316;
  color: #1c0800;
  font-weight: 700;
  border-radius: 20px;
  padding: 0.42rem 1.05rem;
  font-size: 0.875rem;
}

.nav-btn-gold:hover {
  background: #ea6c0a;
  color: #ffffff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  background: transparent;
  border: none;
  color: #8b949e;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease;
  text-decoration: none;
}

.icon-btn:hover {
  color: #ffffff;
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-chevron {
  transition: transform 0.2s ease;
  opacity: 0.7;
  flex-shrink: 0;
}

.nav-dropdown:hover .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 10px;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 200;
}

.nav-dropdown-menu::before {
  content: '';
  display: block;
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #131a14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: -1;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: block;
  position: relative;
  padding: 0.6rem 1.1rem;
  font-size: 0.875rem;
  color: #c9d1d9;
  text-decoration: none;
  white-space: nowrap;
  min-width: 200px;
  transition: color 0.15s ease, background 0.15s ease;
  z-index: 1;
}

.nav-dropdown-item:first-child {
  margin-top: 0.35rem;
}

.nav-dropdown-item:last-child {
  margin-bottom: 0.35rem;
}

.nav-dropdown-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  padding: 3.5rem 0 2rem;
  text-align: center;
}

.breadcrumb-tag,
.breadcrumb-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 1.25rem;
  text-align: center;
  width: 100%;
}

.breadcrumb-tag > a,
.breadcrumb-tag > span:first-child,
.breadcrumb-nav > a,
.breadcrumb-nav > span:first-child {
  color: var(--accent-emerald);
  text-decoration: none;
}

.breadcrumb-tag > a:hover,
.breadcrumb-nav > a:hover {
  text-decoration: underline;
}

.breadcrumb-tag > span:not(:first-child),
.breadcrumb-nav > span:not(:first-child) {
  color: var(--text-muted);
}

.badge-updated {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-mint);
  padding: 0.18rem 0.55rem;
  border-radius: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  margin-left: 0.25rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  max-width: 860px;
  margin: 0 auto 1.25rem;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 1.5rem;
  line-height: 1.65;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
  margin: 2rem 0;
}

/* Cards & Content Sections */
.section-block {
  margin-bottom: 3.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-subtitle {
  font-size: 1.35rem;
  font-weight: 700;
  color: #e5e7eb;
  margin: 1.5rem 0 0.75rem;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  color: #d1d5db;
  font-size: 0.975rem;
  line-height: 1.7;
}

/* Callout Box */
.callout-box {
  background: var(--bg-card-alt);
  border-left: 4px solid var(--accent-emerald);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.04);
}

.callout-box.info {
  border-left-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
}

.callout-box.warning {
  border-left-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.05);
}

.callout-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-content {
  font-size: 0.95rem;
  color: #d1d5db;
}

.callout-content p {
  margin: 0;
}

/* Lists */
.step-list {
  list-style: none;
  margin: 1rem 0;
}

.step-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.85rem;
  color: #d1d5db;
  line-height: 1.6;
}

.step-list li::before {
  content: "•";
  position: absolute;
  left: 0.5rem;
  color: var(--accent-mint);
  font-weight: bold;
  font-size: 1.2rem;
}

.step-list code, .inline-code {
  background: #1a231c;
  color: var(--accent-mint);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Buttons & CTA */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25 ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-dark));
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-emerald);
}

/* Launcher Mockup (Figure 1, 2, 3) */
.launcher-mockup {
  background: #0f1611;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.75rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--shadow-emerald);
  position: relative;
}

.launcher-header {
  background: #090e0a;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.launcher-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.launcher-brand .gold {
  color: var(--accent-amber);
}

.launcher-tabs {
  display: flex;
  gap: 0.5rem;
}

.tab-btn {
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active-red {
  background: #ef4444;
  color: #fff;
}

.tab-btn.active-blue {
  background: #3b82f6;
  color: #fff;
}

.tab-btn.active-yellow {
  background: #eab308;
  color: #000;
}

.tab-btn.active-custom {
  background: var(--accent-emerald);
  color: #000;
}

.launcher-body {
  padding: 1.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .launcher-body {
    grid-template-columns: 1fr;
  }
}

.launcher-card {
  background: #141c16;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.launcher-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.rom-status-box {
  background: #0b100c;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}

.rom-status-box.loaded {
  border-style: solid;
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.08);
}

.rom-status-text {
  font-size: 0.9rem;
  color: #d1d5db;
  margin-bottom: 0.5rem;
}

.rom-file-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-mint);
  word-break: break-all;
}

.action-btn-lg {
  width: 100%;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-select-rom {
  background: #2563eb;
  color: #ffffff;
}

.btn-select-rom:hover {
  background: #1d4ed8;
}

.btn-start-play {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.btn-start-play:hover {
  background: linear-gradient(135deg, #059669, #047857);
}

/* Red Arrow Overlay simulation */
.red-arrow-indicator {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  animation: bounce 1.5s infinite;
}

.red-arrow-icon {
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 24px solid #ef4444;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Figure Caption */
.figure-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-style: italic;
}

/* 3D Canvas Mockup */
.canvas-container {
  width: 100%;
  height: 380px;
  background: #050806;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#voxelCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-overlay-ui {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.hud-badge {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  color: #fff;
  font-family: var(--font-mono);
}

/* Quick Fixes Accordion */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.accordion-item:hover {
  border-color: var(--border-glow);
}

.accordion-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  user-select: none;
}

.accordion-icon {
  font-size: 1.1rem;
  color: var(--accent-mint);
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.25rem;
  background: var(--bg-card-alt);
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.accordion-item.active .accordion-content {
  max-height: 300px;
  padding: 0.85rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Links inside content */
a.inline-link {
  color: var(--accent-mint);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-emerald);
  transition: border-color 0.2s;
}

a.inline-link:hover {
  color: #ffffff;
  border-bottom-style: solid;
}

/* Footer */
.site-footer {
  background: #060907;
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid,
.footer-wrapper {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 868px) {
  .footer-grid,
  .footer-wrapper {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 540px) {
  .footer-grid,
  .footer-wrapper {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent-mint);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}
