:root{
  --bg: #0d0d0d;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: auto; overflow-x: hidden; }
body{
  margin:0;
  min-height: 0;
  background: var(--bg);
  color:#fff;
  font-family: monospace;
  overflow-x:hidden;
  -webkit-overflow-scrolling: touch;
}

/* Screen shake */
body.screen-shake {
  animation: shake 0.4s ease-out;
}
@keyframes shake {
  0%  { transform: translate(0, 0); }
  15% { transform: translate(-6px, 3px); }
  30% { transform: translate(5px, -4px); }
  45% { transform: translate(-4px, 2px); }
  60% { transform: translate(3px, -2px); }
  75% { transform: translate(-2px, 1px); }
  100%{ transform: translate(0, 0); }
}

/* ===== Particles Wrapper ===== */
.particles-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 600px;
  max-height: 85vh;
  z-index: 0;
  pointer-events: auto;
}

.particles-wrapper canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ===== Scroll-Background (fixed) - HIDDEN ===== */
.bg-build {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  display: none;
}

.bg-overlay{
  position:absolute;
  inset:0;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.72) 70%, rgba(0,0,0,0.92) 100%);
  z-index: 3;
}

.tile {
  position: absolute;
  will-change: transform, filter, opacity;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 1;
}

.grain{
  position:absolute;
  inset:-20%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  mix-blend-mode: overlay;
  opacity: .08;
  z-index: 4;
  pointer-events:none;
  transform: translateZ(0);
  animation: grainMove 6s steps(6) infinite;
}

@keyframes grainMove{
  0%{ transform: translate(0,0); }
  25%{ transform: translate(-2%, 1%); }
  50%{ transform: translate(-1%, -2%); }
  75%{ transform: translate(2%, 1%); }
  100%{ transform: translate(0,0); }
}

/* ===== UI ===== */
.logo {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  letter-spacing: 3px;
  z-index: 10;
  transition: opacity .25s ease, transform .25s ease, filter .25s ease;
  will-change: opacity, transform, filter;
}

.contact-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 10px 16px;
  font-size: 16px;
  cursor: pointer;
  background: rgba(0,0,0,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 10px;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, opacity .2s ease;
  z-index: 10;
  backdrop-filter: blur(6px);
}
.contact-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.9);
  transform: translateY(-1px);
}
.contact-btn:disabled{
  opacity: .5;
  cursor: not-allowed;
}

/* ===== Landing Content ===== */
.hero{
  min-height: 100vh;
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content:center;
  gap: 18px;
  padding: 140px 20px 40px;
  text-align:center;
  position: relative;
  z-index: 5;
}

.play-button {
  font-size: 48px;
  padding: 0;
  cursor: pointer;
  background: none;
  color: white;
  border: none;
  transition: opacity 1s ease, transform 0.2s ease, text-shadow 0.2s ease;
  position: relative;
  z-index: 2;
  text-shadow: 0 0 15px rgba(255,255,255,0.4);
}
.play-button:hover {
  transform: scale(1.15);
  text-shadow: 0 0 25px rgba(255,255,255,0.7);
}
.play-button.fade-out {
  opacity: 0;
  pointer-events: none;
}

.typewriter {
  font-size: 22px;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  border-right: none;
  overflow: hidden;
  min-height: 1.4em;
  max-width: 90vw;
  position: relative;
  z-index: 2;
  text-align: center;
}

/* Mobile: kleinere Schrift */
@media (max-width: 480px) {
  .typewriter {
    font-size: 16px;
    max-width: 85vw;
  }
  .play-button {
    font-size: 36px;
  }
}

/* ====================================
   GRASPING HANDS SECTION
   ==================================== */
.grasping-section {
  position: relative;
  height: 80vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 5;
}

.grasping-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Klauen === */
.claw {
  position: absolute;
  width: 250px;
  height: 300px;
  opacity: 0;
  will-change: transform, opacity;
  transition: none;
  filter: drop-shadow(0 0 20px rgba(200, 40, 40, 0.4));
}

.claw svg {
  width: 100%;
  height: 100%;
}

.claw-left {
  left: 0;
  transform: translateX(-120%);
}

.claw-right {
  right: 0;
  transform: translateX(120%);
}

/* === Impact-Effekt === */
.impact-fx {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.impact-fx.active {
  opacity: 1;
}

.impact-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 3px solid rgba(255, 60, 30, 0.8);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
}

