:root {
  --bg: rgba(21, 21, 33, 0.55);
  --card: rgba(35, 35, 58, 0.55);
  --card-hover: rgba(35, 35, 58, 0.72);
  --accent: #ff4081;
  --text: #fff;
  --green: #4caf50;
  --blue: #00d2ff;
  --yellow: #ffd54f;
  /* Волшебный лес — палитра игр */
  --game-sky-top: #1a0a2e;
  --game-sky-bottom: #0d1b2a;
  --game-magic: #7b68ee;
  --game-gold: #ffd700;
  --game-star: #fff8dc;
  --game-grass: #2d5a27;
  --game-water: #1e3a5f;
  --game-particle: #ff6b9d;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #151521;
  background-image:
    linear-gradient(180deg, rgba(21, 21, 33, 0.35) 0%, rgba(21, 21, 33, 0.55) 100%),
    url('../assets/images/parent-bg.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: cover;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.header-title {
  font-weight: 600;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-avatar {
  border-radius: 50%;
  object-fit: cover;
}

.header-buttons {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.btn-icon:active {
  background: rgba(255,255,255,0.2);
}

.avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0 20px;
}

.app-title {
  text-align: center;
  margin-bottom: 8px;
  animation: titleFloat 3s ease-in-out infinite;
}

.title-hero {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 36px;
  font-weight: 700;
  color: #FFD700;
  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.8),
    0 0 30px rgba(255, 215, 0, 0.4),
    0 0 50px rgba(255, 215, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 6px;
  display: block;
  line-height: 1.2;
}

.title-tales {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 28px;
  font-weight: 400;
  color: #E8E8E8;
  text-shadow:
    0 0 8px rgba(200, 200, 255, 0.6),
    0 0 20px rgba(180, 180, 255, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 8px;
  display: block;
  line-height: 1.2;
}

.app-title::before,
.app-title::after {
  content: '✨';
  font-size: 20px;
  animation: starTwinkle 2s ease-in-out infinite;
}
.app-title::before { margin-right: 8px; }
.app-title::after { margin-left: 8px; animation-delay: 1s; }

@keyframes titleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.avatar-container {
  position: relative;
}

.avatar-container::before {
  content: '⭐';
  position: absolute;
  top: 10px;
  left: -10px;
  font-size: 16px;
  animation: starSpin 3s linear infinite;
  z-index: 1;
  pointer-events: none;
}

.avatar-container::after {
  content: '🌟';
  position: absolute;
  bottom: 20px;
  right: -15px;
  font-size: 18px;
  animation: starSpin 4s linear infinite reverse;
  z-index: 1;
  pointer-events: none;
}

@keyframes starSpin {
  0% { transform: rotate(0deg) scale(0.8); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(0.8); }
}

@media (max-width: 480px) {
  .title-hero { font-size: 28px; letter-spacing: 4px; }
  .title-tales { font-size: 22px; letter-spacing: 6px; }
}

.avatar-container img,
.avatar-container .avatar,
.avatar-container .avatar-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
}

.avatar-container #avatarEmoji,
.avatar-fallback {
  display: none;
  width: 160px;
  height: 160px;
  line-height: 160px;
  text-align: center;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.25);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  font-size: 4rem;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6C63FF, #8b83ff);
  color: #fff;
  font-weight: 700;
}

.character-avatar {
  object-fit: cover;
  border-radius: 50%;
}

.header-avatar.character-avatar,
.child-chip-avatar.character-avatar {
  width: auto;
  height: auto;
  max-width: 100%;
}

.text-chat-row {
  display: flex;
  gap: 8px;
  margin: 0 16px 12px;
  align-items: center;
}

.text-chat-row input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.25);
  color: #fff;
  font-size: 0.95rem;
}

.streak-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.tts-unlock-hint {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 12px 20px;
  border-radius: 24px;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.tts-unlock-hint.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 12000;
}

.onboarding-spotlight {
  position: fixed;
  border: 3px solid #ffd54f;
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.55);
  animation: onboarding-pulse 1.5s ease-in-out infinite;
  pointer-events: none;
  transition: all 0.35s ease;
}

