/* Root variables for colours and fonts */
:root {
  --bg-color: #000000;
  --text-color: #c8ff9b;
  --accent-color: #99cc3f;
  --border-color: #7aff36;
  --font-family: 'VT323', monospace;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  overflow-x: hidden;
}

/* Terminal wrapper */
#terminal {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

/* Frames mimic CRT terminal boxes */
.frame {
  border: 3px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
  background: linear-gradient(to bottom, rgba(0, 25, 0, 0.8), rgba(0, 0, 0, 0.6));
  box-shadow: 0 0 15px var(--border-color);
  position: relative;
}

/* Button styling */
.button {
  background: var(--accent-color);
  color: var(--bg-color);
  border: 3px solid var(--border-color);
  border-radius: 4px;
  padding: 8px 20px;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 0 10px var(--border-color);
  transition: transform 0.1s, box-shadow 0.2s;
}
.button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 15px var(--border-color); }
.button:disabled { opacity: 0.5; cursor: default; }
.button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(153,204,63,.45), 0 0 12px var(--border-color); }

/* Scenes */
.scene { display: none; }
.scene.active { display: block; }

/* Level summaries in intro */
.level-summary {
  border: 2px solid var(--border-color);
  padding: 10px;
  margin-bottom: 15px;
  background: rgba(0, 0, 0, 0.5);
}
.level-summary h3 {
  margin: 0 0 5px;
  font-size: 1.4rem;
}

/* === Level 1: Cups === */
.cups-area {
  position: relative;
  height: 260px;
  margin: 20px 0;
}
.cup-container {
  position: absolute;
  width: 150px;
  height: 200px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  transition: left 0.45s ease, top 0.45s ease;
  will-change: left, top;
}
.cup {
  width: 100px;
  height: auto;
  pointer-events: none;
  transition: transform 0.3s;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.5));
}
.cup-container:hover .cup { transform: translateY(-6px); }
.cup-container.lifted .cup { transform: translateY(-60px); }

.usb-stick {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 80px;
  background-image: url('../assets/usb.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: none; /* wird per JS sichtbar gemacht */
}

/* === Level 2: Slots === */
.slot-wrapper {
  position: relative;
  width: 500px;
  max-width: 100%;
  margin: 20px auto;
}
.slot-bg {
  width: 100%;
  height: auto;
  display: block;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 0 10px var(--border-color);
  background: rgba(0, 0, 0, 0.3);
}
.reel-container {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  width: 55%;
  height: 200px;
  pointer-events: none;
}
.reel {
  flex: 1 1 0;
  height: 100%;
  margin: 0 5px;
  overflow: hidden;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  position: relative;
  box-shadow: 0 0 8px var(--border-color);
}
.reel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* === Level 3: Crowd === */
.meter-container {
  margin: 20px auto;
  width: 80%;
  height: 25px;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 8px var(--border-color);
}
.hype-meter { width: 100%; height: 100%; position: relative; overflow: hidden; }
.hype-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--accent-color);
  box-shadow: inset 0 0 10px var(--border-color);
  transition: width 0.1s linear;
}
.crowd {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.crowd img {
  width: 60px;
  height: auto;
  filter: brightness(0.8);
  transition: transform 0.2s, filter 0.2s;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}
.crowd img.bouncing { animation: bounce 0.6s infinite; filter: brightness(1.2); }

.controls-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
}
.status-text { min-height: 24px; font-size: 1.2rem; }

/* === Embedded WP Form === */
.form-embed{
  width:100%;
  height:100svh;
  max-height:900px;
  border:2px solid var(--border-color);
  box-shadow:0 0 22px var(--border-color);
}
.form-fallback{ margin-top:10px; font-size:14px; opacity:.8; }
.form-fallback a{ color:var(--accent-color); text-decoration:underline; }

/* === Responsive === */
@media (max-width: 640px){
  .cups-area{ height: 220px; }
  .cup-container{ width: 120px; height: 170px; }
  .cup{ width: 84px; }
  .usb-stick{ width: 48px; height: 64px; }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce){
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
