/* ==================== DESIGN SYSTEM & GENERAL STYLES ==================== */
:root {
  --bg-gradient: linear-gradient(135deg, #ffe5ec 0%, #ffc2d1 50%, #f9bec7 100%);
  --primary: #ff4d6d;
  --primary-hover: #ff758f;
  --secondary: #c9184a;
  --secondary-bg: #fff0f3;
  --accent: #ffb3c1;
  --text-main: #590d22;
  --text-muted: #800f2f;
  
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(229, 9, 20, 0.08);
  --card-shadow: 0 12px 24px rgba(89, 13, 34, 0.08);
  
  --safe-bottom: env(safe-area-inset-bottom, 16px);
  --safe-top: env(safe-area-inset-top, 16px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent; /* Remove mobile blue tap highlight */
}

body {
  font-family: 'Comfortaa', cursive, sans-serif;
  color: var(--text-main);
  background: var(--bg-gradient);
  background-attachment: fixed;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

/* ==================== BACKGROUND PARTICLES ==================== */
#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* ==================== AUDIO FLOATING BUTTON ==================== */
.music-btn {
  position: absolute;
  top: calc(var(--safe-top) + 10px);
  right: 20px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  cursor: pointer;
  outline: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.music-btn:active {
  transform: scale(0.9);
}

.music-btn svg {
  width: 20px;
  height: 20px;
}

.music-btn.playing svg.icon-play {
  animation: rotate 4s linear infinite;
}

.hidden {
  display: none !important;
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

/* ==================== BUTTONS ==================== */
.btn {
  font-family: 'Comfortaa', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 10px rgba(229, 9, 20, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:active {
  background: var(--primary-hover);
  transform: scale(0.95);
}

.btn-secondary {
  background: var(--secondary-bg);
  color: var(--secondary);
  border: 1px solid var(--accent);
}

.btn-secondary:active {
  transform: scale(0.95);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-text {
  background: none;
  border: none;
  color: var(--secondary);
  font-weight: bold;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 8px 16px;
  text-decoration: underline;
}

.btn-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-circle:active {
  transform: scale(0.9);
}

.btn-circle svg {
  width: 20px;
  height: 20px;
}

/* ==================== SCREENS LAYOUT ==================== */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease-in-out;
  z-index: 5;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==================== SCREEN 1: ENVELOPE APOLOGY ==================== */
#envelope-screen {
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.envelope-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
  max-width: 350px;
}

.intro-text {
  text-align: center;
  animation: fadeInDown 0.8s ease;
}

.intro-text h1 {
  font-size: 2.2rem;
  color: var(--secondary);
  margin-bottom: 8px;
}

.intro-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Glow Animation */
.glow-text {
  text-shadow: 0 0 10px rgba(255, 77, 109, 0.3);
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { text-shadow: 0 0 10px rgba(255, 77, 109, 0.2); }
  50% { text-shadow: 0 0 20px rgba(255, 77, 109, 0.6); }
}

/* Envelope Container */
.envelope {
  position: relative;
  width: 280px;
  height: 180px;
  background: #ffb3c1;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  box-shadow: 0 20px 40px rgba(89, 13, 34, 0.15);
  cursor: pointer;
  z-index: 20;
  transition: transform 0.3s ease;
}

.envelope:hover {
  transform: translateY(-5px);
}

/* Envelope Flap */
.envelope::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 90px 140px 0 140px;
  border-color: #ff85a1 transparent transparent transparent;
  transform-origin: top;
  transition: transform 0.4s ease 0.4s, z-index 0.05s ease 0.4s;
  z-index: 25;
}

/* Envelope Pocket */
.envelope::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 90px 140px 90px 140px;
  border-color: transparent #ffccd5 #ffccd5 #ffccd5;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 23;
}

/* Letter inside Envelope */
.letter {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 260px;
  height: 160px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  z-index: 22;
  transition: transform 0.5s ease 0s, height 0.5s ease 0.2s, top 0.5s ease 0s;
  overflow: hidden;
  padding: 15px;
}

.letter-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: flex-start;
  opacity: 0.1;
  transition: opacity 0.3s ease;
}

.handwritten {
  font-family: 'Caveat', cursive;
  font-size: 1.8rem;
  color: var(--secondary);
  margin-bottom: 8px;
}

.letter-body {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #6a1a2f;
  margin-bottom: 12px;
}

.letter-question {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--secondary);
  text-align: center;
  margin-bottom: 15px;
}

.letter-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

.letter-buttons .btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 12px;
}

/* Opened Envelope State */
.envelope.open::before {
  transform: rotateX(180deg);
  z-index: 21;
  border-color: #ffccd5 transparent transparent transparent;
}

.envelope.open .letter {
  top: -150px;
  height: 330px;
  z-index: 24;
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(89, 13, 34, 0.25);
  overflow-y: auto;
}

.envelope.open .letter-content {
  opacity: 1;
}

/* No Button Run Away Teleport Animation Class */
.btn-no-tp {
  position: absolute !important;
  z-index: 1000;
  transition: left 0.2s ease, top 0.2s ease;
}

/* ==================== SCREEN 2: MAIN DASHBOARD ==================== */
#dashboard-screen {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  justify-content: space-between;
}

/* Header */
.app-header {
  padding: calc(var(--safe-top) + 10px) 20px 15px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  z-index: 30;
}

.header-heart {
  font-size: 1.5rem;
  animation: pulse 1.2s infinite ease-in-out;
}

.header-title {
  font-size: 1.2rem;
  color: var(--secondary);
  letter-spacing: 0.5px;
}

.counter-container {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.6);
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
}

