/* =========================================
   HARDWARE HEROES – STYLESHEET
   Comic-Style Lernspiel
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Comic+Neue:wght@400;700&display=swap');

:root {
  --yellow:   #FFD600;
  --blue:     #0D47A1;
  --lightblue:#4FC3F7;
  --red:      #E53935;
  --green:    #43A047;
  --dark:     #0A0A1A;
  --panel:    #1A1A2E;
  --card:     #16213E;
  --accent:   #00BCD4;
  --white:    #FFFFFF;
  --text:     #E8E8F0;
  --shadow:   4px 4px 0px #000;
  --radius:   12px;
}

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

body {
  font-family: 'Comic Neue', cursive;
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==================== SCREENS ==================== */
.screen {
  display: none;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.screen.active { display: flex; flex-direction: column; align-items: center; }

/* ==================== MENU BACKGROUND ==================== */
.menu-bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,188,212,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,188,212,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  animation: gridPulse 8s ease-in-out infinite;
}
@keyframes gridPulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

/* scanlines */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.06) 3px,
    rgba(0,0,0,0.06) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* floating hardware icons container */
.floating-icons-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.float-icon {
  position: absolute;
  opacity: 0.07;
  filter: blur(0.5px);
  animation: floatAround var(--dur, 18s) var(--delay, 0s) ease-in-out infinite alternate;
}
@keyframes floatAround {
  0%   { transform: translateY(0px)   rotate(var(--r0, 0deg))  scale(1); }
  50%  { transform: translateY(-30px) rotate(var(--r1, 10deg)) scale(1.04); }
  100% { transform: translateY(10px)  rotate(var(--r2, -5deg)) scale(0.97); }
}

/* ==================== MAIN MENU ==================== */
.menu-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 36px 20px 32px;
  width: 100%;
  max-width: 480px;
}

/* ---- LOGO ---- */
.logo-wrap {
  position: relative;
  text-align: center;
}

.logo-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  background: conic-gradient(
    #FFD600 0deg 18deg, transparent 18deg 36deg,
    #FFD600 36deg 54deg, transparent 54deg 72deg,
    #FFD600 72deg 90deg, transparent 90deg 108deg,
    #FFD600 108deg 126deg, transparent 126deg 144deg,
    #FFD600 144deg 162deg, transparent 162deg 180deg,
    #FFD600 180deg 198deg, transparent 198deg 216deg,
    #FFD600 216deg 234deg, transparent 234deg 252deg,
    #FFD600 252deg 270deg, transparent 270deg 288deg,
    #FFD600 288deg 306deg, transparent 306deg 324deg,
    #FFD600 324deg 342deg, transparent 342deg 360deg
  );
  border-radius: 50%;
  opacity: 0.14;
  animation: rotateBurst 16s linear infinite;
  z-index: -1;
}

.logo-glow-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,188,212,0.18) 0%, transparent 70%);
  animation: glow 3s ease-in-out infinite alternate;
  z-index: -1;
}
@keyframes glow {
  from { opacity: 0.6; transform: translate(-50%,-50%) scale(0.95); }
  to   { opacity: 1;   transform: translate(-50%,-50%) scale(1.05); }
}

@keyframes rotateBurst {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-hw {
  font-family: 'Bangers', cursive;
  font-size: clamp(56px, 15vw, 96px);
  color: var(--yellow);
  letter-spacing: 6px;
  text-shadow: 4px 4px 0 #C62828, 8px 8px 0 #000;
  -webkit-text-stroke: 2px #000;
  animation: popIn 0.6s cubic-bezier(.17,.67,.45,1.5) both;
}

.logo-heroes {
  font-family: 'Bangers', cursive;
  font-size: clamp(36px, 10vw, 64px);
  color: var(--accent);
  letter-spacing: 10px;
  text-shadow: 3px 3px 0 var(--blue), 6px 6px 0 #000;
  -webkit-text-stroke: 1.5px #000;
  animation: popIn 0.6s 0.12s cubic-bezier(.17,.67,.45,1.5) both;
}

.logo-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  margin-top: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: popIn 0.6s 0.25s cubic-bezier(.17,.67,.45,1.5) both;
}

@keyframes popIn {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ---- STATS BAR ---- */
.menu-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,188,212,0.08);
  border: 2px solid rgba(0,188,212,0.3);
  border-radius: 30px;
  padding: 8px 20px;
  animation: popIn 0.5s 0.4s both;
}
.stat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Bangers', cursive;
  font-size: 17px;
  letter-spacing: 1px;
  color: var(--accent);
}
.stat-icon { font-size: 18px; }
.stat-sep {
  width: 1px;
  height: 20px;
  background: rgba(0,188,212,0.3);
}

