/* ====================================================================
   🌸 RIYAA'S COLLEGE SURPRISE GUIDE - OPTIMIZED DESIGN SYSTEM 🌸
   ==================================================================== */

:root {
  --primary-pink: #ff6b8b;
  --secondary-pink: #ff8e9e;
  --accent-lavender: #9c27b0;
  --soft-lavender: #f3e5f5;
  --warm-peach: #ffe0b2;
  --text-dark: #2c1820;
  --text-muted: #6a4f5c;
  
  /* High Performance Crisp Cards (No Heavy Backdrop Blur Lag) */
  --glass-bg: rgba(255, 255, 255, 0.94);
  --glass-border: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 8px 20px rgba(255, 107, 139, 0.08), 0 2px 6px rgba(0, 0, 0, 0.02);
  --card-radius: 20px;
  --transition-smooth: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-handwriting: 'Caveat', cursive;
}

[data-theme="dark"] {
  --text-dark: #f8f0f4;
  --text-muted: #d0b8c6;
  --glass-bg: rgba(35, 22, 32, 0.94);
  --glass-border: rgba(255, 140, 170, 0.25);
  --glass-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: #fff0f5;
  background: linear-gradient(135deg, #fff0f5 0%, #f5eef8 50%, #fff0f3 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Lightweight Canvas Background */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* Main Container Layout */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1050px;
  margin: 0 auto;
  padding: 16px 16px 60px 16px;
}

/* Floating Navigation Header */
.top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 12px 20px;
  border-radius: 40px;
  box-shadow: var(--glass-shadow);
  margin-bottom: 25px;
  position: sticky;
  top: 12px;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-pink);
}

.nav-brand .sparkle {
  animation: pulseSparkle 2s infinite ease-in-out;
}

.nav-actions {
  display: flex;
  gap: 10px;
}

.btn-icon {
  background: white;
  border: 1px solid var(--glass-border);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-icon:hover {
  transform: scale(1.1);
  background: var(--primary-pink);
  color: white;
}

.btn-hug {
  background: linear-gradient(135deg, var(--primary-pink), var(--secondary-pink));
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(255, 107, 139, 0.3);
  transition: var(--transition-smooth);
}

.btn-hug:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 139, 0.4);
}

/* Glass Card Component (Optimized) */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: 28px;
  box-shadow: var(--glass-shadow);
  margin-bottom: 30px;
  contain: content;
}

/* Section Header Styles */
.section-header {
  text-align: center;
  margin-bottom: 24px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

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

/* Hero Banner Section */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 25px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 107, 139, 0.1);
  color: var(--primary-pink);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1.25;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.letter-box {
  background: rgba(255, 255, 255, 0.85);
  border-left: 4px solid var(--primary-pink);
  padding: 18px;
  border-radius: 12px;
  margin-top: 15px;
}

.letter-box h3 {
  font-family: var(--font-handwriting);
  font-size: 1.7rem;
  color: var(--primary-pink);
  margin-bottom: 6px;
}

.letter-body {
  font-family: var(--font-handwriting);
  font-size: 1.35rem;
  line-height: 1.4;
  color: var(--text-dark);
  white-space: pre-line;
}

.hero-img-card {
  position: relative;
  text-align: center;
}

.hero-img-card img {
  width: 100%;
  max-width: 340px;
  max-height: 460px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(255, 107, 139, 0.15);
}

.floating-heart-tag {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-family: var(--font-handwriting);
  font-size: 1.3rem;
  color: var(--primary-pink);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

/* Quick Navigation Pills */
.quick-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.quick-pill {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: var(--transition-smooth);
}

.quick-pill:hover {
  background: var(--primary-pink);
  color: white;
  transform: translateY(-2px);
}

/* Survival Kit Checklist */
.checklist-progress-container {
  margin-bottom: 20px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--primary-pink);
}

.progress-bar-bg {
  height: 10px;
  background: rgba(255, 107, 139, 0.12);
  border-radius: 8px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--secondary-pink), var(--primary-pink));
  border-radius: 8px;
  transition: width 0.3s ease;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.checklist-item {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 14px 18px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
}

.checklist-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.checklist-item.checked {
  background: #e0f2f1;
  border-color: #80cbd4;
}

.checklist-item.checked .item-title {
  text-decoration: line-through;
  color: #00695c;
}

.checkbox-custom {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--secondary-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: white;
}

