/* ================================================================
   MatheLand — pinguin.css
   Pinguin-spezifische Styles für Spiel 2: Futterketten
   Überschreibt style.css wo nötig.
   ================================================================ */

/* ── CHALKBOARD-WRAPPER: Clean container, no scrollbars ── */
.theme-penguin .chalkboard-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  width: 100%;
  overflow: visible;
  padding-bottom: 8px;
  margin: 0 auto;
}

/* ── CHALKBOARD: Prominent green board for horizontal fish sequence ── */
.theme-penguin .chalkboard {
  position: relative;
  z-index: 1;
  min-height: 140px;
  margin: 10px;
  padding: 14px 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-shrink: 0;
}

/* ── EQUATION-SEQUENCE: Horizontal fish row ── */
.theme-penguin .equation-sequence {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 10px 0 !important;
  flex-wrap: wrap !important;
  margin: 0 !important;
  width: 100% !important;
}

/* Arrow between fish buckets: horizontal flow */
.theme-penguin .arrow {
  font-size: 1.8rem !important;
  color: var(--c-gold) !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 4px !important;
}

/* ── FISH BUCKET ── */
.fish-bucket {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  font-size: 1.6rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-m);
  padding: 8px 14px;
  min-width: 64px;
  min-height: 52px;
}

.fish-bucket::after {
  content: attr(data-count);
  position: absolute;
  bottom: -8px;
  right: -8px;
  background: var(--c-wrong);
  color: #fff;
  font-weight: 800;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* fish group (row of ≤5) */
.fish-group {
  letter-spacing: -3px;
  white-space: nowrap;
  line-height: 1;
}

.fish-icon {
  display: inline-block;
  transition: filter 0.3s;
}

/* fish color variants */
.fish-green    { filter: hue-rotate(-80deg) saturate(1.5); }
.fish-yellow   { filter: hue-rotate(-140deg) saturate(2) brightness(1.2); }
.fish-red      { filter: hue-rotate(-180deg) saturate(2); }
.fish-lightblue { filter: hue-rotate(20deg) saturate(1.2) brightness(1.3); }

/* Tens & Ones layout (Level 2/3) */
.tens-ones-layout {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tens-group {
  display: flex;
  flex-direction: row;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.tens-bucket {
  position: relative;
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.bucket-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -30%);
  font-size: 0.75rem;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 2px black, -1px -1px 2px black, 1px -1px 2px black, -1px 1px 2px black;
}

.ones-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── CONTROLS ROW: SIDE-BY-SIDE RULE CARDS & NUMPAD ── */
.theme-penguin .pinguin-controls-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  margin-top: 6px;
  padding: 0 10px;
  position: relative;
  z-index: 2;
}

/* ── RULE CARDS ── */
.theme-penguin .rule-cards {
  position: relative !important;
  z-index: 2 !important;
  transform: none !important;
  width: auto !important;
  flex: 1 1 280px !important;
  max-width: 340px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.theme-penguin .rule-card {
  font-size: 1.05rem;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  transition: all 0.2s ease;
}

.theme-penguin .rule-card.selected {
  background: rgba(47, 208, 179, 0.25);
  border-color: #2fd0b3;
  box-shadow: 0 0 15px rgba(47, 208, 179, 0.4);
}

.theme-penguin .rule-card.correct {
  background: rgba(39, 194, 125, 0.35);
  border-color: #27c27d;
}

.theme-penguin .rule-card.wrong {
  background: rgba(247, 85, 113, 0.35);
  border-color: #f75571;
  animation: shake 0.4s;
}

/* ── NUMPAD SECTION ── */
.theme-penguin .numpad-section {
  position: relative !important;
  z-index: 2 !important;
  transform: none !important;
  width: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.theme-penguin .numpad {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
}

.theme-penguin .numpad-btn {
  width: 52px !important;
  height: 52px !important;
  font-size: 1.8rem !important;
  border-radius: 50% !important;
}

.theme-penguin .numpad-info {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  font-family: var(--f-board) !important;
  color: var(--c-chalk) !important;
  font-size: 1.1rem !important;
}

.theme-penguin #next-task-section {
  position: relative !important;
  z-index: 2 !important;
  transform: none !important;
  width: 100% !important;
  margin: 15px auto !important;
  padding: 10px !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ── FOX GLOW tinted teal ── */
.theme-penguin .fox-glow {
  background: radial-gradient(circle at center, rgba(47,208,179,0.35) 0%, transparent 70%);
}

/* ── BUTTON OVERRIDE (Fix muddy gradient) ── */
.theme-penguin .btn-start {
  background: linear-gradient(140deg, #f4a020 0%, #e88a10 100%) !important;
}

/* ── INTRO SCREEN COLOR FIXES ── */
.theme-penguin .intro-title {
  color: #ffffff;
  text-shadow:
    0 0 50px rgba(47,208,179,0.9),
    0 0 100px rgba(47,208,179,0.5),
    4px 4px 0 rgba(10,30,40,0.8) !important;
}
@keyframes titlePulsePenguin {
  0%,100% { text-shadow: 0 0 50px rgba(47,208,179,0.9), 0 0 100px rgba(47,208,179,0.4), 4px 4px 0 rgba(10,30,40,0.8); }
  50%     { text-shadow: 0 0 70px rgba(47,208,179,1),   0 0 140px rgba(47,208,179,0.6), 4px 4px 0 rgba(10,30,40,0.8); }
}
.theme-penguin .intro-title {
  animation: titlePulsePenguin 2.5s ease-in-out infinite !important;
}
.theme-penguin .intro-badge {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(47,208,179,0.8) !important;
}
