/* ===== Engine Arcade – Core Theme ===== */

/* Brand colors */
:root {
  --arcade-dark: #050A18;
  --arcade-purple: #7B68EE;
  --arcade-pink: #D946EF;
  --arcade-terminal: #11141F;
  --arcade-gray: #323848;

  /* Light mode tokens */
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 222.2 47.4% 11.2%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 222.2 84% 4.9%;
  --radius: 0.5rem;
}

/* Default to dark theme for Arcade */
.dark {
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --card: 222.2 84% 4.9%;
  --card-foreground: 210 40% 98%;
  --popover: 222.2 84% 4.9%;
  --popover-foreground: 210 40% 98%;
  --primary: 210 40% 98%;
  --primary-foreground: 222.2 47.4% 11.2%;
  --secondary: 217.2 32.6% 17.5%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 217.2 32.6% 17.5%;
  --accent-foreground: 210 40% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 40% 98%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;
  --ring: 212.7 26.8% 83.9%;
}

/* Fonts */
@font-face {
  font-family: 'Arcade';
  src: url('/fonts/arcade.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--arcade-dark);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.logo { height: 32px; width: auto; display: inline-block; }
@media (min-width: 1024px){ .logo { height: 36px; } }

/* Header logo sizing */
.header-logo {
  height: 36px !important;   /* force the height */
  width: auto !important;    /* keep aspect ratio */
  display: inline-block;
  max-width: 100%;
  image-rendering: -webkit-optimize-contrast;
}

/* Optional: constrain the header row so the logo can't stretch it */
.header-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;          /* ensure nice vertical rhythm */
}

/* Containers */
.container { max-width: 1280px; margin: 0 auto; padding: 2rem; }
.container-sm { max-width: 640px; margin: 0 auto; padding: 2rem; }
.container-md { max-width: 768px; margin: 0 auto; padding: 2rem; }
.container-lg { max-width: 1024px; margin: 0 auto; padding: 2rem; }
.container-xl { max-width: 1280px; margin: 0 auto; padding: 2rem; }
.container-2xl { max-width: 1400px; margin: 0 auto; padding: 2rem; }

/* Spacing utilities */
.space-1 { margin: .25rem; } .p-1 { padding: .25rem; }
.space-2 { margin: .5rem; }  .p-2 { padding: .5rem; }
.space-3 { margin: .75rem; } .p-3 { padding: .75rem; }
.space-4 { margin: 1rem; }   .p-4 { padding: 1rem; }
.space-6 { margin: 1.5rem; } .p-6 { padding: 1.5rem; }
.space-8 { margin: 2rem; }   .p-8 { padding: 2rem; }
.space-12 { margin: 3rem; }  .p-12 { padding: 3rem; }
.space-16 { margin: 4rem; }  .p-16 { padding: 4rem; }

/* Radius */
.rounded-sm { border-radius: calc(0.5rem - 4px); }
.rounded-md { border-radius: calc(0.5rem - 2px); }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

/* Typography */
.heading-1 { font-size: 2.25rem; font-weight: 700; }
.heading-2 { font-size: 1.875rem; font-weight: 600; }
.heading-3 { font-size: 1.5rem; font-weight: 600; }
.heading-4 { font-size: 1.25rem; font-weight: 600; }
.body-large { font-size: 1.125rem; line-height: 1.6; }
.body-base { font-size: 1rem; line-height: 1.5; }
.body-small { font-size: .875rem; line-height: 1.4; }
.body-xs { font-size: .75rem; line-height: 1.3; }
.brand-header { font-family: Arial, sans-serif; font-weight: bold; letter-spacing: .2em; text-transform: uppercase; }

/* Gradients */
.gradient-text {
  background: linear-gradient(to right, var(--arcade-purple), var(--arcade-pink));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Cards/terminal surfaces */
.card, .terminal {
  background: var(--arcade-terminal);
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 1.5rem;
}
.terminal { box-shadow: 0 8px 32px rgba(0,0,0,.25); font-family: 'Monaco','Menlo','Ubuntu Mono',monospace; }
.terminal-header { display:flex; align-items:center; margin-bottom:10px; }
.terminal-button { width:12px; height:12px; border-radius:50%; margin-right:6px; }
.close-button { background:#FF5F56; }
.minimize-button { background:#FFBD2E; }
.maximize-button { background:#27C93F; }
.terminal-content { color:#22c55e; }

/* Form elements */
.input {
  width: 100%;
  padding: .75rem 1rem;
  border-radius: .375rem;
  background: rgba(50,56,72,.5);
  color: #fff;
  border: 1px solid #374151;
  transition: all .3s ease;
}
.input::placeholder { color: #a3a3a3; }
.input:focus { outline: none; box-shadow: 0 0 0 2px var(--arcade-purple); }

.button-primary {
  display:inline-flex; align-items:center; justify-content:center;
  padding:.75rem 1rem; background: var(--arcade-purple); color:#fff;
  border-radius:.375rem; border: 1px solid transparent;
  transition: all .2s ease-in-out; cursor:pointer;
}
.button-primary:hover { background: rgba(123,104,238,.9); }

/* Layout helpers */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 1024px) { .grid-2-lg { grid-template-columns: 1fr 2fr; } }

/* Animations */
@keyframes cursor-blink { 0%,100%{opacity:1;} 50%{opacity:0;} }
@keyframes fade-in { 0%{opacity:0; transform:translateY(10px);} 100%{opacity:1; transform:none;} }
@keyframes slide-up { 0%{transform:translateY(20px);opacity:0;} 100%{transform:none;opacity:1;} }
.animate-cursor-blink { animation: cursor-blink 1s step-end infinite; }
.animate-fade-in { animation: fade-in .6s ease-out forwards; }
.animate-slide-up { animation: slide-up .5s ease-out forwards; }
.delay-100{animation-delay:100ms;} .delay-200{animation-delay:200ms;} .delay-300{animation-delay:300ms;}
.delay-400{animation-delay:400ms;} .delay-500{animation-delay:500ms;}

/* Page structure */
.page { min-height: 100vh; background: var(--arcade-dark); color: #fff; }
.header-subtle { color: rgba(255,255,255,.7); }

/* Utility */
.muted { color: rgba(255,255,255,.6); font-size: .875rem; }
pre { white-space: pre-wrap; word-wrap: break-word; }

/* Cursor block */
.cursor { display:inline-block; width:8px; height:15px; background: var(--arcade-purple); margin-left:2px; vertical-align:middle; }
