/* ==================== CARD REVEAL ANIMATION ==================== */

/* Card reveal sits directly on the dark backdrop — no box */
.card-reveal-fullscreen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  gap: 0;
  /* Let it fill the whole backdrop so any click registers */
  min-width: 100vw;
  min-height: 100vh;
  justify-content: center;
  box-sizing: border-box;
}

#daily-bonus-modal.card-reveal-mode {
  cursor: pointer;
}

.card-reveal-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: "Cinzel", serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c8960c;
  opacity: 0.85;
  margin: 0 0 14px;
}

/* Scene — relative container so particles position against it */
.card-reveal-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px;
  overflow: visible;
}

/* Radial glow behind the card — fades in when JS adds .active */
.card-reveal-scene-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.28) 0%, transparent 68%);
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
  z-index: 0;
}

.card-reveal-scene-glow.active {
  opacity: 1;
}

/* Card wrapper — sits above particles */
.card-reveal-wrapper {
  perspective: 900px;
  width: 280px;
  height: 393px;
  position: relative;
  z-index: 1;
}

.card-reveal-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@keyframes cardRevealShake {
  0%   { transform: translateX(0)    rotate(0deg); }
  20%  { transform: translateX(-6px) rotate(-2.5deg); }
  50%  { transform: translateX(6px)  rotate(2.5deg); }
  80%  { transform: translateX(-3px) rotate(-1deg); }
  100% { transform: translateX(0)    rotate(0deg); }
}

.card-reveal-inner.card-reveal-shake {
  animation: cardRevealShake 0.2s ease 4;
}

.card-reveal-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
  transition: box-shadow 0.7s ease 0.3s;
}

.card-reveal-back img,
.card-reveal-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-reveal-front {
  transform: rotateY(180deg);
}

.card-reveal-inner.flipped .card-reveal-front {
  box-shadow: 0 0 32px 12px rgba(255, 215, 0, 0.5), 0 6px 22px rgba(0, 0, 0, 0.4);
}

/* Star particles — spawned by JS, positioned inside .card-reveal-scene */
@keyframes starFly {
  0%   { transform: translate(-50%, -50%) scale(1.1) rotate(0deg); opacity: 1; }
  60%  { opacity: 0.7; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.1) rotate(var(--rot)); opacity: 0; }
}

.card-star-particle {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  z-index: 0;
  line-height: 1;
  animation: starFly var(--dur) ease-out var(--delay) forwards;
}

/* Info section below card — hidden until flip completes */
.card-reveal-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  opacity: 0;
  transition: opacity 0.5s ease;
  text-align: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  border-radius: 2px;
  border: 1px solid rgba(200, 150, 12, 0.3);
  padding: 14px 28px;
}

.card-reveal-name {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: "Cinzel", serif;
  color: #c8960c;
  text-transform: capitalize;
  letter-spacing: 0.04em;
  margin: 0;
}

.card-reveal-added {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.card-reveal-coins {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 4px 0 0;
}

.card-reveal-streak {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 12px;
}

/* ==================== SHARED BUTTON STYLES ==================== */
/* .btn classes are used across modals (login, register, daily bonus, etc.) */

.btn {
  padding: 10px 22px;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: "Cinzel", serif;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: linear-gradient(to bottom, #e6ce6a 0%, #c8960c 50%, #b7892b 100%);
  border: 1px solid #b7892b;
  color: #1a0a00;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 150, 12, 0.35);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.15);
  color: var(--text);
  border: 1px solid var(--surface-border);
}

.btn-secondary:hover {
  background: rgba(200, 150, 12, 0.12);
  border-color: #c8960c;
  transform: translateY(-1px);
}

/* ==================== DAILY BONUS ==================== */

/* Navbar button pulsing glow when bonus available */
.daily-bonus-btn.daily-bonus-available {
  animation: dailyBonusPulse 2s ease-in-out infinite;
}

@keyframes dailyBonusPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(231, 76, 60, 0);
  }
}

/* Badge dot on gift icon */
.daily-badge {
  background: #e74c3c;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0 3px;
  outline: 2px solid white;
}

/* Modal inner wrapper */
.daily-bonus-modal-inner {
  position: relative;
}

/* Streak display */
.streak-display {
  font-size: 1.1rem;
  color: var(--text);
  display: block;
  margin-bottom: 12px;
}

