/* ==========================================================================
   4U.IA.BR - ASTEROIDS 500 INTERNAL SERVER ERROR STYLESHEET
   Authentic Atari Vector Arcade CRT Aesthetics (Electric Cyan & Neon Blue)
   Responsive, Mobile-Ready, High-DPI & Web Audio Synthesizer Optimized
   ========================================================================== */

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

:root {
  --neon-cyan: #00e5ff;
  --neon-cyan-glow: rgba(0, 229, 255, 0.45);
  --neon-cyan-dim: #0284c7;
  --neon-cyan-dark: #082f49;
  --neon-crimson: #f43f5e;
  --neon-crimson-glow: rgba(244, 63, 94, 0.4);
  --bg-space: #020617;
  --bg-surface: #071026;
  --bg-card: #0c1a38;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #38bdf8;
  --border-cyan: rgba(0, 229, 255, 0.28);
  --border-subtle: rgba(0, 229, 255, 0.12);
  --font-retro: 'Press Start 2P', monospace, monospace;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --font-sans: 'Open Sans', system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-space);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(ellipse at 50% 15%, rgba(0, 229, 255, 0.08) 0%, transparent 65%),
    radial-gradient(ellipse at 80% 85%, rgba(244, 63, 94, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse at 20% 80%, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ---------------- Top Header ---------------- */
header.top-header {
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 50;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
}

.header-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
  border: 1px solid var(--border-cyan);
}

.logo-title {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.3px;
  line-height: 1;
  color: #ffffff;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #00e5ff 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.45));
}

.badge-ecosystem {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--neon-cyan);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid var(--border-cyan);
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}

.nav-menu a {
  text-decoration: none;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  letter-spacing: 0.2px;
}

.nav-menu a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  user-select: none;
}

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

.lang-btn.active {
  background: var(--neon-cyan);
  color: #020617;
  box-shadow: 0 0 12px var(--neon-cyan-glow);
  font-weight: 800;
}

.btn-header-store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 229, 255, 0.12);
  color: var(--neon-cyan);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: all 0.2s;
  border: 1px solid var(--border-cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.18);
}

.btn-header-store:hover {
  background: var(--neon-cyan);
  color: #020617;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.7);
  transform: translateY(-1px);
}

/* ---------------- Hero Warning Section ---------------- */
.hero-section {
  padding: 32px 20px 20px;
  text-align: center;
  position: relative;
}

.hero-inner {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
}

.error-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.error-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
  animation: pulse-dot 1s infinite;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  color: #ffffff;
  text-shadow: 0 0 15px rgba(0, 229, 255, 0.35);
}

.hero-title .code-highlight {
  color: var(--neon-cyan);
  text-shadow: 0 0 14px var(--neon-cyan);
}

.hero-subtitle {
  font-size: 15px;
  font-weight: 400;
  color: #cbd5e1;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------------- Vector Arcade Game Board Container ---------------- */
.game-section {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto 30px;
  padding: 0 16px;
  position: relative;
  z-index: 10;
  flex: 1;
}

.arcade-bezel {
  background: #030816;
  border: 2px solid var(--border-cyan);
  border-radius: 16px;
  box-shadow: 
    0 0 35px rgba(0, 229, 255, 0.18),
    inset 0 0 35px rgba(0, 0, 0, 0.85);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

/* CRT Vector Monitor Frame */
.crt-monitor-frame {
  position: relative;
  background: #01030a;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.98);
  overflow: hidden;
}

/* Vector Scanlines and Screen Curvature */
.crt-monitor-frame::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 26, 0) 50%, rgba(0, 0, 0, 0.28) 50%), linear-gradient(90deg, rgba(0, 229, 255, 0.02), rgba(0, 0, 0, 0.01), rgba(244, 63, 94, 0.02));
  background-size: 100% 3px, 6px 100%;
  pointer-events: none;
  z-index: 5;
  opacity: 0.8;
}

.crt-monitor-frame::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: radial-gradient(circle at 50% 50%, transparent 65%, rgba(0, 0, 0, 0.65) 100%);
  pointer-events: none;
  z-index: 6;
}

/* Canvas Wrapper */
.canvas-wrapper {
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 16 / 9;
}