.counter-container:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.8);
}

.counter-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.counter-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--secondary);
}

/* Content Area */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.tab-content {
  display: none;
  flex-direction: column;
  flex: 1;
  animation: fadeInUp 0.4s ease forwards;
}

.tab-content.active {
  display: flex;
}

.tab-header {
  text-align: center;
  margin-bottom: 20px;
}

.tab-header h2 {
  font-size: 1.4rem;
  color: var(--secondary);
  margin-bottom: 4px;
}

.tab-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Navigation Bar */
.app-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
  display: flex;
  justify-content: space-around;
  padding: 10px 10px calc(var(--safe-bottom) + 5px) 10px;
  z-index: 30;
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  cursor: pointer;
  flex: 1;
  padding: 6px 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-icon {
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

.nav-label {
  font-size: 0.65rem;
  font-weight: 600;
}

.nav-item.active {
  color: var(--secondary);
  transform: translateY(-4px);
}

.nav-item.active .nav-icon {
  transform: scale(1.2);
}

/* ==================== TAB 1: REASONS & MEMORIES ==================== */
.card-stack-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  position: relative;
  margin-bottom: 10px;
}

.card-stack {
  position: relative;
  width: 280px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Polaroid Card */
.polaroid-card {
  position: absolute;
  width: 270px;
  height: 360px;
  background: white;
  padding: 14px 14px 24px 14px;
  border-radius: 4px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  transform-origin: center center;
  cursor: grab;
  touch-action: none; /* Crucial for swipe gesture handler */
  backface-visibility: hidden;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.polaroid-card:active {
  cursor: grabbing;
}

/* Polaroid Image Area */
.polaroid-image-area {
  width: 100%;
  aspect-ratio: 1;
  background: var(--secondary-bg);
  border: 1px solid rgba(89, 13, 34, 0.05);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  position: relative;
  overflow: hidden;
}

.polaroid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.polaroid-caption {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 15px;
}

.polaroid-caption h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  color: var(--secondary);
  margin-bottom: 6px;
}

.polaroid-caption p {
  font-family: 'Comfortaa', sans-serif;
  font-size: 0.75rem;
  color: #6a1a2f;
  line-height: 1.35;
}

/* Stack styling details */
.polaroid-card.back-card-1 {
  transform: translate3d(0, 8px, -10px) rotate(3deg);
  z-index: 18;
  opacity: 0.9;
}

.polaroid-card.back-card-2 {
  transform: translate3d(0, 16px, -20px) rotate(-2deg);
  z-index: 17;
  opacity: 0.7;
}

.polaroid-card.back-card-3 {
  transform: translate3d(0, 24px, -30px) rotate(1deg);
  z-index: 16;
  opacity: 0.5;
}

.polaroid-card.top-card {
  z-index: 20;
}

.stack-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
  width: 100%;
}