@keyframes onboarding-pulse {
  0%, 100% { box-shadow: 0 0 0 9999px rgba(0,0,0,0.55), 0 0 12px #ffd54f; }
  50% { box-shadow: 0 0 0 9999px rgba(0,0,0,0.55), 0 0 24px #ffeb3b; }
}

.onboarding-tooltip {
  position: fixed;
  width: min(280px, 90vw);
  background: #fff;
  color: #222;
  border-radius: 16px;
  padding: 16px;
  z-index: 12001;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.onboarding-tooltip h3 { margin: 8px 0 6px; font-size: 1.1rem; }
.onboarding-tooltip p { margin: 0 0 12px; font-size: 0.9rem; line-height: 1.4; }

.onboarding-progress {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
}

.onboarding-dot.active { background: #6C63FF; }

.onboarding-actions {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.onboarding-skip,
.onboarding-next {
  border: none;
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.9rem;
}

.onboarding-skip { background: #eee; color: #555; }
.onboarding-next { background: #6C63FF; color: #fff; }

.ob-tip {
  background: rgba(255, 255, 255, 0.96);
  color: #333;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  max-width: 260px;
  font-size: 0.9rem;
}

.ob-tip p { margin: 0 0 10px; }

.ob-tip button {
  background: #6C63FF;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.85rem;
}

.ge-root { display: flex; flex-direction: column; gap: 8px; }
.ge-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
}
.ge-title { flex: 1; font-weight: 600; color: #fff; }
.ge-stats { display: flex; gap: 12px; font-size: 0.85rem; color: #fff; }
.ge-btn { background: rgba(255,255,255,0.15); border: none; color: #fff; border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.ge-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.ge-overlay[hidden] { display: none !important; }
.ge-overlay-box {
  background: #fff;
  color: #222;
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  max-width: 280px;
}

.avatar,
.avatar-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 5px solid rgba(255,255,255,0.25);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  transition: opacity 300ms ease, transform 300ms ease, box-shadow 0.3s;
  cursor: pointer;
  object-fit: cover;
}

@media (max-width: 768px) {
  .avatar-container img,
  .avatar-container .avatar,
  .avatar-container .avatar-img,
  .avatar,
  .avatar-img {
    width: 120px;
    height: 120px;
  }
}

.avatar-listening {
  animation: gentleSway 2s ease-in-out infinite;
  box-shadow: 0 0 24px rgba(76, 175, 80, 0.45);
}

@keyframes gentleSway {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(3px) rotate(1deg); }
  75% { transform: translateX(-3px) rotate(-1deg); }
}

.avatar-speaking {
  animation: speakPulse 0.3s ease-in-out infinite;
}

@keyframes speakPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.05); filter: brightness(1.15); }
}

.avatar-sleepy {
  animation: sleepySway 4s ease-in-out infinite;
  filter: brightness(0.8) saturate(0.7);
}

@keyframes sleepySway {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(2px); }
}

.avatar-happy {
  animation: happyJump 0.5s ease-in-out 3;
}

@keyframes happyJump {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.avatar-eating {
  animation: eatNod 0.5s ease-in-out 4;
}

.avatar-cleaning {
  animation: cleanSweep 0.8s ease-in-out 3;
}

@keyframes eatNod {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

@keyframes cleanSweep {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.lucik-house-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 20px 32px;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  z-index: 9000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.avatar.talking {
  box-shadow: 0 0 30px var(--blue);
}

.avatar.listening {
  box-shadow: 0 0 30px var(--green);
}

.child-name {
  margin-top: 10px;
  font-size: 1.2rem;
  font-weight: 600;
  background: rgba(255,255,255,0.12);
  padding: 6px 24px;
  border-radius: 30px;
  backdrop-filter: blur(6px);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.stat-item {
  background: var(--card);
  border-radius: 20px;
  padding: 10px;
  text-align: center;
  font-size: 0.8rem;
  backdrop-filter: blur(8px);
}

.bar {
  background: rgba(255,255,255,0.1);
  height: 6px;
  border-radius: 10px;
  margin-top: 6px;
  overflow: hidden;
}

.fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.3s;
}

.actions-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 10px 0;
}

.action-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  font-size: 2rem;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  backdrop-filter: blur(6px);
}

.action-btn:active {
  background: rgba(255,255,255,0.22);
}

.mic-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  gap: 8px;
}

.thinking-dots {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0;
  animation: thinking-pulse 1.2s ease-in-out infinite;
}

@keyframes thinking-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.mic-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #4CAF50;
  border: none;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  min-width: 44px;
  min-height: 44px;
}

.mic-btn.mic-idle,
.mic-btn.recording:not(.mic-recording) {
  background: #4CAF50;
}

.mic-btn.mic-recording,
.mic-btn.recording {
  background: #F44336;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(244, 67, 54, 0.5);
  animation: micPulse 1s infinite;
}

.mic-btn.mic-processing,
.mic-btn.processing {
  background: #9E9E9E;
  transform: scale(1);
  animation: none;
}

.mic-btn.mic-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.mic-btn.mic-bedtime-armed {
  box-shadow: 0 0 0 4px rgba(255, 213, 79, 0.45), 0 0 24px rgba(255, 213, 79, 0.35);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(244, 67, 54, 0.5); }
  50% { box-shadow: 0 0 35px rgba(244, 67, 54, 0.8); }
}

.mic-icon {
  font-size: 32px;
  color: #fff;
  line-height: 1;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: rgba(35, 35, 58, 0.85);
  border-radius: 28px;
  padding: 24px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  backdrop-filter: blur(12px);
}

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

.modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 20px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}

.modal-btn.secondary {
  background: rgba(255,255,255,0.18);
}

.children-input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 0.9rem;
}

.children-input::placeholder {
  color: rgba(255,255,255,0.45);
}

.game-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.leaderboard-modal {
  max-width: 420px;
  width: min(92vw, 420px);
}

.leaderboard-games {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.leaderboard-games .dj-btn {
  width: 100%;
  text-align: left;
}

.leaderboard-list {
  margin-top: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  min-height: 48px;
}

.leaderboard-row {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-row:last-child {
  border-bottom: none;
}

.game-screen {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  color: #fff;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.game-screen-visible {
  opacity: 1;
  transform: scale(1);
}

.game-screen-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(108, 99, 255, 0.35), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(255, 64, 129, 0.25), transparent 40%),
    linear-gradient(160deg, #0f1028 0%, #1a1a3e 45%, #12122a 100%);
  animation: gameBgPulse 8s ease-in-out infinite alternate;
}

.game-screen-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.4), transparent);
  animation: gameStarsDrift 20s linear infinite;
  pointer-events: none;
}

@keyframes gameBgPulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.08); }
}

@keyframes gameStarsDrift {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

.game-screen-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), transparent);
}

.game-screen-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-screen-emoji {
  font-size: 2rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.game-screen-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.game-level-track {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.game-level-badge {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.12);
  padding: 2px 10px;
  border-radius: 12px;
}

.game-level-dots {
  display: flex;
  gap: 4px;
}

.game-level-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: transform 0.3s, background 0.3s;
}

.game-level-dot.filled {
  background: var(--yellow);
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(255, 213, 79, 0.6);
}

.game-close-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}

.game-screen-body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 16px max(16px, env(safe-area-inset-bottom));
  overflow: auto;
  width: 100%;
}

.game-result-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}

.game-result-modal.visible {
  opacity: 1;
}

.game-result-box {
  background: rgba(35, 35, 58, 0.95);
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  max-width: 320px;
  width: 90%;
  animation: gameResultPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid rgba(255,255,255,0.1);
}

.game-result-box.won {
  border-color: rgba(255, 213, 79, 0.5);
  box-shadow: 0 0 40px rgba(255, 213, 79, 0.2);
}

.game-result-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  animation: gameResultBounce 0.6s ease;
}

