/* ========================================================
   LOVE SCRATCH CARD — Design System & Style Guide
   Premium white-pink theme with rose-gold and pink accents
   ======================================================== */

:root {
  /* Colors - Switched to bright white-pink theme */
  --bg-dark: #fff5f6;
  --bg-gradient: linear-gradient(135deg, #fffcfd 0%, #fff0f2 50%, #ffd6dd 100%);
  
  /* Rose gold accents */
  --rose-gold: #b76e79;
  --rose-gold-light: #e0b0b6;
  --rose-gold-gradient: linear-gradient(135deg, #c38c95 0%, #b76e79 50%, #8c4a54 100%);
  --rose-gold-glow: rgba(183, 110, 121, 0.25);
  
  /* Heart pink & gold */
  --pink-primary: #ff4d6d;
  --pink-light: #ff758f;
  --gold-gradient: linear-gradient(135deg, #ffe259 0%, #ffa751 100%);
  
  /* Glass card settings (Light theme adaptations) */
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 77, 109, 0.2);
  --glass-hover: rgba(255, 77, 109, 0.3);
  
  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  
  /* Transitions */
  --transition-normal: all 300ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: all 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: #5c2a34; /* Darker warm text color for contrast on light background */
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* --- Background Hearts/Petals Canvas --- */
#hearts-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- App Layout --- */
.app-container {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 30px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

/* --- Header --- */
.app-header {
  margin-bottom: 5px;
}

.app-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: #4a1821; /* Dark burgundy for high contrast title */
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.app-title span {
  font-style: italic;
  background: linear-gradient(135deg, #ff4d6d, #ff8da1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-subtitle {
  font-size: 0.95rem;
  color: #7c4e56; /* Soft warm pink-brown text */
  font-weight: 400;
  max-width: 420px;
  margin: 0 auto;
}

/* --- Card Selector --- */
.card-selector {
  display: flex;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 77, 109, 0.15);
  border-radius: 50px;
  padding: 6px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 4px 20px rgba(255, 77, 109, 0.08);
}

.selector-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #7c4e56;
  border-radius: 50px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.selector-btn:hover {
  color: #ff4d6d;
  background: rgba(255, 77, 109, 0.05);
}

.selector-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #ff8da1 0%, #ff4d6d 100%);
  box-shadow: 0 4px 15px rgba(255, 77, 109, 0.25);
}

/* --- Scratch Card Container --- */
.card-container {
  width: 100%;
  perspective: 1000px;
}

.scratch-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1.58 / 1;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 
    0 12px 40px rgba(255, 77, 109, 0.12),
    0 0 0 1px var(--glass-border);
  cursor: crosshair;
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.scratch-card::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 77, 109, 0.15);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
  z-index: 2;
}

.scratch-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 20px 50px rgba(255, 77, 109, 0.18),
    0 0 15px rgba(255, 77, 109, 0.15),
    0 0 0 1px rgba(255, 77, 109, 0.35);
}

/* --- Revealed Content (Underneath) --- */
.revealed-content {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #ffffff 0%, #fff0f2 100%);
  color: #3b2226;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  z-index: 1;
}

.content-wrapper {
  text-align: center;
  max-width: 360px;
  animation: fadeIn 0.5s ease-out;
}

.content-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 8px;
  animation: floatIcon 3s ease-in-out infinite;
}

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

.content-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #724046;
  margin-bottom: 8px;
}

.content-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #593539;
  font-weight: 400;
}

/* Coupon specific styling */
.coupon-code {
  display: none;
  margin-top: 15px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #fff2f3, #ffe0e3);
  border: 1px dashed var(--rose-gold);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--rose-gold);
}

/* --- Scratch Canvas (Overlay) --- */
.scratch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  transition: opacity 0.5s ease-out;
}

/* --- Controls & Buttons --- */
.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.instruction-text {
  font-size: 0.85rem;
  color: #7c4e56;
  font-weight: 500;
  height: 1.2rem;
}

.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ff4d6d;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 15px rgba(255, 77, 109, 0.08);
}

.btn-reset:hover {
  background: rgba(255, 255, 255, 0.85);
  color: #ff123f;
  border-color: rgba(255, 77, 109, 0.4);
  box-shadow: 0 4px 15px rgba(255, 77, 109, 0.15);
}

.btn-reset svg {
  transition: transform var(--transition-fast);
}

.btn-reset:hover svg {
  transform: rotate(180deg);
}

/* --- Celebration Banner --- */
.celebration-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 235, 238, 0.95));
  border: 1px solid rgba(255, 77, 109, 0.25);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  width: 100%;
  max-width: 440px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: var(--transition-normal);
  box-shadow: 0 10px 30px rgba(255, 77, 109, 0.08);
}

.celebration-banner.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.banner-heart {
  font-size: 1.8rem;
  margin-bottom: 4px;
  animation: heartbeat 1.5s ease-in-out infinite;
}

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

.celebration-banner h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: #d93d59;
  margin-bottom: 4px;
}

.celebration-banner p {
  font-size: 0.82rem;
  color: #7c4e56;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* --- Responsive Adjustments --- */
@media (max-width: 480px) {
  .app-container {
    gap: 20px;
  }
  
  .card-selector {
    border-radius: 12px;
    flex-wrap: wrap;
    padding: 4px;
  }

  .selector-btn {
    flex: 0 0 100%;
    border-radius: 8px;
    padding: 8px 12px;
  }

  .selector-btn.active {
    border-radius: 8px;
  }
  
  .scratch-card {
    aspect-ratio: 1.3 / 1;
  }

  .scratch-card::after {
    inset: 8px;
  }
  
  .revealed-content {
    padding: 20px;
  }

  .content-title {
    font-size: 1.15rem;
  }

  .content-body {
    font-size: 0.85rem;
  }
}