/* ==================== TAB 2: MOOD UPLIFTER GAMES ==================== */
.game-selector {
  display: flex;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
}

.selector-btn {
  flex: 1;
  background: none;
  border: none;
  font-family: 'Comfortaa', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}

.selector-btn.active {
  background: white;
  color: var(--secondary);
  box-shadow: 0 2px 8px rgba(89, 13, 34, 0.05);
}

.game-container {
  display: none;
  flex-direction: column;
  flex: 1;
}

.game-container.active {
  display: flex;
}

/* Game 1: Bubble Pop */
.bubble-game-instructions, .petal-game-instructions {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.bubble-arena {
  flex: 1;
  background: rgba(255, 255, 255, 0.3);
  border: 1px dashed var(--accent);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  min-height: 250px;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 179, 193, 0.4) 60%, rgba(255, 77, 109, 0.6) 100%);
  box-shadow: inset -5px -5px 12px rgba(255, 77, 109, 0.15), 0 5px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.1s ease;
  user-select: none;
  animation: floatBubble var(--duration, 8s) ease-in-out infinite;
}

.bubble::after {
  content: "";
  position: absolute;
  top: 10%;
  left: 15%;
  width: 25%;
  height: 25%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
}

.bubble:active {
  transform: scale(0.85);
}

@keyframes floatBubble {
  0% { transform: translateY(110%) translateX(var(--drift-start, 0px)); }
  50% { transform: translateY(50%) translateX(var(--drift-mid, 20px)); }
  100% { transform: translateY(-20%) translateX(var(--drift-end, -10px)); }
}

.bubble-message-display, .petal-message-display {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary);
  margin-top: 15px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Game 2: Daisy Plucker */
.flower-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
}

.flower {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: slowSpin 30s linear infinite;
}