@keyframes gameResultPop {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes gameResultBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.game-result-box .modal-btn {
  width: 100%;
  margin-top: 10px;
}

/* ===== Общий мультяшный визуал игр v5.1.12 ===== */

.game-fullscreen {
  font-family: Georgia, 'Times New Roman', serif;
  overflow: hidden;
}

.game-starfield-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.game-content {
  flex: 1;
  position: relative;
  z-index: 2;
}

.game-close {
  transition: all 0.2s;
  border: 2px solid rgba(255, 255, 255, 0.35) !important;
}

.game-close:hover {
  background: rgba(255, 0, 0, 0.45) !important;
  border-color: #f44 !important;
}

.game-title {
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.45);
}

.game-level {
  background: rgba(255, 215, 0, 0.18) !important;
  color: var(--game-gold) !important;
}

.game-footer {
  position: relative;
  z-index: 2;
  padding: 8px 16px max(8px, env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.35), transparent);
  min-height: 4px;
}

.game-score {
  color: var(--game-gold);
}

/* Конфетти */
.game-confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4000;
  overflow: hidden;
}

.game-confetti-particle {
  position: absolute;
  animation: confettiFall ease-out forwards;
  z-index: 4001;
}

@keyframes confettiFall {
  0% { transform: translateY(-10vh) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(110vh) rotate(var(--confetti-rot, 720deg)) scale(0); opacity: 0; }
}

/* Люцик в углу */
.game-lucik {
  position: absolute;
  bottom: max(72px, calc(16px + env(safe-area-inset-bottom)));
  right: 16px;
  z-index: 100;
  animation: lucikBounce 2s ease-in-out infinite;
  cursor: pointer;
}

.game-lucik img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.35);
  display: block;
}

.lucik-bubble {
  position: absolute;
  bottom: 58px;
  right: -10px;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.game-lucik:active .lucik-bubble,
.game-lucik:hover .lucik-bubble {
  opacity: 1;
}

@keyframes lucikBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Сердечки (мемори) */
.game-match-heart {
  position: absolute;
  font-size: 1.25rem;
  pointer-events: none;
  z-index: 50;
  animation: heartFloat 1s ease-out forwards;
}

@keyframes heartFloat {
  0% { transform: translateY(0) scale(0.5); opacity: 1; }
  100% { transform: translateY(-60px) scale(1.2); opacity: 0; }
}

/* --- Темы 12 игр --- */

.game-theme-fish .game-screen-bg {
  background: linear-gradient(180deg, #1e88c0 0%, var(--game-water) 45%, #051525 100%);
  animation: gameBgPulse 6s ease-in-out infinite alternate;
}

.game-theme-fish .fish-area-full {
  background: linear-gradient(180deg, rgba(30, 120, 180, 0.85), rgba(13, 33, 55, 0.95));
  border-color: rgba(0, 210, 255, 0.4);
  box-shadow: inset 0 0 80px rgba(0, 180, 255, 0.12), 0 0 30px rgba(108, 99, 255, 0.25);
}

.game-theme-fish .fish-bubbles {
  animation: bubbleRise 8s linear infinite;
}

@keyframes bubbleRise {
  0% { background-position: 0 100%; opacity: 0.5; }
  100% { background-position: 0 -20%; opacity: 1; }
}

.game-theme-puzzle .game-screen-bg {
  background:
    repeating-linear-gradient(90deg, rgba(90, 60, 30, 0.08) 0 2px, transparent 2px 24px),
    repeating-linear-gradient(0deg, rgba(70, 45, 20, 0.06) 0 2px, transparent 2px 24px),
    linear-gradient(160deg, #3d2817 0%, #5c3d1e 50%, #2a1810 100%);
}

.game-theme-puzzle .puzzle-cell {
  border: 2px solid rgba(255, 215, 0, 0.45) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(255, 215, 0, 0.08) !important;
}

.game-theme-puzzle .puzzle-cell.puzzle-solved-flash {
  animation: puzzleFlash 0.5s ease;
}

@keyframes puzzleFlash {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
  50% { box-shadow: 0 0 24px rgba(255, 215, 0, 0.8); }
}

.game-theme-memory .game-screen-bg {
  background: linear-gradient(180deg, var(--game-sky-top), var(--game-sky-bottom));
}

.game-theme-memory .memory-board > div,
.game-theme-memory .memory-card {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
  background: linear-gradient(145deg, rgba(123, 104, 238, 0.35), rgba(30, 30, 60, 0.9)) !important;
  border: 2px solid rgba(255, 215, 0, 0.35);
  border-radius: 14px !important;
  box-shadow: 0 4px 16px rgba(123, 104, 238, 0.25);
}

.game-theme-memory .memory-card.flipped,
.game-theme-memory .memory-board > div.flipped {
  background: linear-gradient(145deg, #fff8f0, #ffe8cc) !important;
  border-color: var(--game-gold);
}

.game-theme-memory .memory-card.matched,
.game-theme-memory .memory-board > div.matched {
  background: linear-gradient(145deg, #4caf50, #2e7d32) !important;
  border-color: #a5d6a7;
}

.game-theme-riddles .game-screen-bg {
  background: linear-gradient(165deg, #2a1810 0%, #4a3020 40%, #1a1008 100%);
}

.game-theme-riddles .game-panel-riddles {
  background: linear-gradient(180deg, #f5e6c8, #e8d4a8);
  color: #3d2817;
  border-radius: 16px;
  padding: 20px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 40px rgba(255, 200, 100, 0.15);
  border: 2px solid rgba(180, 140, 80, 0.5);
  position: relative;
}

.game-theme-riddles .game-panel-riddles::before {
  content: '🕯️';
  position: absolute;
  top: -8px;
  right: 16px;
  font-size: 1.5rem;
  animation: candleFlicker 2s ease-in-out infinite;
}

@keyframes candleFlicker {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(0.95); }
}

.game-theme-riddles .game-question-text { color: #3d2817; }
.game-theme-riddles .game-text-input {
  background: rgba(255, 255, 255, 0.85);
  color: #333;
}

.game-theme-quest .game-screen-bg {
  background:
    radial-gradient(circle at 30% 70%, rgba(210, 180, 100, 0.15), transparent 50%),
    linear-gradient(180deg, #3d2b1f 0%, #5c4030 50%, #2a1a10 100%);
}

.game-theme-quest .game-panel,
.game-theme-quest .quest-choice-btn {
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 14px;
}

.game-theme-maze .game-screen-bg {
  background: linear-gradient(180deg, #0a1a0a 0%, #1a2e1a 50%, #0d180d 100%);
}

.game-theme-maze canvas,
.game-theme-maze .maze-grid {
  border: 3px solid rgba(45, 90, 39, 0.8);
  box-shadow: 0 0 30px rgba(76, 175, 80, 0.2);
  border-radius: 12px;
}

.game-theme-quiz .game-screen-bg {
  background: linear-gradient(135deg, #1a0a3e 0%, #4a148c 50%, #1a237e 100%);
  animation: quizBgShift 10s ease infinite alternate;
}

@keyframes quizBgShift {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(15deg); }
}

.game-theme-quiz .game-panel,
.game-theme-quiz .quiz-opt-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 215, 0, 0.25);
  border-radius: 14px;
}

.game-theme-runner .game-screen-bg {
  background: linear-gradient(180deg, #87ceeb 0%, #2d5a27 60%, #1a3a1a 100%);
}

.game-theme-runner canvas {
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.game-theme-drawAi .game-screen-bg {
  background: linear-gradient(180deg, #4a3728 0%, #6d5344 40%, #2a2018 100%);
}

.game-theme-drawAi canvas {
  background: #fffef8 !important;
  border: 4px solid #8b6914;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.game-theme-musicCat .game-screen-bg {
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 215, 0, 0.2), transparent 60%),
    linear-gradient(180deg, #1a0a2e 0%, #2d1b4e 100%);
}

.game-theme-musicCat .music-cat-body,
.game-theme-musicCat .music-zone {
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.3));
}

/* 🎧 DJ Люцик */
.dj-stage {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  z-index: 3;
}

.dj-avatar-wrap {
  position: relative;
  width: min(250px, 70vw);
  height: min(250px, 70vw);
  margin: 0 auto 20px;
}

.dj-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 40px rgba(255, 215, 0, 0.5),
    0 8px 32px rgba(0, 0, 0, 0.45);
}

.dj-body-btn {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, 0.45);
  background: rgba(255, 215, 0, 0.12);
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  touch-action: manipulation;
}

.dj-body-btn:hover,
.dj-body-btn.active {
  background: rgba(255, 215, 0, 0.42);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.55);
  transform: scale(1.05);
}

.dj-panel {
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: 16px;
  padding: 12px 16px;
  margin-top: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.dj-panel h4 {
  margin: 0 0 10px;
  color: var(--game-gold);
  font-size: 1rem;
  text-align: center;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.dj-bass-grid,
.dj-drum-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.dj-pad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  justify-items: center;
  margin-bottom: 12px;
}

.dj-pad-btn {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  border: 2px solid rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.1);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  touch-action: manipulation;
}

.dj-pad-btn:hover,
.dj-pad-btn.dj-pad-flash {
  background: rgba(255, 215, 0, 0.4);
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.45);
}

.dj-pad-btn.has-custom {
  border-color: rgba(76, 175, 80, 0.7);
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.35);
}

.dj-pad-btn.recording-target {
  border-color: #ff4081;
  animation: djRecordPulse 0.8s ease-in-out infinite;
}

@keyframes djRecordPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 64, 129, 0.4); }
  50% { box-shadow: 0 0 18px rgba(255, 64, 129, 0.8); }
}