/* ==================== BUTTONS ==================== */
.main-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  animation: popIn 0.5s 0.5s both;
}

/* Big SPIELEN button */
.btn-menu.btn-play {
  font-family: 'Bangers', cursive;
  letter-spacing: 2px;
  padding: 16px 28px;
  border: 3px solid #000;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--yellow) 0%, #FFB300 100%);
  color: #000;
  cursor: pointer;
  box-shadow: 5px 5px 0 #000;
  transition: transform 0.12s, box-shadow 0.12s;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.btn-menu.btn-play::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 55%);
}
.btn-menu.btn-play:hover  { transform: translate(-3px,-3px); box-shadow: 8px 8px 0 #000; }
.btn-menu.btn-play:active { transform: translate(2px,2px);   box-shadow: 3px 3px 0 #000; }

.btn-play-icon {
  font-size: 32px;
  width: 48px;
  height: 48px;
  background: rgba(0,0,0,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.btn-play-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}
.btn-play-main {
  font-size: 32px;
  letter-spacing: 4px;
  line-height: 1;
}
.btn-play-sub {
  font-size: 13px;
  font-family: 'Comic Neue', cursive;
  font-weight: 700;
  letter-spacing: 1px;
  opacity: 0.7;
}

/* Row of smaller buttons */
.btn-row-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.btn-menu.btn-sm {
  font-family: 'Bangers', cursive;
  font-size: 16px;
  letter-spacing: 1px;
  padding: 12px 8px;
  border: 2px solid #000;
  border-radius: var(--radius);
  background: var(--lightblue);
  color: #000;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
  transition: transform 0.1s, box-shadow 0.1s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.btn-menu.btn-sm::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 60%);
}
.btn-menu.btn-sm span:first-child { font-size: 22px; }
.btn-menu.btn-sm:hover  { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 #000; }
.btn-menu.btn-sm:active { transform: translate(1px,1px);   box-shadow: 2px 2px 0 #000; }

.btn-menu.btn-eval {
  background: linear-gradient(135deg, #7C4DFF 0%, #5E35B1 100%);
  color: #fff;
  border-color: #311B92;
  box-shadow: 3px 3px 0 #311B92;
}
.btn-menu.btn-eval:hover { box-shadow: 5px 5px 0 #311B92; }

/* Legacy .btn-menu for other screens (level select back-btn etc.) */
.btn-menu {
  font-family: 'Bangers', cursive;
  font-size: 22px;
  letter-spacing: 2px;
  padding: 12px 28px;
  border: 3px solid #000;
  border-radius: var(--radius);
  background: var(--yellow);
  color: #000;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.1s, box-shadow 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.btn-menu::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.22) 0%, transparent 60%);
}
.btn-menu:hover  { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 #000; }
.btn-menu:active { transform: translate(2px,2px);   box-shadow: 2px 2px 0 #000; }
.btn-menu.btn-secondary { background: var(--lightblue); }

.btn-icon { font-size: 20px; }

.sound-btn {
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.2);
  color: var(--text);
  border-radius: 20px;
  padding: 8px 20px;
  cursor: pointer;
  font-family: 'Comic Neue', cursive;
  font-size: 14px;
  transition: background 0.2s;
}
.sound-btn:hover { background: rgba(255,255,255,0.15); }

/* ==================== SHARED SCREEN STYLES ==================== */
.screen-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--panel);
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 10;
}

.screen-title {
  font-family: 'Bangers', cursive;
  font-size: 36px;
  letter-spacing: 4px;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #000;
}

.back-btn {
  background: var(--yellow);
  border: 2px solid #000;
  border-radius: 8px;
  padding: 8px 16px;
  font-family: 'Bangers', cursive;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
  white-space: nowrap;
  transition: transform 0.1s;
}
.back-btn:hover  { transform: translate(-1px,-1px); }
.back-btn:active { transform: translate(1px,1px); }

/* ==================== LEVEL SELECT ==================== */
#screen-levelselect {
  background: radial-gradient(ellipse at top, #0D1B2A 0%, var(--dark) 70%);
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  padding: 32px 24px;
  width: 100%;
  max-width: 960px;
}

.level-card {
  background: var(--card);
  border: 3px solid #000;
  border-radius: 16px;
  box-shadow: 6px 6px 0 #000;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
}

.level-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 60%);
}

.level-card.unlocked:hover  { transform: translate(-3px,-3px); box-shadow: 9px 9px 0 #000; }
.level-card.unlocked:active { transform: translate(2px,2px);   box-shadow: 4px 4px 0 #000; }

.level-badge {
  position: absolute;
  top: -12px;
  left: -12px;
  width: 50px;
  height: 50px;
  background: var(--yellow);
  border: 3px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bangers', cursive;
  font-size: 24px;
  color: #000;
  box-shadow: 2px 2px 0 #000;
  z-index: 2;
}

.level-card-inner {
  padding: 30px 20px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.level-icon { font-size: 48px; }

.level-card h2 {
  font-family: 'Bangers', cursive;
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--yellow);
}

.level-card p { font-size: 14px; color: #aaa; line-height: 1.5; }

.level-stars .star {
  font-size: 24px;
  color: #333;
  transition: color 0.3s;
}
.level-stars .star.earned { color: var(--yellow); text-shadow: 0 0 8px var(--yellow); }

.level-diff { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }
.diff-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #333;
  border: 2px solid #555;
}
.diff-dot.active { background: var(--green); border-color: #2E7D32; }

.diff-label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 1px; }

.tip-box {
  background: rgba(0,188,212,0.1);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 14px 24px;
  margin: 0 24px 32px;
  max-width: 860px;
  font-size: 14px;
  line-height: 1.5;
}

/* ==================== GAME HUD ==================== */
#screen-game {
  background: #0D1117;
  align-items: stretch;
}

.game-hud {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 10;
}

.hud-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hud-level {
  font-family: 'Bangers', cursive;
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--yellow);
}

.hud-progress-bar {
  width: 100%;
  max-width: 260px;
  height: 10px;
  background: #333;
  border-radius: 5px;
  border: 2px solid #555;
  overflow: hidden;
}

.hud-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 5px;
  width: 0%;
  transition: width 0.4s ease;
}

.hud-score {
  font-family: 'Bangers', cursive;
  font-size: 22px;
  color: var(--yellow);
  white-space: nowrap;
}

.game-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* ==================== QUESTION CARD ==================== */
.q-card {
  background: var(--card);
  border: 3px solid var(--accent);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  box-shadow: 6px 6px 0 #000;
  animation: slideUp 0.4s ease both;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.q-num {
  font-family: 'Bangers', cursive;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.q-text {
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
  color: white;
}

.q-part-display {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

/* ==================== ANSWER OPTIONS ==================== */
.answers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) { .answers-grid { grid-template-columns: 1fr; } }

.answer-btn {
  background: var(--panel);
  border: 2px solid #444;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-family: 'Comic Neue', cursive;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.answer-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(0,188,212,0.1);
  transform: translateX(3px);
}

.answer-btn.correct {
  background: rgba(67,160,71,0.25);
  border-color: var(--green);
  color: #A5D6A7;
}

.answer-btn.wrong {
  background: rgba(229,57,53,0.2);
  border-color: var(--red);
  color: #EF9A9A;
}

.answer-letter {
  display: inline-flex;
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-family: 'Bangers', cursive;
  font-size: 16px;
  color: #000;
  flex-shrink: 0;
}

/* ==================== FEEDBACK ==================== */
.feedback-box {
  width: 100%;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.5;
  border: 2px solid;
  animation: slideUp 0.3s ease both;
}

.feedback-box.correct {
  background: rgba(67,160,71,0.15);
  border-color: var(--green);
  color: #A5D6A7;
}

.feedback-box.wrong {
  background: rgba(229,57,53,0.12);
  border-color: var(--red);
  color: #EF9A9A;
}

.feedback-title {
  font-family: 'Bangers', cursive;
  font-size: 22px;
  margin-bottom: 6px;
}

.next-btn {
  display: block;
  margin-top: 12px;
  background: var(--yellow);
  border: 2px solid #000;
  border-radius: 8px;
  padding: 10px 24px;
  font-family: 'Bangers', cursive;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
  transition: transform 0.1s;
}
.next-btn:hover { transform: translate(-1px,-1px); }

/* ==================== MATCH GAME (Level 1) ==================== */
.match-container { width: 100%; }
.match-title {
  text-align: center;
  font-family: 'Bangers', cursive;
  font-size: 22px;
  color: var(--yellow);
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.match-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.match-col-title {
  font-family: 'Bangers', cursive;
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
  text-align: center;
}

.match-item {
  background: var(--card);
  border: 2px solid #444;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.match-item:hover:not(.matched):not(.selected-def) {
  border-color: var(--accent);
  background: rgba(0,188,212,0.1);
}

.match-item.selected-term  { border-color: var(--yellow); background: rgba(255,214,0,0.15); }
.match-item.selected-def   { border-color: var(--lightblue); background: rgba(79,195,247,0.15); }
.match-item.matched        { border-color: var(--green); background: rgba(67,160,71,0.2); color: #A5D6A7; cursor: default; }
.match-item.wrong-flash    { border-color: var(--red); background: rgba(229,57,53,0.2); }

/* ==================== BUILD GAME (Level 3) ==================== */
.build-area {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 520px) { .build-area { grid-template-columns: 1fr; } }

.parts-pool {
  background: var(--card);
  border: 2px solid #444;
  border-radius: 12px;
  padding: 16px;
}

.parts-pool h3 {
  font-family: 'Bangers', cursive;
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.part-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 2px solid #555;
  border-radius: 20px;
  padding: 6px 14px;
  margin: 4px;
  cursor: grab;
  font-size: 13px;
  font-weight: 700;
  transition: border-color 0.15s, transform 0.1s;
  user-select: none;
}

.part-chip:hover { border-color: var(--yellow); transform: scale(1.05); }
.part-chip.dragging { opacity: 0.4; }
.part-chip.used { opacity: 0.3; cursor: not-allowed; }

.build-slots h3 {
  font-family: 'Bangers', cursive;
  font-size: 18px;
  color: var(--yellow);
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.build-slot {
  background: rgba(0,0,0,0.3);
  border: 2px dashed #444;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s;
}

.build-slot.drag-over { border-color: var(--accent); background: rgba(0,188,212,0.1); }
.build-slot.filled    { border-color: var(--green); border-style: solid; }
.build-slot.wrong-slot{ border-color: var(--red); }

.slot-label {
  color: #888;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.slot-content { flex: 1; }

.slot-num {
  width: 24px; height: 24px;
  background: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bangers', cursive;
  font-size: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ==================== PC PART SVGs ==================== */
.part-svg-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

/* ==================== OVERLAYS ==================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.overlay.hidden { display: none; }

.result-box, .info-box {
  background: var(--panel);
  border: 3px solid var(--yellow);
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 8px 8px 0 #000;
  animation: popIn 0.4s cubic-bezier(.17,.67,.45,1.5) both;
}

.result-emoji { font-size: 64px; margin-bottom: 12px; }

.result-box h2, .info-box h2 {
  font-family: 'Bangers', cursive;
  font-size: 36px;
  letter-spacing: 3px;
  color: var(--yellow);
  margin-bottom: 10px;
}

.result-box p, .info-box p {
  font-size: 16px;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 16px;
}

.result-stars {
  font-size: 40px;
  margin: 12px 0 20px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.result-star { color: #333; transition: color 0.3s, transform 0.3s; }
.result-star.lit {
  color: var(--yellow);
  text-shadow: 0 0 12px var(--yellow);
  animation: starPop 0.4s cubic-bezier(.17,.67,.45,1.5) both;
}

@keyframes starPop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.result-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.result-buttons .btn-menu { width: auto; font-size: 20px; padding: 10px 24px; }

.info-box { text-align: left; position: relative; max-width: 520px; max-height: 85vh; overflow-y: auto; }

.close-btn {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--red);
  border: 2px solid #000;
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: white;
  font-weight: 700;
}

.info-part-svg { display: flex; justify-content: center; margin-bottom: 16px; }

.info-facts {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.info-fact {
  background: rgba(0,188,212,0.08);
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.4;
}

.info-fact strong { color: var(--accent); }

/* ==================== TUTORIAL / CREDITS ==================== */
#screen-tutorial, #screen-credits {
  background: radial-gradient(ellipse at top, #0D1B2A 0%, var(--dark) 70%);
}

.tutorial-content, .credits-content {
  max-width: 600px;
  width: 100%;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tut-step {
  background: var(--card);
  border: 2px solid #333;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.tut-icon { font-size: 36px; flex-shrink: 0; }

.tut-step h3 {
  font-family: 'Bangers', cursive;
  font-size: 22px;
  color: var(--yellow);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.tut-step p { font-size: 15px; color: #aaa; line-height: 1.5; }

.credits-content { text-align: center; align-items: center; }
.credits-star { font-size: 64px; margin-bottom: 8px; }
.credits-content h2 {
  font-family: 'Bangers', cursive;
  font-size: 40px;
  letter-spacing: 4px;
  color: var(--yellow);
  text-shadow: 3px 3px 0 #000;
}
.credits-content p { font-size: 15px; color: #bbb; line-height: 1.8; }
.credits-content strong { color: var(--accent); }
.credits-divider {
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 8px 0;
}
.credits-quote {
  font-style: italic;
  color: var(--yellow) !important;
  font-size: 16px !important;
}

/* ==================== UTILITY ==================== */
.hidden { display: none !important; }

.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
