:root {
  --lime: #A5CE1F;
  --orange: #E6460B;
  --purple: #5400CC;
  --turquoise: #07BEAA;
  --yellow: #FFC813;
  --dark: #1E1E1E;
  --white: #f5f5f5;
}

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

body {
  background: var(--white);
  font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  min-height: 100vh;
}

/* ── ACCESSIBILITY ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  background: var(--dark);
  color: var(--white);
  padding: 0.6rem 1.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
  z-index: 9999;
  transition: top 0.15s;
}

.skip-link:focus {
  top: 0;
}

/* ── TICKER ── */
.ticker {
  position: fixed;
  left: 0;
  right: 0;
  background: var(--dark);
  height: 48px;
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 10;
}

.ticker-top { top: 0; }
.ticker-bottom { bottom: 0; }

.ticker-track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: slide 100s linear infinite;
}

.ticker-bottom .ticker-track {
  animation-direction: reverse;
}

@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker-item {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  flex-shrink: 0;
}

.ticker-dot {
  color: var(--lime);
  margin-right: 3rem;
}

/* ── COMING SOON ── */
.coming-soon {
  position: fixed;
  top: 60px;
  left: 2.5rem;
  font-size: clamp(3rem, 7vw, 8rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 0.85;
  text-transform: uppercase;
  -webkit-text-stroke: 2px var(--dark);
}

/* ── LOGO ── */
.logo {
  position: fixed;
  top: 60px;
  right: 2.5rem;
  width: 200px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo:hover {
  transform: scale(1.06);
}

/* ── GAMES ── */
.games {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
}

.games-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--dark);
  opacity: 0.3;
  animation: fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.games-inner {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.5rem;
  align-items: center;
}

.game-btn {
  width: 82px;
  height: 114px;
  background: #272727;
  border-radius: 4px 4px 3px 3px;
  border: none;
  cursor: pointer;
  font-family: 'Lato', Arial, sans-serif;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10px 9px 22px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s;
  overflow: hidden;
}

/* Daumenkerbe oben */
.game-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 8px;
  background: rgba(255,255,255,0.07);
  border-radius: 0 0 8px 8px;
}

/* Goldkontakte unten */
.game-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 9px;
  right: 9px;
  height: 18px;
  background: repeating-linear-gradient(
    90deg,
    #b8962e 0, #d4ab3a 3px, #272727 3px, #272727 6px
  );
  border-radius: 0 0 2px 2px;
}