.dj-btn {
  min-width: 48px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 2px solid rgba(255, 215, 0, 0.38);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.22), rgba(255, 140, 0, 0.14));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  touch-action: manipulation;
}

.dj-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.35);
}

.dj-btn:active {
  transform: scale(0.96);
}

.dj-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.drum-btn {
  font-size: 1.4rem;
  min-width: 52px;
}

.dj-fx-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.dj-filter-slider {
  margin-top: 12px;
  text-align: center;
  color: var(--game-gold);
}

.dj-filter-slider input[type="range"] {
  width: 100%;
  margin-bottom: 6px;
  accent-color: #ffd700;
}

.game-theme-constellation .game-screen-bg {
  background: radial-gradient(ellipse at 50% 40%, rgba(123, 104, 238, 0.25), transparent 55%),
    linear-gradient(180deg, #050510 0%, #0d1b2a 50%, #1a0a2e 100%);
}

.game-theme-constellation canvas {
  border-radius: 16px;
  box-shadow: inset 0 0 60px rgba(123, 104, 238, 0.15);
}

.game-theme-popFears .game-screen-bg {
  background: linear-gradient(180deg, #1a0533 0%, #2d1b69 30%, #4a2c8a 60%, #1a0533 100%);
}

.game-hud-row {
  position: relative;
  z-index: 3;
  color: var(--game-gold);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* ===== Pixar-стиль v5.1.13 — 5 игр ===== */

/* 🐱 Люцик-раннер */
.runner-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.runner-lucik-avatar {
  position: absolute;
  width: 56px;
  height: 56px;
  pointer-events: none;
  z-index: 4;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.45)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
  transition: transform 0.05s linear;
}

.runner-pixar-canvas {
  border: 3px solid rgba(255, 255, 255, 0.35);
}

/* 🎨 Рисовалка */
.draw-pixar-wrap {
  text-align: center;
  position: relative;
  z-index: 3;
}

.draw-pixar-easel {
  background: linear-gradient(180deg, #FFF8E1, #FFECB3);
  border-radius: 24px;
  padding: 20px;
  display: inline-block;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 8px #8B4513,
    0 0 0 12px #D2691E;
}

.draw-pixar-canvas {
  border-radius: 12px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
  background: #FFFEF5;
  touch-action: none;
  max-width: 100%;
  display: block;
}

.draw-pixar-palette {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.draw-color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.2s;
  padding: 0;
}

.draw-color-swatch:hover,
.draw-color-swatch.active {
  transform: scale(1.15);
  box-shadow: 0 6px 16px rgba(255, 140, 0, 0.5);
}

.draw-pixar-guess-btn {
  margin-top: 16px;
  background: linear-gradient(180deg, #FF8C00, #E67600);
  border: none;
  color: #fff;
  padding: 14px 32px;
  border-radius: 24px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
  font-family: Georgia, serif;
}

.draw-pixar-guess-btn:active {
  transform: scale(0.97);
}

.draw-pixar-result {
  margin-top: 12px;
  font-size: 18px;
  color: #333;
  background: rgba(255, 255, 255, 0.85);
  padding: 10px 16px;
  border-radius: 16px;
  display: inline-block;
  max-width: 90%;
}

/* 🎵 Музыкальный кот */
.music-stage {
  background: linear-gradient(180deg, #2C003E, #1A0025);
  position: relative;
  overflow: hidden;
  min-height: 380px;
  border-radius: 20px;
  padding: 24px 16px;
  box-shadow: inset 0 0 80px rgba(255, 215, 0, 0.08);
}

.spotlight {
  position: absolute;
  width: 200px;
  height: 400px;
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.4), transparent);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  pointer-events: none;
  top: 0;
}

.spotlight-left {
  left: 10%;
  animation: spotlightSway 3s ease-in-out infinite;
}

.spotlight-right {
  right: 10%;
  animation: spotlightSway 3s ease-in-out infinite reverse;
}

@keyframes spotlightSway {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

.music-lucik-wrap {
  position: relative;
  width: 200px;
  height: 280px;
  margin: 0 auto;
  filter: drop-shadow(0 10px 30px rgba(255, 140, 0, 0.5));
  animation: stageBounce 1s ease-in-out infinite;
}

@keyframes stageBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.music-lucik-part {
  position: absolute;
  cursor: pointer;
  background: linear-gradient(145deg, #FFB347, #FF8C00, #E67600);
  box-shadow:
    inset 0 -4px 8px rgba(0, 0, 0, 0.15),
    inset 0 4px 8px rgba(255, 255, 255, 0.25),
    0 6px 16px rgba(255, 140, 0, 0.4);
  transition: transform 0.15s, filter 0.15s;
}

.music-lucik-part:active,
.music-part-glow {
  filter: brightness(1.3) drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
  transform: scale(1.05);
}

.music-part-head {
  top: 0;
  left: 60px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.music-part-body {
  top: 90px;
  left: 40px;
  width: 120px;
  height: 120px;
  border-radius: 40px;
}

.music-part-paw {
  top: 180px;
  width: 40px;
  height: 60px;
  border-radius: 20px;
}

.music-part-paw-left { left: 20px; }
.music-part-paw-right { right: 20px; }

.music-part-tail {
  top: 120px;
  right: -10px;
  width: 24px;
  height: 80px;
  border-radius: 12px;
  transform: rotate(25deg);
}

.music-play-btn {
  position: relative;
  z-index: 2;
  margin-top: 20px !important;
}

.music-note {
  position: absolute;
  font-size: 36px;
  animation: noteFloat 2s ease-out forwards;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  pointer-events: none;
  z-index: 10;
}

@keyframes noteFloat {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-200px) scale(1.5); opacity: 0; }
}

/* 🌟 Созвездия */
.constellation-pixar-canvas {
  width: 100%;
  max-width: 520px;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(123, 104, 238, 0.35);
  border: 2px solid rgba(255, 215, 0, 0.2);
}

.constellation-pixar-label {
  text-align: center;
  font-size: 1.1rem;
  color: var(--game-gold);
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
  margin-top: 12px;
}

/* 🫧 Лопни страхи — Pixar */
.fear-forest {
  position: relative;
  width: 100%;
  min-height: 50vh;
  border-radius: 16px;
  overflow: hidden;
}

.fear-pop-counter {
  text-align: center;
  font-size: 1.1rem;
  color: var(--game-gold);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  margin-top: 12px;
}

.fear-bubble {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: #fff;
  background: radial-gradient(circle at 35% 30%,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(123, 104, 238, 0.4) 40%,
    rgba(255, 105, 180, 0.3) 70%,
    rgba(72, 61, 139, 0.5) 100%
  );
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(3px);
  box-shadow:
    0 8px 32px rgba(123, 104, 238, 0.4),
    inset 0 2px 8px rgba(255, 255, 255, 0.3);
  animation: fearBubbleFloat 4s ease-in-out infinite, bubbleShine 3s ease-in-out infinite;
  transition: transform 0.2s, box-shadow 0.2s;
}

.fear-bubble .fear-emoji {
  font-size: 2rem;
  line-height: 1;
}

.fear-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(255, 215, 0, 0.6);
}

.fear-bubble.popping {
  animation: popAnimation 0.3s ease-out forwards;
  pointer-events: none;
}

@keyframes fearBubbleFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-30px) rotate(3deg); }
  75% { transform: translateY(-15px) rotate(-3deg); }
}

