/* ============================================================
   Chloe & Pearl — Custom CSS
   Beyond what Tailwind provides
   ============================================================ */

/* Import Fredoka One via @font-face is handled by Google Fonts in base.html */

/* ── Global ── */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', sans-serif;
}

/* ── Font aliases ── */
.font-fredoka {
  font-family: 'Fredoka One', cursive;
}

/* ── Animations ── */
@keyframes rainbow-shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.rainbow-text {
  background: linear-gradient(270deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #b983ff, #ff6b6b);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow-shimmer 4s ease infinite;
}

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

.float {
  animation: float 3s ease-in-out infinite;
}

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

.wiggle {
  animation: wiggle 0.5s ease-in-out infinite;
}

/* ── Buttons ── */
.btn-chloe {
  background: linear-gradient(135deg, #9333EA, #EC4899);
  color: white;
  font-family: 'Fredoka One', cursive;
  border-radius: 50px;
  padding: 12px 28px;
  font-size: 1.2rem;
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
  transition: all 0.2s ease;
}

.btn-chloe:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(147, 51, 234, 0.5);
}

.btn-pearl {
  background: linear-gradient(135deg, #14B8A6, #06B6D4);
  color: white;
  font-family: 'Fredoka One', cursive;
  border-radius: 50px;
  padding: 12px 28px;
  font-size: 1.2rem;
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
  transition: all 0.2s ease;
}

.btn-pearl:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(20, 184, 166, 0.5);
}

/* ── Cards ── */
.page-card {
  background: white;
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid #f0f0f0;
}

.page-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
}

/* ── Forms ── */
.kid-input {
  border-radius: 16px;
  border: 3px solid #e5e7eb;
  padding: 12px 18px;
  font-size: 1.1rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.kid-input:focus {
  outline: none;
  border-color: #9333EA;
  box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.12);
}

/* ── Navigation ── */
.nav-active {
  background: linear-gradient(135deg, #9333EA, #EC4899);
  color: white !important;
}

/* ── Iframe container ── */
.preview-container {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 3px solid #e5e7eb;
}

/* ── Loading spinner ── */
.loading-dots::after {
  content: '.';
  animation: loading-dots 1.5s steps(4, end) infinite;
}

@keyframes loading-dots {
  0%   { content: '.'; }
  25%  { content: '..'; }
  50%  { content: '...'; }
  75%  { content: '....'; }
}

/* ── Emoji picker ── */
.emoji-btn {
  transition: transform 0.15s ease;
  cursor: pointer;
}

.emoji-btn:hover {
  transform: scale(1.3);
}

.emoji-btn.selected {
  transform: scale(1.4);
  filter: drop-shadow(0 0 6px rgba(147, 51, 234, 0.6));
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(#9333EA, #EC4899);
  border-radius: 10px;
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .font-fredoka {
    font-size: 90%;
  }
}

/* ── Version history list ── */
.version-item {
  border-left: 3px solid #e5e7eb;
  padding-left: 10px;
  transition: border-color 0.2s;
}

.version-item:hover {
  border-color: #9333EA;
}

/* ── Toast notification ── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1rem;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

/* ── Fun background pattern ── */
.dotted-bg {
  background-image: radial-gradient(circle, #e5e7eb 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── Border utilities missing from Tailwind ── */
.border-3 {
  border-width: 3px;
}
