/* ==========================================================================
   TEACHER'S DAY TRIBUTE - PREMIUM STYLESHEET
   Design Language: Deep Velvet Midnight, Luminous Gold, Warm Heart Crimson
   Typography: Playfair Display, Cinzel, Outfit, Caveat
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #0a0c16;
  --bg-card: rgba(18, 23, 43, 0.75);
  --bg-card-hover: rgba(26, 33, 62, 0.85);
  --bg-glass-border: rgba(245, 158, 11, 0.22);
  --bg-glass-border-subtle: rgba(255, 255, 255, 0.08);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Rich Gold Gradients & Accents */
  --gold-primary: #f59e0b;
  --gold-light: #fde68a;
  --gold-deep: #b45309;
  --gold-gradient: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #d97706 100%);
  --gold-glow: 0 0 25px rgba(245, 158, 11, 0.4);

  /* Rose / Heart Accents */
  --rose-primary: #f43f5e;
  --rose-light: #fda4af;
  --rose-dark: #be123c;
  --rose-gradient: linear-gradient(135deg, #fda4af 0%, #f43f5e 50%, #e11d48 100%);
  --rose-glow: 0 0 25px rgba(244, 63, 94, 0.4);

  /* Parchment Paper Colors */
  --parchment-bg: #fbf7ee;
  --parchment-border: #e6dac6;
  --parchment-text: #29201a;
  --parchment-muted: #5e4d44;

  /* Blackboard Colors */
  --chalkboard-bg: #1b2e23;
  --chalkboard-border: #5c3a21;
  --chalk-white: #ffffff;
  --chalk-yellow: #fef08a;
  --chalk-cyan: #a5f3fc;
  --chalk-pink: #fbcfe8;

  /* Fonts */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-royal: 'Cinzel', 'Playfair Display', serif;
  --font-sans: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-hand: 'Caveat', cursive, sans-serif;

  /* Layout */
  --header-height: 76px;
  --container-max-w: 1240px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  color-scheme: dark;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
  min-height: 100vh;
}

/* Background Ambient Canvases (Zero Overflow) */
#ambient-canvas,
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#confetti-canvas {
  z-index: 9999;
}

/* Typography Helpers */
.text-gold-gradient {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-rose-gradient {
  background: var(--rose-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-center {
  text-align: center;
}

/* Glassmorphism Generic Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

/* Buttons */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all var(--transition-fast);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 28px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0b0f19;
  font-weight: 700;
  font-size: 0.98rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
  text-decoration: none;
  transition: all var(--transition-spring);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.55);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fecdd3;
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: all var(--transition-spring);
}

.btn-secondary:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: var(--rose-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.3);
}

.btn-tertiary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.btn-tertiary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.btn-pill:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--gold-primary);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-text {
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-text:hover {
  text-decoration: underline;
  color: #fff;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 12, 22, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bg-glass-border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.header-container {
  width: 100%;
  max-width: var(--container-max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.logo-icon {
  font-size: 1.7rem;
  animation: pulse-glow 3s infinite ease-in-out;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #fde68a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  color: var(--gold-light);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
}

.sound-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
}

.sound-btn.playing {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--gold-light);
}

.sound-bars {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.sound-btn.playing .sound-bars {
  display: flex;
}

.sound-bars span {
  width: 3px;
  background: var(--gold-light);
  border-radius: 2px;
  animation: soundBar 1s infinite ease-in-out;
}

.sound-bars span:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.sound-bars span:nth-child(2) { height: 90%; animation-delay: 0.3s; }
.sound-bars span:nth-child(3) { height: 60%; animation-delay: 0.2s; }

.celebrate-btn {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}

.celebrate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(244, 63, 94, 0.6);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  padding: calc(var(--header-height) + 50px) 0 80px;
  z-index: 2;
  overflow: hidden;
}

.hero-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-pill);
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}

.badge-sparkle {
  color: var(--gold-primary);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  text-align: center;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 820px;
  margin: 0 auto 32px;
  text-align: center;
}

/* Quote Rotator Card */
.quote-rotator-card {
  position: relative;
  max-width: 680px;
  width: 100%;
  margin: 0 auto 36px;
  padding: 22px 28px 22px 54px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--gold-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  backdrop-filter: blur(10px);
  text-align: left;
}

.quote-symbol {
  position: absolute;
  top: 10px;
  left: 14px;
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--gold-primary);
  opacity: 0.6;
}