@keyframes bubbleShine {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

@keyframes popAnimation {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
  100% { transform: scale(0); opacity: 0; }
}

.pop-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 4000;
  animation: particleBurst 0.8s ease-out forwards;
}

.fear-forest .pop-particle,
.fear-forest .pop-flash {
  position: absolute;
  z-index: 20;
}

@keyframes particleBurst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

.pop-flash {
  position: fixed;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), transparent);
  z-index: 3999;
  pointer-events: none;
  animation: popFlash 0.4s ease-out forwards;
}

.fear-forest .pop-flash {
  z-index: 19;
}

@keyframes popFlash {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes starUp {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-40px) scale(1.5); }
}

@keyframes levelUp {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(0.9); }
}

.fish-area-full {
  flex: 1;
  width: 100%;
  max-width: 520px;
  position: relative;
  background: linear-gradient(180deg, rgba(26, 58, 92, 0.9), rgba(13, 33, 55, 0.95));
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid rgba(0, 210, 255, 0.25);
  box-shadow: inset 0 0 60px rgba(0, 210, 255, 0.08), 0 0 24px rgba(108, 99, 255, 0.2);
  min-height: 55vh;
}

.fish-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: repeating-linear-gradient(90deg, rgba(0, 210, 255, 0.15) 0 20px, transparent 20px 40px);
  animation: fishWaveMove 4s linear infinite;
  pointer-events: none;
  z-index: 1;
}