.flower-center {
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, #ffe15d 0%, #f49d1a 100%);
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.flower-center-text {
  font-size: 0.45rem;
  font-weight: bold;
  color: #8c5700;
  line-height: 1.1;
  pointer-events: none;
}

.petal {
  position: absolute;
  width: 32px;
  height: 70px;
  background: linear-gradient(to top, #ffffff 60%, #fff0f3 100%);
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  border: 1px solid rgba(255, 179, 193, 0.15);
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  transform-origin: center bottom;
  cursor: pointer;
  z-index: 5;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Individual petals rotations */
.petal:nth-child(2) { transform: rotate(0deg) translateY(-25px); }
.petal:nth-child(3) { transform: rotate(45deg) translateY(-25px); }
.petal:nth-child(4) { transform: rotate(90deg) translateY(-25px); }
.petal:nth-child(5) { transform: rotate(135deg) translateY(-25px); }
.petal:nth-child(6) { transform: rotate(180deg) translateY(-25px); }
.petal:nth-child(7) { transform: rotate(225deg) translateY(-25px); }
.petal:nth-child(8) { transform: rotate(270deg) translateY(-25px); }
.petal:nth-child(9) { transform: rotate(315deg) translateY(-25px); }

/* Plucked State */
.petal.plucked {
  opacity: 0;
  pointer-events: none;
  transform: translate(var(--fall-x, 0px), var(--fall-y, 150px)) rotate(var(--fall-rot, 45deg)) scale(0.8) !important;
}

@keyframes slowSpin {
  100% { transform: rotate(360deg); }
}

/* ==================== TAB 3: LOVE COUPONS ==================== */
.coupons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: 20px;
}

/* Coupon Ticket Style */
.coupon-item {
  position: relative;
  background: white;
  border-radius: 12px;
  display: flex;
  height: 110px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid #ffd1dc;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.coupon-item:active {
  transform: scale(0.98);
}

.coupon-left {
  width: 75px;
  background: linear-gradient(135deg, #ff85a1 0%, #ff4d6d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: white;
  position: relative;
}

/* Left coupon round border notch cut */
.coupon-left::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: var(--bg-gradient); /* matches screen background */
  background-attachment: fixed;
  border-radius: 50%;
  z-index: 10;
  box-shadow: inset 1px 0 0 rgba(0,0,0,0.05);
}

.coupon-right {
  flex: 1;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

/* Right coupon round border notch cut */
.coupon-right::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: var(--bg-gradient); /* matches screen background */
  background-attachment: fixed;
  border-radius: 50%;
  z-index: 10;
  box-shadow: inset -1px 0 0 rgba(0,0,0,0.05);
}

/* Ticket dashed punch line */
.coupon-separator {
  position: absolute;
  left: 74px;
  top: 0;
  height: 100%;
  border-left: 2px dashed #ffe5ec;
  z-index: 12;
}

.coupon-title {
  font-size: 0.95rem;
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 2px;
}

.coupon-desc {
  font-size: 0.7rem;
  color: #6a1a2f;
  line-height: 1.3;
}

.coupon-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.coupon-footer .btn {
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 8px;
}

/* Claimed State */
.coupon-item.claimed {
  opacity: 0.7;
}

.coupon-item.claimed .coupon-left {
  background: #ccd9e8;
  color: #7b8c9d;
}

.coupon-item.claimed .coupon-title {
  color: #7b8c9d;
  text-decoration: line-through;
}

/* ==================== TAB 4: SOSComfort / HUG ==================== */
.hug-button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  min-height: 240px;
}

/* Giant Beating Heart Button */
.hug-btn {
  position: relative;
  width: 160px;
  height: 160px;
  background: var(--primary);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 15px 35px rgba(255, 77, 109, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  animation: pulseButton 1.8s infinite ease-in-out;
  transition: all 0.2s ease;
}

.hug-btn:active {
  transform: scale(0.92);
}

.heart-pulse-inner {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.6;
  z-index: 1;
  animation: ringPulse 1.8s infinite ease-in-out;
}

.hug-btn-text {
  font-family: 'Outfit', sans-serif;
  color: white;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  z-index: 2;
  text-align: center;
  text-shadow: 0 2px 4px rgba(89, 13, 34, 0.25);
}

@keyframes pulseButton {
  0%, 100% { transform: scale(1); box-shadow: 0 15px 35px rgba(255, 77, 109, 0.35); }
  50% { transform: scale(1.08); box-shadow: 0 20px 45px rgba(255, 77, 109, 0.45); }
}

@keyframes ringPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

.hug-quote-container {
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hug-message {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--secondary);
  line-height: 1.45;
  min-height: 50px;
}

.hug-subtext {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Glassmorphism utility */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  box-shadow: var(--glass-shadow);
}

/* ==================== MODALS ==================== */
.modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(89, 13, 34, 0.25);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 320px;
  border-radius: 20px;
  padding: 24px;
  z-index: 101;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

/* Coupon design in Modal */
.coupon-ticket {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  border: 2px dashed var(--accent);
  margin-bottom: 20px;
  text-align: center;
}

.ticket-header {
  font-size: 0.65rem;
  font-weight: bold;
  color: var(--secondary);
  letter-spacing: 1px;
  border-bottom: 1px solid #ffe5ec;
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.ticket-body h3 {
  font-size: 1.2rem;
  color: var(--secondary);
  margin-bottom: 8px;
}

.ticket-code {
  font-family: monospace;
  background: var(--secondary-bg);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--secondary);
  display: inline-block;
  margin-bottom: 12px;
}

.ticket-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.ticket-barcode {
  font-family: monospace;
  font-size: 0.8rem;
  color: #7b8c9d;
  letter-spacing: 2px;
}

/* Date picker modal styling */
.date-modal-content {
  text-align: center;
}

.date-modal-content h3 {
  color: var(--secondary);
  margin-bottom: 8px;
}

.date-modal-content p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.4;
}

.date-input {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  font-family: 'Comfortaa', sans-serif;
  color: var(--text-main);
  background: white;
  outline: none;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-actions .btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 12px;
}

/* ==================== CORE KEYFRAME ANIMATIONS ==================== */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