.quote-text {
  font-style: italic;
  font-size: 1.05rem;
  color: #f1f5f9;
  line-height: 1.5;
  margin-bottom: 6px;
  transition: opacity 0.4s ease;
}

.quote-author {
  font-size: 0.85rem;
  color: var(--gold-light);
  font-weight: 600;
  text-align: right;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 38px;
  background: rgba(255, 255, 255, 0.1);
}

/* Hero Visual Art Card with 3D Tilt */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-art-card {
  position: relative;
  width: 100%;
  max-width: 490px;
  perspective: 1200px;
}

.art-card-glow {
  position: absolute;
  top: 10%;
  left: 10%;
  right: 10%;
  bottom: 10%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.4) 0%, rgba(244, 63, 94, 0.2) 60%, transparent 80%);
  filter: blur(45px);
  z-index: 0;
}

.art-card-inner {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.65);
  transition: transform 0.2s ease-out;
}

.hero-art-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.hero-art-card:hover .hero-art-img {
  transform: scale(1.04);
}

.art-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 24px 24px;
  background: linear-gradient(to top, rgba(10, 12, 22, 0.95) 0%, rgba(10, 12, 22, 0.6) 60%, transparent 100%);
  z-index: 2;
}

.overlay-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.overlay-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #fff;
  font-weight: 600;
  line-height: 1.4;
}

/* Floating interactive badges on Hero */
.floating-sticker {
  position: absolute;
  z-index: 3;
  padding: 8px 16px;
  background: rgba(18, 23, 43, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-pill);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.sticker-1 { top: -15px; left: 10px; }
.sticker-2 { top: 40%; right: -20px; border-color: rgba(244, 63, 94, 0.5); }
.sticker-3 { bottom: -15px; left: 30px; }

/* ==========================================================================
   COMMON SECTION STYLES
   ========================================================================== */
.section {
  position: relative;
  padding: 100px 0;
  z-index: 2;
}

.section-header {
  max-width: 760px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-pill);
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   FEATURE 1: 3D INTERACTIVE ENVELOPE & LETTER
   ========================================================================== */
.envelope-section {
  background: radial-gradient(circle at 50% 20%, rgba(26, 33, 62, 0.5) 0%, transparent 70%);
}

.envelope-showcase-container {
  max-width: var(--container-max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: start;
}

.envelope-stage {
  position: relative;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 30px;
}

.desk-mat {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 0;
  right: 0;
  background: linear-gradient(145deg, #161a29 0%, #0d101c 100%);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.envelope-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  perspective: 1500px;
  margin: 40px auto 20px;
}

/* The Envelope Container */
.envelope {
  position: relative;
  width: 100%;
  height: 310px;
  background: linear-gradient(135deg, #3d1c24 0%, #200f14 100%);
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(244, 63, 94, 0.3);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Flap at top */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #4d242e 0%, #30141b 100%);
  clip-path: polygon(0 0, 50% 55%, 100% 0);
  transform-origin: top;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), z-index 0.2s 0.3s;
  z-index: 5;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.envelope-pocket {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #36181f 0%, #220e14 100%);
  clip-path: polygon(0 0, 50% 50%, 100% 0, 100% 100%, 0 100%);
  border-radius: 0 0 12px 12px;
  z-index: 4;
}

/* Wax Seal Button in Center */
.wax-seal {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: radial-gradient(circle, #f59e0b 0%, #b45309 80%, #78350f 100%);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  z-index: 6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fde68a;
  transition: transform 0.3s ease, filter 0.3s ease, opacity 0.4s ease;
}

.wax-seal:hover {
  transform: translate(-50%, -50%) scale(1.1);
  filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.8));
}

.seal-ring {
  position: absolute;
  width: 56px;
  height: 56px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  border-radius: 50%;
}

.seal-core {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.seal-icon {
  font-size: 1.1rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.seal-text {
  font-family: var(--font-royal);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
}

/* Unfolding Letter */
.letter-paper {
  position: absolute;
  top: 15px;
  left: 5%;
  width: 90%;
  background: var(--parchment-bg);
  background-image: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 100%);
  color: var(--parchment-text);
  border-radius: 8px;
  padding: 30px 32px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--parchment-border);
  z-index: 3;
  transform: translateY(0);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), z-index 0.2s 0.4s, opacity 0.5s ease;
  opacity: 0.95;
  box-sizing: border-box;
}

.letter-inner {
  position: relative;
}

.letter-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9rem;
  color: rgba(180, 83, 9, 0.04);
  pointer-events: none;
  user-select: none;
}

.letter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(94, 77, 68, 0.2);
  padding-bottom: 12px;
}