/* Week grid: 7 day boxes Mon–Sun */
.week-grid {
  display: flex;
  gap: 6px;
  margin: 12px 0 16px;
  justify-content: center;
}

.day-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 38px;
  padding: 8px 4px;
  border-radius: 2px;
  border: 1px solid var(--surface-border);
  background: rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

.day-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.7;
}

.day-icon {
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 1em;
}

/* Claimed day: green */
.day-box-claimed {
  background: rgba(46, 204, 113, 0.2);
  border-color: rgba(46, 204, 113, 0.5);
}

.day-box-claimed .day-icon {
  color: #2ecc71;
}

.day-box-claimed .day-label {
  opacity: 1;
  color: #2ecc71;
}

/* Missed day: red/faded */
.day-box-missed {
  background: rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.3);
  opacity: 0.6;
}

.day-box-missed .day-icon {
  color: #e74c3c;
}

/* Today's box: highlighted */
.day-box-today {
  background: rgba(200, 150, 12, 0.18);
  border-color: rgba(200, 150, 12, 0.7);
  animation: todayPulse 1.8s ease-in-out infinite;
}

.day-box-today .day-label {
  opacity: 1;
  color: #c8960c;
}

@keyframes todayPulse {
  0%, 100% { border-color: rgba(200, 150, 12, 0.7); }
  50% { border-color: rgba(200, 150, 12, 1); box-shadow: 0 0 8px rgba(200, 150, 12, 0.4); }
}

/* Future days: neutral */
.day-box-future {
  opacity: 0.4;
}

/* Grace note */
.grace-note {
  font-size: 0.88rem;
  color: var(--text);
  opacity: 0.8;
  margin: 8px 0;
  padding: 8px 12px;
  background: rgba(200, 150, 12, 0.1);
  border: 1px solid rgba(200, 150, 12, 0.3);
  border-radius: 2px;
  line-height: 1.4;
}

.grace-note i {
  color: #f39c12;
  margin-right: 6px;
}

.grace-note.grace-success {
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.3);
}

.grace-note.grace-success i {
  color: #2ecc71;
}

/* Reward preview */
.daily-bonus-reward {
  margin: 14px 0;
  text-align: center;
}

.reward-preview {
  font-size: 1.3rem;
  font-weight: 700;
  color: #c8960c;
  margin: 0;
}

.reward-preview i {
  margin-right: 6px;
}

.reward-claimed {
  color: var(--text);
  opacity: 0.6;
  font-size: 1rem;
  font-weight: 400;
}

/* Action buttons row */
.daily-bonus-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  justify-content: center;
}

.daily-bonus-collect-btn {
  padding: 10px 24px;
  font-size: 1rem;
}

/* Claim result styles */
.claim-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.coins-earned {
  font-size: 1.1rem;
  color: #c8960c;
  margin: 0;
}

.coins-earned i {
  margin-right: 6px;
}

.card-won {
  font-size: 1rem;
  color: #2ecc71;
  margin: 0;
}

.card-won i {
  margin-right: 6px;
}

.streak-info {
  font-size: 0.9rem;
  color: var(--text);
  opacity: 0.8;
  margin: 0;
}

.streak-info i {
  margin-right: 4px;
}

/* ==================== CARDS PAGE REGISTER CTA ==================== */

.cards-grid-register-cta {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

.register-cta-inner {
  max-width: 480px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.register-cta-icon {
  font-size: 3rem;
  color: #c8960c;
  opacity: 0.85;
}

.register-cta-title {
  font-size: 1.4rem;
  font-family: "Cinzel", serif;
  color: var(--papyrus-text);
  margin: 0;
}

.register-cta-desc {
  color: var(--text);
  opacity: 0.8;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.register-cta-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  text-align: left;
}

.register-cta-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text);
  opacity: 0.85;
}

.register-cta-step-num {
  min-width: 26px;
  height: 26px;
  border-radius: 2px;
  background: #c8960c;
  color: #1a0a00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.register-cta-btn {
  margin-top: 6px;
}

/* Responsive */
@media (max-width: 480px) {
  .week-grid {
    gap: 4px;
  }

  .day-box {
    width: 32px;
    padding: 6px 2px;
  }

  .day-label {
    font-size: 0.65rem;
  }

  .reward-preview {
    font-size: 1.1rem;
  }
}