canvas#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background-color: #01030a;
  cursor: crosshair;
}

/* ---------------- Controls & Status Bar ---------------- */
.game-controls-bar {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

.mode-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-cyan);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.mode-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  animation: pulse-dot 1.5s infinite;
}

.btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.control-btn {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid var(--border-cyan);
  color: var(--neon-cyan);
  padding: 7px 14px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  text-decoration: none;
}

.control-btn:hover {
  background: var(--neon-cyan);
  color: #020617;
  box-shadow: 0 0 14px var(--neon-cyan-glow);
  transform: translateY(-1px);
}

.control-btn.active {
  background: rgba(0, 229, 255, 0.22);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.35);
}

/* ---------------- Virtual Controls for Mobile / Touch ---------------- */
.mobile-controls {
  display: none;
  margin-top: 14px;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  user-select: none;
  touch-action: manipulation;
}

.touch-steering-group {
  display: flex;
  gap: 8px;
}

.touch-actions-group {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.touch-btn {
  background: rgba(0, 229, 255, 0.12);
  border: 2px solid var(--border-cyan);
  color: var(--neon-cyan);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, background 0.1s;
  -webkit-tap-highlight-color: transparent;
  height: 50px;
  padding: 0 14px;
  font-size: 13px;
}

.touch-btn:active {
  background: var(--neon-cyan);
  color: #020617;
  transform: scale(0.95);
  box-shadow: 0 0 15px var(--neon-cyan);
}

.btn-rotate {
  width: 52px;
  font-size: 20px;
}

.btn-thrust {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
}

.btn-fire {
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fca5a5;
}

.btn-fire:active {
  background: #f43f5e;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.8);
}

.btn-hyperspace {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: #e9d5ff;
}

@media (max-width: 768px) {
  .mobile-controls {
    display: flex;
  }
}

/* ---------------- Real-time Server Diagnostic & Recovery Card ---------------- */
.recovery-card {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto 40px;
  padding: 0 16px;
}

.recovery-inner {
  background: rgba(7, 16, 38, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-cyan);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.recovery-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.recovery-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.recovery-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-ping-check {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  padding: 9px 18px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-ping-check:hover {
  background: var(--neon-cyan);
  color: #020617;
  box-shadow: 0 0 15px var(--neon-cyan-glow);
  transform: translateY(-1px);
}

.btn-copy-diag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 9px 16px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-diag:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.ping-status-result {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  display: none;
  align-items: center;
  gap: 8px;
}

.ping-status-result.ok {
  display: flex;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
}

.ping-status-result.rebooting {
  display: flex;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid #f43f5e;
  color: #fca5a5;
}

/* ---------------- Site Footer ---------------- */
.site-footer {
  background: #01030a;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  padding: 48px 20px 24px;
  margin-top: auto;
}

.footer-top-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  opacity: 0.45;
}

.footer-container {
  max-width: 1180px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-col-brand .footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 12px;
}

.footer-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.footer-brand-title {
  font-weight: 800;
  font-size: 18px;
}

.footer-brand-desc {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.6;
  max-width: 300px;
}

.footer-col-nav h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--neon-cyan);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.footer-col-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col-nav a {
  text-decoration: none;
  color: #94a3b8;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-col-nav a:hover {
  color: #ffffff;
}

.footer-divider {
  height: 1px;
  background: var(--border-subtle);
  margin-bottom: 24px;
}

.footer-social-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.community-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #94a3b8;
}

.community-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-cyan);
}

.social-icons-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  transition: all 0.2s;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.social-icon-btn svg {
  width: 15px;
  height: 15px;
}

.social-icon-btn:hover {
  background: var(--neon-cyan);
  color: #020617;
  transform: translateY(-2px);
  box-shadow: 0 0 10px var(--neon-cyan);
}

.footer-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #64748b;
  font-family: var(--font-mono);
}

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

.footer-legal-links a {
  color: #64748b;
  text-decoration: none;
}

.footer-legal-links a:hover {
  color: #ffffff;
}

/* ---------------- Responsive Breakpoints ---------------- */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 640px) {
  .nav-menu {
    display: none;
  }
  .hero-title {
    font-size: 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .game-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-group {
    justify-content: center;
  }
}