.letter-stamp {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-deep);
  border: 1px dashed var(--gold-deep);
  padding: 3px 8px;
  border-radius: 4px;
}

.letter-date {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--parchment-muted);
}

.letter-salutation {
  font-family: var(--font-hand);
  font-size: 1.85rem;
  font-weight: 700;
  color: #1c1410;
  margin-bottom: 16px;
}

.letter-paragraph {
  font-family: var(--font-hand);
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--parchment-text);
  margin-bottom: 14px;
}

.letter-footer {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(94, 77, 68, 0.2);
}

.letter-sign-off {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  color: var(--parchment-muted);
}

.letter-signature {
  font-family: var(--font-hand);
  font-size: 1.95rem;
  font-weight: 700;
  color: #78350f;
  margin: 4px 0;
}

.letter-subject-sub {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--parchment-muted);
  font-weight: 600;
}

/* OPEN STATE OF ENVELOPE */
.envelope.open .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope.open .wax-seal {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -80%) scale(0.6);
}

.envelope.open .letter-paper {
  transform: translateY(-90px) scale(1.04);
  z-index: 10;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.65);
  opacity: 1;
}

.envelope-controls {
  position: relative;
  z-index: 10;
  margin-top: 40px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.envelope.open ~ .envelope-controls {
  opacity: 1;
  pointer-events: auto;
}

/* Letter Editor Form Panel */
.letter-editor-panel {
  padding: 32px;
}

.panel-header {
  margin-bottom: 24px;
}

.panel-header h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 6px;
}

input[type="text"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(10, 12, 22, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
  background: rgba(10, 12, 22, 0.95);
}

select {
  cursor: pointer;
}

select option {
  background: #11162b;
  color: #fff;
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

/* ==========================================================================
   FEATURE 2: DIGITAL CERTIFICATE OF EXCELLENCE
   ========================================================================== */
.certificate-section {
  background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 75%);
}

.certificate-container {
  max-width: var(--container-max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 40px;
  align-items: start;
}

.certificate-wrapper {
  background: #0f1322;
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.certificate-frame {
  background: #faf7f0;
  color: #1e1b18;
  border-radius: 8px;
  padding: 16px;
  box-shadow: inset 0 0 30px rgba(180, 83, 9, 0.1);
  position: relative;
}

.cert-outer-border {
  border: 3px solid #b45309;
  padding: 8px;
}

.cert-inner-border {
  border: 1px solid #d97706;
  padding: 30px 36px;
  position: relative;
  text-align: center;
  background-image: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.04) 0%, transparent 80%);
}

.cert-corner {
  position: absolute;
  font-size: 1.2rem;
  color: #b45309;
  line-height: 1;
}

.cert-corner-tl { top: 6px; left: 6px; }
.cert-corner-tr { top: 6px; right: 6px; }
.cert-corner-bl { bottom: 6px; left: 6px; }
.cert-corner-br { bottom: 6px; right: 6px; }

.cert-ornament {
  color: #b45309;
  letter-spacing: 0.3em;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.cert-sup-title {
  font-family: var(--font-royal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #78350f;
  margin-bottom: 6px;
}

.cert-main-title {
  font-family: var(--font-royal);
  font-size: 1.7rem;
  font-weight: 900;
  color: #1c1917;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.cert-ribbon-sub {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #b45309;
  margin-bottom: 24px;
}

.cert-present-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: #57534e;
  margin-bottom: 12px;
}

.cert-teacher-name {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 800;
  color: #b45309;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  line-height: 1.2;
}

.cert-divider-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #d97706;
  margin: 14px 0 20px;
}

.cert-star {
  font-size: 0.8rem;
}

.cert-star.center-star {
  font-size: 1.2rem;
}

.cert-citation {
  font-family: Georgia, serif;
  font-size: 0.98rem;
  line-height: 1.65;
  color: #292524;
  max-width: 580px;
  margin: 0 auto 24px;
  font-style: italic;
}

.cert-honor-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #d97706;
  padding: 6px 20px;
  border-radius: var(--radius-pill);
  margin-bottom: 30px;
}

.cert-honor-badge .badge-title {
  font-family: var(--font-royal);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #78350f;
}