.game-btn:hover {
  transform: translateY(-12px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Kassettenlabel */
.cartridge-label {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.2rem;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}

.game-btn:nth-child(1) .cartridge-label { background: var(--lime); }
.game-btn:nth-child(2) .cartridge-label { background: var(--orange); }
.game-btn:nth-child(3) .cartridge-label { background: var(--purple); }
.game-btn:nth-child(4) .cartridge-label { background: var(--turquoise); }
.game-btn:nth-child(5) .cartridge-label { background: var(--yellow); }

.game-icon {
  font-size: 1.6rem;
  display: block;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  line-height: 1;
}

.game-btn:hover .game-icon {
  transform: scale(1.15);
}

.game-label {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dark);
}

/* Helle Schrift auf dunklen Labels */
.game-btn:nth-child(2) .game-label,
.game-btn:nth-child(3) .game-label { color: var(--white); }

/* ── CONTACT ── */
.contact {
  position: fixed;
  bottom: 48px;
  left: 0;
  right: 0;
  padding: 2rem 2.5rem;
  background: var(--white);
  border-top: 1px solid rgba(30, 30, 30, 0.08);
}

.contact-heading {
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 1rem;
}

.contact-form {
  display: flex;
  gap: 8px;
}

.contact-form input {
  flex: 1;
  padding: 0.9rem 1.2rem;
  font-family: 'Lato', Arial, sans-serif;
  font-size: 0.88rem;
  color: var(--dark);
  background: transparent;
  border: 1px solid var(--dark);
  outline: none;
}

.contact-form input::placeholder {
  color: var(--dark);
  opacity: 0.35;
}

.contact-form input:focus {
  background: var(--purple);
}

.contact-form button {
  padding: 0.9rem 2rem;
  font-family: 'Lato', Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--lime);
  color: var(--dark);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.contact-form button:hover {
  background: var(--yellow);
}

.contact-form button:focus {
  outline: 2px solid var(--dark);
  outline-offset: 2px;
}

.contact-msg {
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.contact-msg--ok  { color: var(--lime); }
.contact-msg--err { color: var(--orange); }

/* Touch-Geräte: keine Hover-Effekte */
@media (hover: none) {
  .game-btn:hover           { transform: none; }
  .game-btn:hover .game-icon { transform: none; }
  .logo:hover               { transform: none; }
}

/* ── MOBILE GAME CONTROLS ── */
.game-dpad {
  display: grid;
  grid-template-columns: repeat(3, 60px);
  grid-template-rows: repeat(3, 60px);
  gap: 4px;
  margin-top: 1rem;
  justify-self: center;
}

.dpad-btn {
  width: 60px;
  height: 60px;
  background: var(--dark);
  color: var(--white);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s;
  user-select: none;
}

.dpad-btn:active { background: var(--purple); }

.dpad-empty { width: 60px; height: 60px; }

.mobile-numpad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-top: 1rem;
  width: 100%;
  max-width: 320px;
}

.numpad-btn {
  height: 52px;
  background: var(--dark);
  color: var(--white);
  border: none;
  font-family: 'Lato', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s;
  user-select: none;
}

.numpad-btn:active    { background: var(--purple); }
.numpad-btn--delete   { background: var(--orange); }
.numpad-btn--delete:active { background: #c03a08; }

/* ── MODAL ── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--white);
  flex-direction: column;
}

.modal.open {
  display: flex;
  animation: modal-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  background: var(--dark);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  flex-shrink: 0;
}

.modal-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--white);
}

.modal-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
  font-family: 'Lato', Arial, sans-serif;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.modal-close:hover {
  opacity: 1;
}

#modal-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 2rem;
}

/* Canvas games scale down on small screens */
canvas {
  max-width: 100%;
  height: auto;
}

/* ── RESPONSIVE ── */

@media (max-width: 900px) {
  .coming-soon {
    font-size: clamp(2rem, 7vw, 5rem);
  }

  .logo {
    width: 160px;
    top: 58px;
  }

  .games-inner {
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .ticker {
    height: 38px;
  }

  .ticker-item {
    font-size: 0.65rem;
  }

  .coming-soon {
    top: 38px;
    left: 1rem;
    font-size: clamp(2.2rem, 11vw, 4rem);
    -webkit-text-stroke: 1.5px var(--dark);
  }

  .logo {
    width: 90px;
    top: 48px;
    right: 1rem;
  }

  .games-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 0 1rem;
  }

  .game-btn {
    width: 62px;
    height: 88px;
    padding: 8px 7px 18px;
  }

  .game-btn::after {
    height: 14px;
  }

  .game-icon {
    font-size: 1.2rem;
  }

  .game-label {
    font-size: 0.42rem;
    letter-spacing: 1px;
  }

  .contact {
    bottom: 38px;
    padding: 1rem 1rem;
  }

  .contact-heading {
    font-size: 0.65rem;
    margin-bottom: 0.6rem;
  }

  .contact-form {
    flex-direction: column;
    gap: 8px;
  }

  .contact-form input,
  .contact-form button {
    width: 100%;
  }

  #modal-body {
    padding: 1rem;
    align-items: flex-start;
    justify-content: flex-start;
  }
}

/* ── LOAD ANIMATIONS ── */
@keyframes ticker-top-in {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}
@keyframes ticker-bottom-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes fade-right {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes letter-in {
  from { opacity: 0; transform: translateY(60%) skewY(6deg); }
  to   { opacity: 1; transform: translateY(0) skewY(0deg); }
}

.ticker-top    { animation: ticker-top-in    0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.ticker-bottom { animation: ticker-bottom-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }

.logo    { animation: fade-right 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both; }
.contact { animation: fade-up    0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.8s  both; }

.game-btn:nth-child(1) { animation: fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.40s both; }
.game-btn:nth-child(2) { animation: fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.50s both; }
.game-btn:nth-child(3) { animation: fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.60s both; }
.game-btn:nth-child(4) { animation: fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.70s both; }
.game-btn:nth-child(5) { animation: fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.80s both; }

/* ── BUCHSTABEN ── */
.coming-soon > div { overflow: hidden; }

.letter {
  display: inline-block;
  animation: letter-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: color 0.2s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: default;
}

.letter:hover {
  color: transparent;
  transform: translateY(-6px);
}
