/* Minimal legacy overrides preserved for compatibility; most styling is done with Tailwind.
   As templates have been migrated, several legacy helper rules were removed here
   to encourage Tailwind usage. We keep a small GIF sizing rule and `.disabled`
   for compat with any remaining static previews. Remove this file when the
   repo has been fully migrated.
*/

/* Migration note: legacy gif sizing and `.disabled` helper removed — templates
   use Tailwind utilities and explicit image classes now. Keep a minimal
   compatibility note here during transition.
*/

:root {
  --fallback-text: #111827; /* Tailwind gray-900 */
  --fallback-muted: #6b7280; /* Tailwind gray-500 */
}

input,
textarea,
select {
  color: var(--fallback-text);
  background-color: #fff;
}

input::placeholder,
textarea::placeholder {
  color: var(--fallback-muted);
}

body.arcade-fullscreen {
  overflow: hidden;
  height: 100vh;
}

body.arcade-fullscreen main {
  padding: 0;
  padding-top: 4rem;
}

body.arcade-fullscreen main > div {
  max-width: none;
  width: 100%;
  margin: 0;
}

body.arcade-fullscreen nav {
  display: none;
}

.anden-stage {
  position: relative;
  background: rgba(11, 27, 51, 0.85);
  border-radius: 1.5rem;
  padding: 1.25rem 1rem 2rem;
  box-shadow: 0 20px 60px rgba(5, 10, 20, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  min-height: 480px;
}

.anden-canvas {
  width: 100%;
  height: auto;
  display: block;
  background: #68b;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 1.25rem;
  image-rendering: pixelated;
  box-shadow: 0 15px 40px rgba(5, 10, 20, 0.45);
}

.anden-hud {
  display: flex;
  width: 100%;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.anden-pill {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.anden-pill-muted {
  font-weight: 400;
  opacity: 0.85;
}

.anden-tip {
  font-size: 0.85rem;
  opacity: 0.85;
  text-align: center;
}

.anden-meta {
  max-width: 640px;
  margin: 0 auto;
}

.anden-card {
  position: relative;
}

.anden-canvas-wrap {
  position: relative;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.anden-hud {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  right: 0.6rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  pointer-events: none;
  flex-wrap: wrap;
}

.anden-pill {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.75);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.5);
}

.anden-pill.is-hidden {
  display: none;
}

.anden-pill.is-level-up {
  font-size: 1.2rem;
  padding: 0.55rem 1.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fffbe8;
  background: linear-gradient(120deg, rgba(255, 215, 0, 0.92), rgba(255, 111, 97, 0.92));
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.45), 0 12px 24px rgba(16, 24, 40, 0.55);
  animation: anden-level-flash 0.5s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(46, 17, 0, 0.45);
}

.anden-pill.is-level-up::before {
  content: '⚡';
  margin-right: 0.35rem;
}

.anden-pill.is-level-up::after {
  content: '⚡';
  margin-left: 0.35rem;
}

@keyframes anden-level-flash {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.75));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
  }
}

.anden-pill-muted {
  font-weight: 500;
  opacity: 0.85;
}

body.arcade-fullscreen .anden-card {
  background: transparent;
  box-shadow: none;
  padding: clamp(0.75rem, 4vw, 2.5rem);
}

body.arcade-fullscreen .anden-extra {
  display: none;
}

body.arcade-fullscreen .anden-canvas-wrap {
  width: min(
    100vw - clamp(1rem, 4vw, 3rem),
    calc((100vh - clamp(2rem, 6vw, 4rem)) / 2)
  );
  max-width: none;
  max-height: calc(100vh - clamp(2.5rem, 8vw, 5rem));
  margin-left: auto;
  margin-right: auto;
}

body.arcade-fullscreen .anden-canvas {
  width: 100%;
  height: auto;
}

.arcade-back-button {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1400;
  border: none;
  border-radius: 9999px;
  padding: 0.5rem 0.95rem;
  font-weight: 600;
  font-size: 0.95rem;
  background: rgba(17, 24, 39, 0.75);
  color: #fdf2f8;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.arcade-back-button::before {
  content: '←';
  font-size: 1rem;
}

.arcade-back-button:focus-visible {
  outline: 2px solid rgba(248, 250, 252, 0.8);
  outline-offset: 2px;
}

body[data-arcade-back="1"] .arcade-back-button {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body[data-immersive-active="1"] {
  overflow: hidden;
}

body[data-immersive-active="1"] nav {
  display: none;
}

body[data-immersive-active="1"] main {
  padding: 0;
}

body[data-immersive-active="1"] main > div {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

.arcade-stage {
  touch-action: none;
  position: relative;
}

.arcade-stage canvas {
  touch-action: none;
}

.reindeer-immersive-stage {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  pointer-events: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.reindeer-immersive-stage[data-active="1"] {
  display: flex;
  pointer-events: auto;
}

.reindeer-immersive-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(15,23,42,0.95), rgba(2,6,23,0.95)), url('/api/placeholder/1920/1080');
  background-size: cover;
  background-position: center;
  filter: saturate(1.2);
}

.reindeer-immersive-frame {
  position: relative;
  width: min(100vw, 1400px);
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(15,23,42,0.8);
  border: 2px solid rgba(248,250,252,0.25);
}

.reindeer-immersive-canvas {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(248, 250, 252, 0.7);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.reindeer-immersive-hint {
  position: absolute;
  top: 30px;
  right: 30px;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(15,23,42,0.75);
  color: #f8fafc;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.reindeer-immersive-hint[data-visible="1"] {
  opacity: 1;
}

.reindeer-immersive-exit {
  position: absolute;
  bottom: 28px;
  right: 28px;
  background: rgba(248,250,252,0.15);
  color: #f8fafc;
  border: 1px solid rgba(248,250,252,0.4);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}

.reindeer-immersive-exit:hover {
  background: rgba(248,250,252,0.35);
}