.cert-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-end;
  gap: 20px;
  padding-top: 16px;
}

.cert-sign-col {
  text-align: center;
}

.cert-signature-line {
  font-family: var(--font-hand);
  font-size: 1.45rem;
  font-weight: 700;
  color: #1c1917;
  border-bottom: 1px solid #a8a29e;
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.cert-sign-title {
  font-size: 0.72rem;
  color: #78716c;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.cert-seal-col {
  display: flex;
  justify-content: center;
}

.cert-real-seal {
  width: 95px;
  height: 95px;
  position: relative;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.cert-seal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.certificate-controls {
  padding: 32px;
}

.certificate-controls h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.certificate-controls p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.cert-btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

/* ==========================================================================
   FEATURE 3: VIRTUAL BOUQUET & GIFT BUILDER
   ========================================================================== */
.bouquet-section {
  background: radial-gradient(circle at 50% 60%, rgba(244, 63, 94, 0.08) 0%, transparent 70%);
}

.bouquet-app-grid {
  max-width: var(--container-max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: stretch;
}

.gift-pedestal-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pedestal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.pedestal-header h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: #fff;
}

.item-count-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-pill);
  color: var(--gold-light);
}

.pedestal-stage {
  position: relative;
  min-height: 290px;
  background: radial-gradient(circle at 50% 50%, rgba(244, 63, 94, 0.12) 0%, rgba(10, 12, 22, 0.8) 80%);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.pedestal-glow {
  position: absolute;
  width: 180px;
  height: 60px;
  bottom: 20px;
  background: radial-gradient(ellipse, rgba(245, 158, 11, 0.5) 0%, transparent 70%);
  filter: blur(20px);
}

.gift-basket-container {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty-basket-msg {
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 8px;
  opacity: 0.7;
}

.active-gift-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.tray-token {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.tray-token .token-remove {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-left: 4px;
  line-height: 1;
}

.tray-token .token-remove:hover {
  color: var(--rose-primary);
}

.pedestal-footer {
  margin-top: 24px;
}

.bouquet-message-tag {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  text-align: center;
  color: var(--gold-light);
  margin-bottom: 18px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
}

.basket-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.gift-catalog-card {
  padding: 32px;
}

.gift-catalog-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 4px;
}

.catalog-hint {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.catalog-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(10, 12, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.catalog-item:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}

.item-emoji {
  font-size: 1.8rem;
}

.item-info {
  flex: 1;
}

.item-info h4 {
  font-size: 0.92rem;
  color: #fff;
  margin-bottom: 2px;
}

.item-info p {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.add-token-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold-light);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 1.1rem;
}

.catalog-item:hover .add-token-btn {
  background: var(--gold-primary);
  color: #0b0f19;
}

/* ==========================================================================
   FEATURE 4: VINTAGE CLASSROOM CHALKBOARD
   ========================================================================== */
.chalkboard-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

.chalkboard-frame {
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
  border-radius: 12px;
  overflow: hidden;
}

.chalkboard-wood-border {
  background: #3e2716;
  border: 14px solid #5a381e;
  border-radius: 10px;
  padding: 8px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.chalkboard-slate {
  position: relative;
  height: 480px;
  background-color: var(--chalkboard-bg);
  background-image: 
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.4) 0%, transparent 70%);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 45px rgba(0, 0, 0, 0.65);
  cursor: crosshair;
}

#chalk-draw-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.chalk-overlay-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.chalk-pinned-note {
  position: absolute;
  user-select: none;
}