.fish-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.12) 0 4px, transparent 5px),
    radial-gradient(circle at 60% 70%, rgba(255,255,255,0.1) 0 3px, transparent 4px),
    radial-gradient(circle at 80% 85%, rgba(255,255,255,0.08) 0 5px, transparent 6px);
  animation: bubbleFloat 6s ease-in-out infinite;
}

@keyframes fishWaveMove {
  from { transform: translateX(0); }
  to { transform: translateX(-40px); }
}

@keyframes bubbleFloat {
  0%, 100% { opacity: 0.6; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-8px); }
}

.memory-board .memory-card {
  perspective: 600px;
  transition: transform 0.35s ease;
}

.memory-board .memory-card.flipped {
  transform: rotateY(180deg);
}

.puzzle-cell {
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.puzzle-cell:active {
  transform: scale(0.95);
}

.quiz-opt-btn.correct-flash {
  background: rgba(76, 175, 80, 0.5) !important;
  animation: correctPulse 0.6s ease;
}

.quiz-opt-btn.wrong-flash {
  background: rgba(244, 67, 54, 0.4) !important;
  animation: wrongShake 0.4s ease;
}

@keyframes correctPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.fish-element {
  animation: fishSwim 3s ease-in-out infinite alternate;
}

@keyframes fishSwim {
  from { transform: rotate(-5deg) scale(1); }
  to { transform: rotate(5deg) scale(1.05); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.child-chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 6px;
}

.landing-link {
  font-size: 1rem !important;
  text-decoration: none;
}

.game-panel {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 20px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.game-text-input {
  width: 100%;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 1rem;
  margin: 8px 0;
}

.game-text-input:focus {
  outline: none;
  border-color: var(--accent);
}

.game-text-input.shake {
  animation: inputShake 0.4s ease;
}

@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.quest-choice-btn,
.quiz-opt-btn {
  width: 100%;
  transition: transform 0.15s, background 0.2s;
}

.quest-choice-btn:active,
.quiz-opt-btn:active {
  transform: scale(0.98);
}

.puzzle-board-animated .puzzle-cell {
  animation: puzzleFadeIn 0.35s ease backwards;
}

@keyframes puzzleFadeIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.memory-board,
.puzzle-board {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.achievement-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--yellow);
  color: #000;
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 600;
  z-index: 3000;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* Прозрачные карточки для лендинга и кабинета */
.card-transparent {
  background: rgba(35, 35, 58, 0.5);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 15px;
  backdrop-filter: blur(8px);
}

.alert-highlight {
  background: rgba(255, 64, 129, 0.25);
  border-left: 4px solid var(--accent);
  padding: 10px 14px;
  border-radius: 0 12px 12px 0;
  margin: 4px 0;
  font-size: 0.85rem;
}

.dev-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 20, 0.92);
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 8px 12px;
  font-size: 0.72rem;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.dev-panel button {
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.72rem;
}

.dev-panel .dev-stat {
  opacity: 0.75;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.admin-stat-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.admin-stat-card .val {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}

.admin-stat-card .lbl {
  font-size: 0.75rem;
  opacity: 0.65;
  margin-top: 4px;
}

.empty-state {
  opacity: 0.55;
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
}

/* Landing */
.landing {
  text-align: center;
  padding: 24px 16px 40px;
  max-width: 720px;
}

.landing-hero-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
  margin-bottom: 12px;
}

.landing h1 {
  font-size: 1.75rem;
  margin: 0 0 10px;
  line-height: 1.25;
}

.landing-subtitle,
.hero-subtitle {
  opacity: 0.85;
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 auto 16px;
  max-width: 520px;
}

.hero-badge {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0;
}

.badge-new,
.badge-launch {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.counter-box {
  margin: 20px auto;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  max-width: 320px;
}

.counter {
  font-size: 2rem;
  font-weight: 700;
  color: #FFD700;
}

.counter-label {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-top: 4px;
}

.hero-cta-text {
  font-size: 0.95rem;
  margin: 16px auto 0;
  max-width: 480px;
  opacity: 0.9;
}

.hero-cta-text code {
  background: rgba(255, 215, 0, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.promo-counter {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  max-width: 400px;
  margin: 24px auto;
  color: #333;
}

.promo-counter h3 {
  margin: 0 0 8px;
  color: #222;
}

.promo-counter code {
  background: rgba(255, 215, 0, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.promo-bar-wrap {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  height: 12px;
  margin: 12px 0;
  overflow: hidden;
}

.promo-bar {
  background: linear-gradient(90deg, #FFD700, #ff9f4a);
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
  width: 0%;
}

.about-startup {
  margin: 32px auto;
  padding: 24px;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.about-startup h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.startup-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.startup-stats .stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFD700;
}

.startup-stats .stat-label {
  font-size: 0.75rem;
  opacity: 0.8;
}

.faq {
  padding: 60px 16px;
  max-width: 700px;
  margin: 0 auto;
}

.faq h2 {
  text-align: center;
  margin-bottom: 40px;
  color: #fff;
}

.faq-item {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
}

.faq-item h3 {
  color: #6C63FF;
  margin-bottom: 8px;
}

.faq-item p {
  color: #555;
  line-height: 1.5;
}

.admin-reply {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(108, 99, 255, 0.15);
  border-radius: 8px;
  font-size: 0.85rem;
  text-align: left;
}

.child-birthday-line {
  opacity: 0.8;
  font-size: 0.9rem;
  margin: 4px 0 16px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes crumbFall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--crumb-dx, 0), 60px) rotate(var(--crumb-rot, 180deg)); opacity: 0; }
}

.landing-subtitle {
  opacity: 0.85;
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 auto 24px;
  max-width: 520px;
}

.landing-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0 36px;
}

.btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 35px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 200ms ease, box-shadow 200ms ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-accent {
  background: linear-gradient(135deg, #ffb800, #ff9100);
  color: #1a1a2e;
}

.btn:hover {
  transform: scale(1.04);
}

.landing-section-title {
  font-size: 1.35rem;
  margin: 0 0 20px;
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  margin-bottom: 32px;
}

.how-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--card);
  border-radius: 20px;
  padding: 18px;
  backdrop-filter: blur(8px);
}

.how-step-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}

.how-step-text h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.how-step-text p {
  margin: 0;
  opacity: 0.7;
  font-size: 0.88rem;
  line-height: 1.45;
}

.landing-footer {
  margin-top: 24px;
  opacity: 0.5;
  font-size: 0.8rem;
}

.landing-footer a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 10px;
}

@media (max-width: 600px) {
  .landing-btns {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-btns .btn {
    width: 100%;
    text-align: center;
  }
}

/* Landing features */
.features {
  padding: 20px 0 10px;
}

.features h2,
.for-whom h2,
.how-start h2 {
  text-align: center;
  font-size: 1.35rem;
  margin: 0 0 8px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.feature-card {
  background: rgba(35, 35, 58, 0.72);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  opacity: 0.78;
  font-size: 0.88rem;
  line-height: 1.5;
}

.feature-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
}

.for-whom {
  padding: 20px 16px 40px;
}

.check-list {
  list-style: none;
  max-width: 520px;
  margin: 16px auto 0;
  padding: 0;
  text-align: left;
}

.check-list li {
  padding: 8px 0;
  font-size: 16px;
  opacity: 0.9;
}

.how-start {
  padding: 10px 16px 40px;
}

.steps {
  display: flex;
  gap: 24px;
  max-width: 800px;
  margin: 24px auto 0;
  flex-wrap: wrap;
  justify-content: center;
}

.step {
  flex: 1;
  min-width: 200px;
  text-align: center;
  padding: 20px;
  background: rgba(35, 35, 58, 0.5);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.step p {
  margin: 0;
  opacity: 0.75;
  font-size: 0.88rem;
  line-height: 1.45;
}

.step-number {
  width: 40px;
  height: 40px;
  background: #6C63FF;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  margin: 0 auto 12px;
}

/* Testimonials */
.testimonials {
  padding: 48px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  margin: 0 0 24px;
}

.testimonials h2 {
  text-align: center;
  margin-bottom: 32px;
  font-size: 1.35rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.92);
  color: #222;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.testimonial-stars {
  font-size: 18px;
  margin-bottom: 12px;
}

.testimonial-text {
  font-style: italic;
  color: #444;
  line-height: 1.6;
  margin-bottom: 16px;
  font-size: 0.92rem;
}

.testimonial-author {
  color: #666;
  font-size: 14px;
}

/* Pricing */
.pricing-page {
  max-width: 1100px;
  padding: 24px 16px 48px;
}

.pricing-back {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 16px;
}

.pricing-page h1 {
  margin: 0 0 6px;
  font-size: 1.75rem;
}

.pricing-subtitle {
  opacity: 0.7;
  margin: 0 0 28px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pricing-card {
  background: var(--card);
  border-radius: 24px;
  padding: 28px 22px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 200ms ease, box-shadow 200ms ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.pricing-popular {
  border: 2px solid #ffb800;
  box-shadow: 0 8px 28px rgba(255, 184, 0, 0.25);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffb800;
  color: #1a1a2e;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
}

.pricing-card h2 {
  margin: 8px 0 4px;
  font-size: 1.2rem;
}

.pricing-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}

.pricing-price span {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.7;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}

.pricing-features li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  opacity: 0.9;
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-btn {
  width: 100%;
  text-align: center;
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* Plan limit bar (app) */
.plan-limit-bar {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid rgba(255, 184, 0, 0.35);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 12px 0;
  text-align: center;
}

.plan-limit-bar p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.plan-upgrade-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 24px;
  background: #ffb800;
  color: #1a1a2e;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.plan-info-card .plan-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.plan-info-card .plan-row:last-child {
  border-bottom: none;
}

.plan-change-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 22px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.psychologist-help {
  background: rgba(186, 200, 255, 0.12);
  border: 1px solid rgba(186, 200, 255, 0.35);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 15px;
}

.psychologist-help h3 {
  margin: 0 0 10px;
  color: #c5cae9;
}

.psychologist-help p {
  opacity: 0.85;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 14px;
}

.btn-soft {
  background: rgba(186, 200, 255, 0.25);
  color: #e8eaf6;
  border: none;
  padding: 12px 22px;
  border-radius: 24px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-soft:hover {
  background: rgba(186, 200, 255, 0.35);
}

.advice-box {
  margin-top: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  border-left: 3px solid #9fa8da;
}

/* Admin charts */
.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.chart-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(8px);
}

.chart-card h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 150px;
  padding: 16px 8px 28px;
}

.bar-chart .bar {
  flex: 1;
  background: #6C63FF;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 300ms ease;
  position: relative;
  height: auto;
}

.bar-chart .bar-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.bar-chart .bar-value {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
}

.pie-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}

.pie-row {
  display: grid;
  grid-template-columns: 16px 1fr auto auto;
  gap: 8px;
  align-items: center;
  font-size: 0.88rem;
}

.pie-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.pie-pct {
  opacity: 0.55;
  font-size: 0.8rem;
}

/* Games menu */
.games-menu-box {
  text-align: center;
  max-width: 360px;
  width: 92%;
  padding: 16px;
}

.games-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 4px;
  margin-bottom: 12px;
}