.impact-fx.active .impact-ring {
  animation: ringExpand 0.6s ease-out forwards;
}

.impact-fx.active .ring2 {
  animation: ringExpand 0.6s 0.1s ease-out forwards;
}

@keyframes ringExpand {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(18); opacity: 0; }
}

.impact-flash {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,200,50,0.9) 0%, rgba(255,60,20,0.6) 40%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
}

.impact-fx.active .impact-flash {
  animation: flashBurst 0.5s ease-out forwards;
}

@keyframes flashBurst {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  30%  { transform: translate(-50%, -50%) scale(6); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(10); opacity: 0; }
}

/* === Sparks === */
.spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffaa33;
  opacity: 0;
  box-shadow: 0 0 6px 2px rgba(255, 100, 20, 0.8);
}

.impact-fx.active .spark {
  animation: sparkFly 0.7s ease-out forwards;
}

.s1 { --sx: -80px; --sy: -60px; animation-delay: 0s !important; }
.s2 { --sx: 90px;  --sy: -50px; animation-delay: 0.05s !important; }
.s3 { --sx: -60px; --sy: 70px;  animation-delay: 0.08s !important; }
.s4 { --sx: 70px;  --sy: 65px;  animation-delay: 0.03s !important; }
.s5 { --sx: -100px;--sy: 10px;  animation-delay: 0.1s !important; }
.s6 { --sx: 95px;  --sy: -15px; animation-delay: 0.06s !important; }

@keyframes sparkFly {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--sx), var(--sy)) scale(0); opacity: 0; }
}

/* === Ground Cracks === */
.ground-cracks {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 60px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.ground-cracks.active {
  opacity: 1;
  animation: cracksAppear 0.3s ease-out forwards;
}

@keyframes cracksAppear {
  0%   { transform: translateX(-50%) scaleX(0); opacity: 0; }
  100% { transform: translateX(-50%) scaleX(1); opacity: 0.7; }
}

/* === FRENZY WARS Titel === */
.frenzy-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: clamp(36px, 7vw, 80px);
  font-weight: 900;
  font-style: italic;
  color: #00ff44;
  text-shadow:
    0 0 10px rgba(0, 255, 68, 0.8),
    0 0 30px rgba(0, 255, 68, 0.5),
    0 0 60px rgba(0, 255, 68, 0.3),
    2px 2px 0 #003300;
  letter-spacing: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: none;
  text-align: center;
}

.frenzy-title .heroes-link {
  display: block;
  margin-top: 14px;
  font-size: clamp(14px, 2.5vw, 20px);
  font-style: normal;
  font-weight: 400;
  font-family: monospace;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  letter-spacing: 2px;
  text-shadow: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  pointer-events: auto;
}

.frenzy-title .heroes-link:hover {
  color: #00ff44;
  text-shadow: 0 0 10px rgba(0,255,68,0.5);
}

.frenzy-title.active {
  animation: frenzyReveal 0.8s ease-out forwards;
}

@keyframes frenzyReveal {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  40%  { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  60%  { transform: translate(-50%, -50%) scale(0.95); opacity: 1; }
  80%  { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ===== Footer / Contact ===== */
.contact-section {
  width: 100%;
  padding: 90px 20px;
  margin-top: 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.02);
  text-align: center;
  position: relative;
  z-index: 5;
}

.contact-card {
  max-width: 740px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
}

.contact-title {
  font-size: 22px;
  letter-spacing: 2px;
  margin: 0 0 12px 0;
}

.contact-line {
  margin: 10px 0;
  opacity: 0.92;
  font-size: 16px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-line a {
  color: white;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,0.35);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contact-line a:hover { border-bottom-color: rgba(255,255,255,0.9); }

.contact-line.muted{
  margin-top:16px;
  opacity:0.7;
}

.contact-legal {
  margin-top: 16px;
  font-size: 13px;
  opacity: 0.5;
}
.contact-legal a {
  color: white;
  text-decoration: none;
}
.contact-legal a:hover {
  opacity: 0.9;
  border-bottom: 1px dashed rgba(255,255,255,0.5);
}

/* ===== Contact: Mobil-Feinabstimmung ===== */
@media (max-width: 480px) {
  .contact-section { padding: 70px 16px; }
  .contact-card { padding: 24px 18px; }
  .contact-line { font-size: 15px; }
}