.chalk-text {
  font-family: var(--font-hand);
  font-size: 1.6rem;
  letter-spacing: 0.03em;
  opacity: 0.88;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.white-chalk { color: var(--chalk-white); }
.yellow-chalk { color: var(--chalk-yellow); }
.cyan-chalk { color: var(--chalk-cyan); }
.pink-chalk { color: var(--chalk-pink); }

.chalk-tray {
  margin-top: 10px;
  background: #4a2e19;
  border-top: 3px solid #2e1a0d;
  padding: 12px 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.tray-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tray-label {
  font-size: 0.85rem;
  color: #d1b89d;
  font-weight: 600;
}

.chalk-stick {
  width: 36px;
  height: 14px;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chalk-stick.color-white { background: #fff; }
.chalk-stick.color-yellow { background: #fef08a; }
.chalk-stick.color-cyan { background: #a5f3fc; }
.chalk-stick.color-pink { background: #fbcfe8; }

.chalk-stick.active {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 0 10px #fff;
  border: 1px solid #000;
}

.tray-btn {
  background: #311c0f;
  color: #d7c2a7;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid #633e21;
}

.tray-btn:hover {
  background: #502e19;
  color: #fff;
}

/* ==========================================================================
   FEATURE 5: HALL OF MENTORS (GRATITUDE WALL)
   ========================================================================== */
.wall-section {
  background: radial-gradient(circle at 50% 10%, rgba(26, 33, 62, 0.6) 0%, transparent 80%);
}

.wall-controls-bar {
  max-width: var(--container-max-w);
  margin: 0 auto 36px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.filter-pill:hover,
.filter-pill.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

.mentors-grid {
  max-width: var(--container-max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 28px;
}

.mentor-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.mentor-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mentor-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
}

.mentor-card:hover::before {
  opacity: 1;
}

/* Special Spotlight Card for Sir Baqir (Ideal & Greatest Teacher) */
.mentor-card.ideal-mentor {
  background: linear-gradient(135deg, rgba(38, 28, 12, 0.85) 0%, rgba(20, 16, 32, 0.9) 100%);
  border: 2px solid var(--gold-primary);
  box-shadow: 0 10px 35px rgba(245, 158, 11, 0.25), inset 0 0 25px rgba(245, 158, 11, 0.1);
  grid-column: 1 / -1; /* spans full width on desktops for spotlight grandeur */
}

.mentor-card.ideal-mentor::before {
  opacity: 1;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #fde68a, #f43f5e, #f59e0b);
  animation: shineBorder 3s infinite linear;
}

.mentor-card.ideal-mentor .mentor-avatar {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  font-size: 2.2rem;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
  border: 2px solid #fff;
}

.mentor-card.ideal-mentor .mentor-meta h3 {
  font-size: 1.6rem;
  color: #fef08a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mentor-card.ideal-mentor .mentor-quote {
  font-size: 1.55rem;
  color: #fff;
  border-left: 3px solid var(--gold-primary);
  padding-left: 16px;
  margin: 12px 0 20px;
}

/* Humble tribute notice box */
.humble-tribute-notice {
  max-width: var(--container-max-w);
  margin: 36px auto 0;
  padding: 24px 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(18, 23, 43, 0.7);
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
}

.humble-tribute-notice .notice-icon {
  font-size: 2.4rem;
  opacity: 0.9;
}

.humble-tribute-notice .notice-text h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.humble-tribute-notice .notice-text p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@keyframes shineBorder {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.mentor-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.mentor-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(244, 63, 94, 0.3) 100%);
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.mentor-meta h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 2px;
}

.mentor-role {
  font-size: 0.82rem;
  color: var(--gold-light);
  font-weight: 600;
}

.mentor-subject-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mentor-quote {
  font-family: var(--font-hand);
  font-size: 1.35rem;
  line-height: 1.5;
  color: #e2e8f0;
  margin-bottom: 20px;
  min-height: 70px;
}

.mentor-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mentor-tag-pill {
  font-size: 0.78rem;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}

.send-heart-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-pill);
  color: #fda4af;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.send-heart-btn:hover {
  background: rgba(244, 63, 94, 0.35);
  transform: scale(1.08);
  color: #fff;
}

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

/* ==========================================================================
   FEATURE 6: THE GRATITUDE STAR JAR
   ========================================================================== */
.jar-section {
  background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
}

.jar-display-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: center;
}

.jar-card {
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.jar-wrapper {
  position: relative;
  width: 170px;
  height: 230px;
  margin-bottom: 24px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.jar-wrapper:hover {
  transform: scale(1.06);
}

.jar-wrapper.shake {
  animation: jarShake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.jar-aura {
  position: absolute;
  top: 20%;
  left: 10%;
  right: 10%;
  bottom: 10%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.5) 0%, rgba(244, 63, 94, 0.3) 60%, transparent 80%);
  filter: blur(25px);
  z-index: 0;
}

.glass-jar {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.jar-lid {
  width: 110px;
  height: 22px;
  background: linear-gradient(180deg, #d97706 0%, #78350f 100%);
  border-radius: 8px 8px 3px 3px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  border: 1px solid #fde68a;
}

.jar-neck {
  width: 90px;
  height: 12px;
  background: rgba(255, 255, 255, 0.18);
  border-left: 2px solid rgba(255, 255, 255, 0.4);
  border-right: 2px solid rgba(255, 255, 255, 0.4);
}

.jar-body {
  width: 150px;
  height: 190px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px 20px 35px 35px;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 20px rgba(245, 158, 11, 0.3), 0 15px 35px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.jar-stars-inside {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.star-particle {
  position: absolute;
  font-size: 1.4rem;
  animation: floatOrb 3s infinite ease-in-out alternate;
}

.star-particle.s1 { top: 30%; left: 20%; animation-delay: 0.1s; }
.star-particle.s2 { top: 60%; left: 35%; animation-delay: 0.5s; font-size: 1.8rem; }
.star-particle.s3 { top: 40%; right: 25%; animation-delay: 0.3s; }
.star-particle.s4 { bottom: 20%; left: 30%; animation-delay: 0.8s; }
.star-particle.s5 { bottom: 25%; right: 25%; animation-delay: 0.2s; font-size: 1.6rem; }
.star-particle.s6 { top: 20%; right: 35%; animation-delay: 0.6s; }

.jar-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.jar-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.star-revelation-card {
  padding: 40px;
  position: relative;
  border-color: rgba(245, 158, 11, 0.4);
}

.star-reveal-sparkle {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 1.8rem;
  color: var(--gold-primary);
  animation: spinSlow 12s linear infinite;
}

.star-tag {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.star-quote {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 18px;
  font-style: italic;
}

.star-author {
  font-size: 0.95rem;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 28px;
}

.star-actions {
  display: flex;
  gap: 12px;
}

/* ==========================================================================
   GRAND FINALE & FOOTER
   ========================================================================== */
.grand-finale-section {
  padding: 60px 0 100px;
  z-index: 2;
  position: relative;
}

.finale-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 40px;
  background: linear-gradient(135deg, rgba(26, 33, 62, 0.85) 0%, rgba(18, 23, 43, 0.9) 100%);
  border: 1px solid var(--bg-glass-border);
}

.finale-badge {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 18px;
}

.finale-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 18px;
}

.finale-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
}

.finale-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.app-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 0;
  background: #070911;
  position: relative;
  z-index: 2;
}

.footer-container {
  max-width: var(--container-max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  max-width: 550px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 6px;
}

.footer-left p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.back-to-top {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
}

.back-to-top:hover {
  color: #fff;
  border-color: var(--gold-primary);
}

/* ==========================================================================
   MODAL DIALOG
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

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

.modal-dialog {
  width: 100%;
  max-width: 580px;
  padding: 32px;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-spring);
}

.modal-backdrop.active .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close-btn {
  font-size: 1.8rem;
  color: var(--text-muted);
  line-height: 1;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 24px;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(18, 23, 43, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideToast 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Floating Heart Animation in Mentors Wall */
.flying-heart {
  position: fixed;
  font-size: 1.8rem;
  pointer-events: none;
  z-index: 4000;
  animation: flyUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.9)); }
}

@keyframes soundBar {
  0%, 100% { height: 30%; }
  50% { height: 95%; }
}

@keyframes animate-float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

@keyframes jarShake {
  10%, 90% { transform: translate3d(-2px, 0, 0) rotate(-2deg); }
  20%, 80% { transform: translate3d(4px, 0, 0) rotate(3deg); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0) rotate(-4deg); }
  40%, 60% { transform: translate3d(6px, 0, 0) rotate(4deg); }
}

@keyframes floatOrb {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-12px) scale(1.1); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes slideToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes flyUp {
  0% { transform: translate(0, 0) scale(0.8); opacity: 1; }
  50% { transform: translate(-10px, -60px) scale(1.3); opacity: 0.9; }
  100% { transform: translate(15px, -140px) scale(1.6); opacity: 0; }
}

/* ==========================================================================
   PRINT MEDIA STYLES
   ========================================================================== */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .app-header,
  .hero-section,
  .bouquet-section,
  .chalkboard-section,
  .wall-section,
  .jar-section,
  .grand-finale-section,
  .app-footer,
  .envelope-controls,
  .letter-editor-panel,
  .certificate-controls,
  #ambient-canvas,
  #confetti-canvas {
    display: none !important;
  }

  .section {
    padding: 0 !important;
  }

  /* Optimize Certificate for Landscape Printing */
  .certificate-section {
    display: block !important;
  }

  .certificate-container {
    display: block !important;
  }

  .certificate-wrapper {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  .certificate-frame {
    box-shadow: none !important;
    border: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 1024px) {
  .envelope-showcase-container,
  .certificate-container,
  .bouquet-app-grid,
  .jar-display-container {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 768px) {
  /* Navigation & Header */
  .app-header {
    height: 64px;
  }

  :root {
    --header-height: 64px;
  }

  .header-container {
    padding: 0 16px;
    gap: 10px;
  }

  .logo-title {
    font-size: 1.02rem;
  }

  .logo-subtitle {
    font-size: 0.62rem;
    letter-spacing: 0.05em;
  }

  .header-actions {
    gap: 8px;
  }

  .sound-btn .sound-text {
    display: none;
  }

  .sound-btn {
    padding: 8px 10px;
  }

  .celebrate-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  /* Section Padding */
  .section {
    padding: 56px 0;
  }

  .section-header {
    margin-bottom: 32px;
    padding: 0 16px;
  }

  .section-title {
    font-size: clamp(1.65rem, 6.5vw, 2.2rem);
  }

  .section-subtitle {
    font-size: 0.94rem;
  }

  /* Hero Section */
  .hero-section {
    padding: calc(var(--header-height) + 24px) 0 44px;
  }

  .hero-container {
    padding: 0 16px;
  }

  .hero-badge {
    font-size: 0.76rem;
    padding: 6px 14px;
    margin-bottom: 16px;
  }

  .hero-title {
    font-size: clamp(1.85rem, 7vw, 2.5rem);
    line-height: 1.18;
    margin-bottom: 16px;
  }

  .hero-subtitle {
    font-size: 0.98rem;
    line-height: 1.65;
    margin-bottom: 24px;
    padding: 0 4px;
  }

  .quote-rotator-card {
    padding: 16px 18px 16px 42px;
    margin-bottom: 28px;
  }

  .quote-symbol {
    font-size: 2.2rem;
    top: 6px;
    left: 10px;
  }

  .quote-text {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 12px;
    margin-bottom: 30px;
  }

  .hero-cta-group .btn-primary,
  .hero-cta-group .btn-secondary,
  .hero-cta-group .btn-tertiary {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
    font-size: 0.92rem;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding-top: 18px;
    width: 100%;
    text-align: center;
  }

  .hero-stats .stat-divider {
    display: none;
  }

  .stat-number {
    font-size: 1.25rem;
    word-break: break-word;
  }

  .stat-label {
    font-size: 0.65rem;
    letter-spacing: 0.04em;
  }

  /* Mentors Wall */
  .wall-controls-bar {
    padding: 0 16px;
    margin-bottom: 20px;
  }

  .filter-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .filter-pill {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  .mentors-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 0 16px;
  }

  .mentor-card {
    padding: 20px 18px;
  }

  .mentor-card.ideal-mentor {
    padding: 22px 18px;
  }

  .mentor-card.ideal-mentor .mentor-avatar {
    width: 54px;
    height: 54px;
    font-size: 1.7rem;
  }

  .mentor-card.ideal-mentor .mentor-meta h3 {
    font-size: 1.25rem;
    flex-wrap: wrap;
  }

  .mentor-card.ideal-mentor .mentor-quote {
    font-size: 1.1rem;
    line-height: 1.5;
    padding-left: 12px;
    margin: 10px 0 16px;
  }

  .mentor-quote {
    font-size: 1rem;
  }

  .humble-tribute-notice {
    margin: 24px 16px 0;
    padding: 18px 16px;
  }

  /* Envelope & Letter to Sir Baqir */
  .envelope-showcase-container {
    padding: 0 16px;
  }

  .envelope-wrapper {
    margin: 16px auto 20px;
    max-width: 100%;
  }

  .envelope {
    height: 250px;
  }

  .envelope.open {
    height: auto;
    min-height: 520px;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .envelope.open .envelope-flap,
  .envelope.open .envelope-pocket {
    display: none;
  }

  .envelope.open .letter-paper {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    transform: none !important;
    padding: 22px 18px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }

  .letter-paper {
    padding: 22px 18px;
  }

  .letter-watermark {
    font-size: 5rem;
  }

  .letter-paragraph {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 12px;
  }

  .letter-footer {
    padding-top: 14px;
  }

  .letter-signature {
    font-size: 1.6rem;
  }

  .envelope-controls {
    margin-top: 20px;
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .envelope-controls .btn-pill {
    width: 100%;
    justify-content: center;
  }

  .letter-editor-panel {
    padding: 22px 18px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Certificate Generator */
  .certificate-container {
    padding: 0 16px;
  }

  .certificate-wrapper {
    padding: 10px;
    border-radius: var(--radius-md);
  }

  .certificate-frame {
    padding: 8px;
  }

  .cert-outer-border {
    padding: 4px;
    border-width: 2px;
  }

  .cert-inner-border {
    padding: 20px 12px;
  }

  .cert-ornament {
    font-size: 0.72rem;
    letter-spacing: 0.15em;
  }

  .cert-sup-title {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
  }

  .cert-main-title {
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    line-height: 1.3;
    margin-bottom: 4px;
  }

  .cert-ribbon-sub {
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
  }

  .cert-present-text {
    font-size: 0.85rem;
    margin-bottom: 8px;
  }

  .cert-teacher-name {
    font-size: 1.65rem;
    margin-bottom: 8px;
    word-break: break-word;
  }

  .cert-citation {
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 16px;
  }

  .cert-honor-badge {
    padding: 5px 12px;
    margin-bottom: 20px;
  }

  .cert-honor-badge .badge-title {
    font-size: 0.74rem;
    letter-spacing: 0.04em;
  }

  .cert-footer {
    grid-template-columns: 1fr;
    gap: 14px;
    text-align: center;
  }

  .cert-real-seal {
    width: 65px;
    height: 65px;
    margin: 4px auto;
  }

  .cert-signature-line {
    font-size: 1.3rem;
  }

  .certificate-controls {
    padding: 22px 18px;
  }

  .cert-action-btns {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .cert-action-btns button {
    width: 100%;
    justify-content: center;
  }

  /* Gratitude Bouquet Builder */
  .bouquet-app-grid {
    padding: 0 16px;
  }

  .gift-pedestal-card,
  .gift-catalog-card {
    padding: 20px 16px;
  }

  .pedestal-stage {
    min-height: 220px;
    padding: 16px;
  }

  .pedestal-glow {
    width: 120px;
    height: 40px;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .catalog-item {
    padding: 12px 14px;
  }

  .basket-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .basket-actions button {
    width: 100%;
    justify-content: center;
  }

  /* Vintage Chalkboard */
  .chalkboard-container {
    padding: 0 16px;
  }

  .chalkboard-wood-border {
    border-width: 8px;
    padding: 4px;
  }

  .chalkboard-slate {
    height: 330px;
    touch-action: none;
  }

  .chalk-text {
    font-size: 1.2rem;
  }

  .chalk-tray {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }

  .tray-section {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .tray-label {
    width: 100%;
    text-align: center;
    margin-bottom: 2px;
  }

  .chalk-actions {
    justify-content: center;
    width: 100%;
  }

  .chalk-actions .tray-btn {
    flex: 1;
    justify-content: center;
  }

  /* Mystical Star Jar */
  .jar-display-container {
    padding: 0 16px;
  }

  .jar-card {
    padding: 24px 16px;
  }

  .jar-wrapper {
    width: 150px;
    height: 200px;
  }

  .jar-body {
    width: 130px;
    height: 165px;
  }

  .star-revelation-card {
    padding: 24px 18px;
  }

  .star-quote {
    font-size: 1.15rem;
    line-height: 1.5;
  }

  .star-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .star-actions button {
    width: 100%;
    justify-content: center;
  }

  /* Grand Finale & Footer */
  .finale-container {
    padding: 30px 18px;
    margin: 0 16px;
  }

  .finale-title {
    font-size: 1.35rem;
    line-height: 1.35;
  }

  .finale-subtitle {
    font-size: 0.92rem;
  }

  .finale-btns {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .finale-btns button,
  .finale-btns a {
    width: 100%;
    justify-content: center;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 0 16px;
  }

  .toast-container {
    right: 14px;
    left: 14px;
    bottom: 16px;
    align-items: center;
  }

  .toast {
    width: 100%;
    max-width: 360px;
    font-size: 0.85rem;
  }

  .modal-dialog {
    padding: 22px 18px;
    margin: 14px;
  }

  .modal-footer {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .modal-footer button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-badge {
    font-size: 0.72rem;
  }

  .stat-number {
    font-size: 1.1rem;
  }

  .chalkboard-slate {
    height: 290px;
  }

  .cert-teacher-name {
    font-size: 1.45rem;
  }

  .cert-main-title {
    font-size: 1.02rem;
  }
}