.games-menu-grid .modal-btn {
  min-height: 44px;
  font-size: 0.85rem;
  padding: 10px 8px;
}

.games-menu-close {
  width: 100%;
}

body.has-dev-panel {
  padding-bottom: 56px;
}

.child-mode .parent-access,
.child-mode .settings-btn,
.child-mode .logout-btn {
  display: none !important;
}

.streak-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 16px;
  margin: 0 0 8px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
}

.streak-display .star,
.streak-display .streak-fire {
  font-size: 1.1rem;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
  .landing {
    max-width: 100%;
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    flex-direction: column;
  }

  .step {
    min-width: 100%;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .modal-box {
    max-width: 92%;
    margin: 16px;
  }

  .charts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .landing h1 {
    font-size: 1.45rem;
  }

  .btn,
  .auth-btn,
  .modal-btn {
    min-height: 44px;
    font-size: 14px;
  }

  .btn-icon,
  .action-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .avatar-container img,
  .avatar-container .avatar,
  .avatar-container .avatar-img,
  .avatar,
  .avatar-img {
    width: 120px;
    height: 120px;
  }

  .mic-btn {
    width: 72px;
    height: 72px;
  }

  .check-list li {
    font-size: 14px;
  }

  .promocode-group input {
    width: 100%;
  }

  .games-menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dev-panel {
    font-size: 0.68rem;
  }

  .dev-panel button {
    min-height: 36px;
    padding: 8px 10px;
  }
}

/* Admin panel v5.0.2 */
.admin-login {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
}

.admin-login-card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px 24px;
  width: 100%;
  max-width: 380px;
  backdrop-filter: blur(8px);
}

