/* ================= NAV ================= */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease;
}

.mobile-menu.open {
  max-height: 600px;
  opacity: 1;
  pointer-events: auto;
}

/* ================= ROOT ================= */
:root {
  --hp-royal: #0a0f2d;
  --hp-gold-1: #f4d87b;
  --hp-gold-2: #d6b14c;
  --hp-purple: #1a1435;
}

/* ================= BASE ================= */
body {
  font-family: "Noto Sans", sans-serif;
  color: #1f2937;
}

/* Extra card feel */
.admin-card {
  padding: 24px;
}

/* ================= TEXT GRADIENT ================= */
.gold-gradient {
  background: linear-gradient(90deg, var(--hp-gold-1), var(--hp-gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ================= GLASS UI ================= */
.glass-card,
.bg-white\/6 {
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(203, 213, 225, 0.6);
  backdrop-filter: blur(16px);
}

.bg-white\/8:hover {
  background: rgba(255, 255, 255, 0.85);
}

/* Text fixes */
.text-white,
.text-slate-300 {
  color: #334155 !important;
}

.text-white\/95 {
  color: #1f2937 !important;
}

/* ================= MODAL ================= */
.hp-modal {
  background: white;
  color: #1f2937;
}

.modal-overlay {
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* Modal animation */
#todayModal {
  opacity: 0;
  transition: opacity 0.25s ease;
}

#todayModal.is-visible {
  opacity: 1;
}

#todayModal.is-visible .modal-overlay {
  opacity: 1;
}

#todayModalCard {
  transform: translateY(30px) scale(0.96);
  opacity: 0;
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

#todayModalCard.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ================= PLACE AUTOCOMPLETE ================= */
.place-item {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  animation: fadeIn 0.2s ease;
}

.place-item:last-child {
  border-bottom: none;
}

.place-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  width: 100%;
  max-width: 100%;
  line-height: 1.35;
  font-size: 14px;
  color: #1f2937;
}

.place-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 14px;
  color: #64748b;
  border-bottom: 1px solid #e5e7eb;
}

.place-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ================= ZODIAC CARD ================= */
.perspective {
  perspective: 1200px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 200px; /* desktop height */
  transform-style: preserve-3d;
  /* transition: transform 0.75s cubic-bezier(0.4, 0.2, 0.2, 1); */
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);

  transform: translateZ(0); /* ✅ FIX */
  will-change: transform;
}

/* Mobile */
@media (max-width: 640px) {
  .card-inner {
    height: 200px;
  }
}

/* Large screens */
@media (min-width: 1024px) {
  .card-inner {
    height: 210px;
  }
}

.zodiac-card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 18px;
  -webkit-backface-visibility: hidden; /* ✅ safari fix */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Front */
.zodiac-front {
  background: #1f2937;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.zodiac-img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  margin-bottom: 18px;
  transition: transform 0.6s ease;
}

.zodiac-card:hover .zodiac-img {
  transform: translateY(-6px) scale(1.06);
}

.zodiac-name {
  font-family: "Cinzel", serif;
  letter-spacing: 0.12em;
  font-size: 15px;
  color: #f8fafc;
}

/* Back */
.zodiac-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  color: #111;
  font-weight: 700;
}

.zodiac-card:active {
  transform: scale(0.97);
}

.back-title {
  font-size: 18px;
  margin-bottom: 6px;
}

.back-sub {
  font-size: 14px;
  opacity: 0.85;
}

.back-cta {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
}

.zodiac-card {
  cursor: pointer;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
  background: transparent;
  transform-style: preserve-3d;
}

.zodiac-card:hover {
  transform: translateY(-10px) scale(1.035);
}

.zodiac-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(
    circle at center,
    rgba(244, 216, 123, 0.35),
    transparent 60%
  );
  pointer-events: none;
}

.zodiac-card:hover::after {
  opacity: 1;
}

/* ================= ANIMATIONS ================= */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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