.checklist-item.checked .checkbox-custom {
  background: #26a69a;
  border-color: #26a69a;
}

.item-icon {
  font-size: 1.6rem;
}

.item-details .item-title {
  font-weight: 700;
  font-size: 1rem;
}

.item-details .item-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.completion-banner {
  display: none;
  background: #e8f5e9;
  border: 1px solid #81c784;
  padding: 16px;
  border-radius: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: #2e7d32;
  margin-top: 20px;
}

/* Schedule Timeline */
.timeline-container {
  position: relative;
  padding-left: 28px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--primary-pink);
  opacity: 0.4;
}

.timeline-card {
  position: relative;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  transition: var(--transition-smooth);
}

.timeline-card:hover {
  transform: translateX(4px);
}

.timeline-dot {
  position: absolute;
  left: -34px;
  top: 16px;
  width: 28px;
  height: 28px;
  background: white;
  border: 2px solid var(--primary-pink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.timeline-time {
  font-weight: 800;
  color: var(--primary-pink);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Pro-Tips Category Section */
.tips-categories {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  background: white;
  border: 1px solid var(--glass-border);
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn.active, .tab-btn:hover {
  background: var(--accent-lavender);
  color: white;
  border-color: var(--accent-lavender);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.tip-card {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  padding: 18px;
  transition: var(--transition-smooth);
}

.tip-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.04);
}

.tip-card h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--accent-lavender);
}

.tip-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* "Open When..." Envelope Cards */
.open-when-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.flip-card {
  background-color: transparent;
  height: 210px;
  perspective: 1000px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

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

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
}

.flip-card-front {
  background: white;
  color: var(--text-dark);
  box-shadow: var(--glass-shadow);
}

.envelope-seal {
  width: 44px;
  height: 44px;
  background: var(--primary-pink);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.open-badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--primary-pink);
  margin-bottom: 4px;
}

.flip-card-front h4 {
  font-size: 1.05rem;
}

.flip-card-back {
  background: white;
  color: var(--text-dark);
  transform: rotateY(180deg);
  overflow-y: auto;
  text-align: left;
  justify-content: flex-start;
  box-shadow: var(--glass-shadow);
}

.flip-card-back h4 {
  font-family: var(--font-handwriting);
  font-size: 1.5rem;
  color: var(--primary-pink);
  margin-bottom: 8px;
}

.flip-card-back p {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text-muted);
}

/* Reasons Cards Grid */
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.reason-card {
  background: white;
  border: 1px solid rgba(0,0,0,0.05);
  padding: 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

.reason-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(255, 107, 139, 0.12);
}

.reason-num {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary-pink);
  min-width: 28px;
  height: 28px;
  background: rgba(255, 107, 139, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reason-text {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Scratch Card Feature */
.scratch-card-wrapper {
  text-align: center;
  max-width: 450px;
  margin: 0 auto;
}

.scratch-canvas-container {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 180px;
  margin: 16px auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border: 2px solid white;
}

.scratch-prize-reveal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff8e1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #e65100;
}

.scratch-prize-reveal h4 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.scratch-prize-reveal p {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.coupon-code {
  background: white;
  padding: 5px 14px;
  border-radius: 16px;
  font-family: monospace;
  font-weight: 800;
  color: var(--primary-pink);
  border: 2px dashed var(--primary-pink);
}

#scratch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Photo Memories Grid */
.memories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  justify-items: center;
}

.polaroid-card {
  background: white;
  padding: 12px 12px 20px 12px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: var(--transition-smooth);
  max-width: 250px;
}

.polaroid-card:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.polaroid-img-wrapper {
  width: 100%;
  height: 190px;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 12px;
}

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

.polaroid-caption {
  font-family: var(--font-handwriting);
  font-size: 1.35rem;
  color: var(--text-dark);
  text-align: center;
}

.polaroid-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
}

/* Hug Toast Notification Modal */
.hug-toast {
  position: fixed;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-pink);
  color: white;
  padding: 12px 24px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 10px 25px rgba(255, 107, 139, 0.4);
  z-index: 1000;
  transition: bottom 0.4s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hug-toast.show {
  bottom: 25px;
}

/* Footer Section */
footer {
  text-align: center;
  padding: 20px 0 10px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer .heart {
  color: var(--primary-pink);
}

@keyframes pulseSparkle {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-title {
    font-size: 2rem;
  }

  .glass-card {
    padding: 20px;
  }

  .quick-pill {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
}