.admin-login-card h2 {
  margin: 0 0 6px;
  font-size: 1.3rem;
}

.admin-login-sub {
  opacity: 0.6;
  font-size: 0.85rem;
  margin: 0 0 20px;
}

.admin-login-card input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-size: 1rem;
}

.admin-login-card button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-error {
  color: #ff6b6b;
  font-size: 0.85rem;
  min-height: 1.2em;
  margin: 10px 0 0;
}

.admin-back-link {
  color: var(--accent);
  font-size: 0.85rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.admin-header h1 {
  margin: 0 0 4px;
  font-size: 1.4rem;
}

.admin-updated {
  opacity: 0.55;
  font-size: 0.8rem;
  margin: 0;
}

.admin-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-logout-btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
}

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.admin-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(8px);
}

.admin-card.warn .big-number {
  color: #ffb800;
}

.admin-card h3 {
  margin: 0 0 8px;
  font-size: 0.8rem;
  opacity: 0.75;
  font-weight: 500;
}

.admin-card .big-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.admin-section {
  background: rgba(35, 35, 58, 0.45);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.admin-section h3 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table th {
  opacity: 0.65;
  font-weight: 600;
}

.admin-table .empty-cell {
  text-align: center;
  opacity: 0.55;
}

.admin-list-row,
.plan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.plan-row {
  display: grid;
  grid-template-columns: 16px 1fr auto auto;
  gap: 10px;
}

.plan-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.plan-pct {
  opacity: 0.55;
  font-size: 0.8rem;
}

.time-bar-row {
  display: grid;
  grid-template-columns: 88px 1fr 36px;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-size: 0.85rem;
}

.bar-fill-time {
  height: 8px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.admin-page .bar-bg {
  background: rgba(255, 255, 255, 0.1);
  height: 8px;
  border-radius: 10px;
  overflow: hidden;
}

/* Feedback v5.0.3 */
.feedback-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9000;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 12px 16px;
  font-size: 14px;
  min-height: 44px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.feedback-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9500;
  padding: 16px;
}

.feedback-box {
  background: var(--card);
  border-radius: 20px;
  padding: 22px;
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(8px);
}

.feedback-box h3 { margin: 0 0 6px; }
.feedback-sub { opacity: 0.7; font-size: 0.85rem; margin: 0 0 14px; }

.feedback-stars {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: #ffb800;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

.feedback-box textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  padding: 12px;
  font-size: 14px;
  margin-bottom: 10px;
  resize: vertical;
}

.feedback-extend {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 10px;
  opacity: 0.85;
}

.feedback-error {
  color: #ff6b6b;
  font-size: 0.85rem;
  min-height: 1em;
}

.feedback-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.feedback-actions .modal-btn { flex: 1; }

.fear-bubble { animation: floatBubble 4s ease-in-out infinite; }

@keyframes floatBubble {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.1); }
}

.cat-part { transition: filter 0.2s; }
.cat-part:active { filter: drop-shadow(0 0 15px gold); transform: scale(1.1); }

.children-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.children-tabs .tab {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.children-tabs .tab.active {
  background: var(--accent);
  font-weight: 600;
}

.thanks-item {
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid #FFD700;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: 0 8px 8px 0;
}

.thanks-message {
  font-style: italic;
  color: #FFD700;
  margin-bottom: 4px;
}

.thanks-meta {
  font-size: 12px;
  color: #888;
}

.mood-chart {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

#moodChart {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.mood-day {
  text-align: center;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  min-width: 70px;
}

.mood-emoji { font-size: 28px; }
.mood-text { font-size: 11px; margin: 4px 0; }
.mood-day-name { font-size: 12px; color: #888; }

@keyframes fallDown {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

@keyframes waveMove {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@keyframes fishFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

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

@keyframes fishSwim {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(15px); }
}

@keyframes tailWiggle {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(8deg); }
}

@keyframes shineMove {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes seaweedSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

@keyframes rise {
  0% { transform: translateY(0) scale(1); opacity: 0.8; }
  100% { transform: translateY(-400px) scale(0.5); opacity: 0; }
}

@keyframes splashDrop {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx, 10px), var(--dy, -20px)) scale(0); opacity: 0; }
}

@keyframes lightning {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.5); }
}

@keyframes dirtShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

@keyframes hungerShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}
