/* ==========================================================================
   THEME VARIABLES (ELEFANT / SAVANNAH)
   ========================================================================== */
.theme-elefant {
  --c-theme-main: #f59e0b; /* Savannah orange/yellow */
  --c-theme-dark: #b45309;
  --c-theme-light: #fef3c7;
  --c-bg: #451a03; /* Deep brown background */
  
  --c-board: #27272a; /* Chalkboard dark */
  --c-chalk: #fdf8f6;
  
  --c-correct: #34d399; /* Green for correct */
  --c-error: #f87171; /* Red for error */

  --gradient-bg: linear-gradient(135deg, #451a03 0%, #78350f 100%);
  --glow-color: rgba(245, 158, 11, 0.4);
}

body.theme-elefant {
  background: var(--c-bg);
  background-image: var(--gradient-bg);
  color: #fff;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ==========================================================================
   GAME AREA LAYOUT
   ========================================================================== */
.game-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  padding: 10px;
}

@media (min-width: 768px) {
  .game-area {
    flex-direction: row;
    padding: 20px;
    align-items: stretch;
  }
}

/* ==========================================================================
   ELEFANT PANEL (LEFT)
   ========================================================================== */
.elefant-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 250px;
}

.elefant-character {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}
.elefant-character:hover {
  transform: scale(1.05) translateY(-5px);
}
.elefant-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  z-index: -1;
  animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* ==========================================================================
   BOARD PANEL (RIGHT)
   ========================================================================== */
.board-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-l);
  padding: 20px;
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Central Equation */
.center-calculation-box {
  background: var(--c-board);
  border-radius: var(--r-m);
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
  border: 4px solid var(--c-theme-dark);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 5px 15px rgba(0,0,0,0.3);
}

.central-equation {
  font-family: var(--f-board);
  font-size: 3rem;
  color: var(--c-chalk);
  letter-spacing: 2px;
}
@media (min-width: 768px) {
  .central-equation { font-size: 4rem; }
}

/* Representations Container */
.representations-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}
@media (min-width: 768px) {
  .representations-container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }
}

.representation-slot {
  background: rgba(0, 0, 0, 0.2);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--r-m);
  padding: 15px;
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.representation-slot.correct {
  border-color: var(--c-correct);
  background: rgba(52, 211, 153, 0.1);
}

.representation-slot.error {
  border-color: var(--c-error);
  animation: shake 0.4s ease-in-out;
}

.slot-title {
  font-family: var(--f-heading);
  font-size: 1.2rem;
  color: var(--c-theme-light);
  margin-bottom: 10px;
  text-align: center;
  opacity: 0.8;
}

/* ==========================================================================
   TEN FRAME STYLES
   ========================================================================== */
.tenframe-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.tenframe {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 4px;
  background: var(--c-board);
  padding: 8px;
  border-radius: var(--r-s);
  border: 2px solid var(--c-theme-dark);
}
.tf-cell {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.tf-cell:hover {
  background: rgba(255,255,255,0.1);
}
.tf-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--c-theme-main);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tf-cell.active .tf-dot {
  transform: scale(1);
}
.tf-dot.blue { background: #3b82f6; }

/* ==========================================================================
   NUMBER LINE STYLES
   ========================================================================== */
.numberline-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  position: relative;
}
.nl-line {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.4);
  position: relative;
  display: flex;
  justify-content: space-between;
}
.nl-tick {
  width: 2px;
  height: 12px;
  background: rgba(255,255,255,0.6);
  position: relative;
  top: -4px;
  cursor: pointer;
}
.nl-tick.major {
  height: 16px;
  top: -6px;
  width: 3px;
  background: #fff;
}
.nl-label {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  font-family: var(--f-board);
  color: var(--c-theme-light);
}
.nl-tick:hover .nl-label {
  color: var(--c-theme-main);
  font-weight: bold;
}
.nl-jump {
  position: absolute;
  top: -25px;
  height: 20px;
  border: 2px solid var(--c-theme-main);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}
.nl-jump.visible {
  opacity: 1;
  transform: translateY(0);
}
.nl-jump.second {
  border-color: #3b82f6;
}
.nl-marker {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-theme-main);
  top: -4px;
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--c-theme-main);
  pointer-events: none;
  transition: left 0.3s ease;
}

/* ==========================================================================
   ANIMAL FIELD STYLES
   ========================================================================== */
.animalfield-container {
  display: flex;
  gap: 10px;
  flex: 1;
}
.animal-dropzone {
  flex: 1;
  background: rgba(0,0,0,0.1);
  border-radius: var(--r-s);
  padding: 10px;
  display: flex;
  flex-direction: column;
}
.dropzone-label {
  font-size: 0.8rem;
  text-align: center;
  opacity: 0.7;
  margin-bottom: 5px;
}
.animals-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  justify-items: center;
  align-items: flex-start;
  min-height: 50px;
}
.animal-item {
  font-size: 1.5rem;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  transition: transform 0.2s;
}
.animal-item:hover {
  transform: scale(1.2);
}

.animal-controls {
  display: flex;
  gap: 5px;
  margin-top: 10px;
  justify-content: center;
}
.btn-animal-add, .btn-animal-remove {
  padding: 6px 10px;
  border-radius: var(--r-s);
  border: none;
  font-family: var(--f-ui);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.btn-animal-add {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.btn-animal-add:hover {
  background: var(--c-theme-main);
}
.btn-animal-remove {
  background: rgba(248, 113, 113, 0.2);
  color: #fca5a5;
}
.btn-animal-remove:hover {
  background: var(--c-error);
  color: #fff;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  80% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}

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

.magic-sparkle {
  position: absolute;
  pointer-events: none;
  font-size: 1.5rem;
  animation: floatUp 1s ease-out forwards;
  z-index: 10;
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(0.5); opacity: 1; }
  100% { transform: translateY(-50px) scale(1.5); opacity: 0; }
}
