/* ==========================================================================
   PRIVATE BIRTHDAY EXPERIENCE - STYLESHEET
   Deep Purple Glassmorphism Design System
   ========================================================================== */

/* --- Custom CSS Variables --- */
:root {
  --bg-deep: #07030e;
  --bg-mid: #120722;
  --bg-card: rgba(22, 10, 42, 0.65);
  --bg-card-hover: rgba(32, 14, 60, 0.75);
  
  --purple-glow: #a855f7;
  --purple-light: #c084fc;
  --purple-dark: #6b21a8;
  --purple-accent: #e879f9;
  --pink-accent: #f43f5e;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --border-glass: rgba(168, 85, 247, 0.25);
  --border-focus: rgba(192, 132, 252, 0.8);
  --border-error: rgba(239, 68, 68, 0.8);
  
  --error-bg: rgba(239, 68, 68, 0.12);
  --error-border: rgba(239, 68, 68, 0.4);
  --error-glow: rgba(239, 68, 68, 0.3);
  
  --font-heading: 'Cinzel', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Background Canvas & Ambient Orbs --- */
#particle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

#bg-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  animation: pulseOrb 10s ease-in-out infinite alternate;
}

.orb-primary {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--purple-glow) 0%, rgba(107, 33, 168, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.orb-secondary {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--purple-accent) 0%, rgba(232, 121, 249, 0) 70%);
  bottom: 10%;
  right: 10%;
  animation-delay: -5s;
}

@keyframes pulseOrb {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.4; }
  100% { transform: translate(-50%, -50%) scale(1.25); opacity: 0.65; }
}

/* --- App Container & Screen Views --- */
#app {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.screen {
  width: 100%;
  min-height: 100vh;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.portal-active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}

.protected-hidden {
  display: none !important;
  opacity: 0;
  transform: scale(0.98);
}

.protected-active {
  display: block !important;
  opacity: 1;
  transform: scale(1);
}

/* ==========================================================================
   STAGE 1: PROTECTED ACCESS PORTAL DESIGN
   ========================================================================== */

.login-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(168, 85, 247, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0) 50%
  );
  pointer-events: none;
}

.card-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.portal-logo-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px;
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4), 0 0 20px rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

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

.header-logo-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(232, 121, 249, 0.5);
}

.badge-container {
  margin-bottom: 0.25rem;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 100px;
  font-size: 0.725rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--purple-light);
  text-transform: uppercase;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--purple-light);
  box-shadow: 0 0 8px var(--purple-light);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; transform: scale(1.2); }
}

.portal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(192, 132, 252, 0.3);
}

.portal-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 400;
  max-width: 320px;
}

/* --- Inline Error Banner --- */
.error-banner {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  box-shadow: 0 0 20px var(--error-glow);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: fadeIn 0.3s ease;
}

.error-banner.hidden {
  display: none !important;
}

.error-icon {
  color: var(--pink-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.error-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.error-heading {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fca5a5;
  text-transform: uppercase;
}

.error-message {
  font-size: 0.825rem;
  color: #f8fafc;
}

/* --- Incorrect Login Shake --- */
.card-shake {
  animation: shakeGlow 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeGlow {
  0% {
    transform: translate3d(0, 0, 0);
    border-color: var(--border-error);
    box-shadow: 0 0 30px var(--error-glow);
  }
  15%, 45%, 75% {
    transform: translate3d(-8px, 0, 0);
    border-color: var(--border-error);
    box-shadow: 0 0 35px var(--error-glow);
  }
  30%, 60%, 90% {
    transform: translate3d(8px, 0, 0);
    border-color: var(--border-error);
    box-shadow: 0 0 35px var(--error-glow);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* --- Input Fields Styling --- */
#auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.input-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(10, 5, 20, 0.6);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.input-wrapper:focus-within {
  border-color: var(--purple-light);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
  background: rgba(15, 8, 30, 0.8);
}

.field-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--purple-light);
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 0.85rem 0.85rem 0.85rem 2.6rem;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  border-radius: var(--radius-md);
}

.password-wrapper input {
  padding-right: 2.75rem;
}

.input-wrapper input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.toggle-password-btn {
  position: absolute;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.toggle-password-btn:hover {
  color: var(--purple-light);
}

.toggle-password-btn:focus-visible {
  outline: 2px solid var(--purple-light);
  outline-offset: 1px;
}

/* --- ENTER Button Styling --- */
.enter-btn {
  position: relative;
  width: 100%;
  padding: 0.95rem;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #d946ef 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 
    0 10px 25px rgba(168, 85, 247, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.enter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 14px 30px rgba(168, 85, 247, 0.55),
    inset 0 1px 1px rgba(255, 255, 255, 0.6);
  filter: brightness(1.1);
}

.enter-btn:active {
  transform: translateY(1px);
  box-shadow: 0 5px 15px rgba(168, 85, 247, 0.3);
}

.enter-btn:focus-visible {
  outline: 3px solid var(--purple-accent);
  outline-offset: 3px;
}

.enter-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
}

.btn-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.spinner-icon {
  display: inline-flex;
  align-items: center;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

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

.card-footer {
  text-align: center;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.security-note {
  font-size: 0.725rem;
  color: var(--text-muted);
}

/* ==========================================================================
   ACCESS GRANTED ANIMATION & OVERLAY
   ========================================================================== */

.granted-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(7, 3, 14, 0.88);
  backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease forwards;
}

.granted-card {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 3rem;
}

.granted-glow-ring {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
  animation: expandRing 1.2s ease-out infinite alternate;
}

@keyframes expandRing {
  0% { transform: scale(0.8); opacity: 0.4; }
  100% { transform: scale(1.4); opacity: 0.9; }
}

.granted-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.2);
  border: 2px solid var(--purple-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 30px var(--purple-glow);
  position: relative;
  z-index: 2;
}

.granted-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-shadow: 0 0 20px var(--purple-light);
}

.granted-subtext {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.light-sweep-bar {
  width: 220px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.light-sweep-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--purple-light), #ffffff, var(--purple-light), transparent);
  animation: sweep 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes sweep {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ==========================================================================
   STAGE 2: PROTECTED BIRTHDAY EXPERIENCE
   ========================================================================== */

/* Header & Sticky Controls */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 3, 14, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-sparkle {
  color: var(--purple-light);
  font-size: 1.2rem;
  animation: pulse 2s infinite;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--purple-light);
}

.lock-btn {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.lock-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* Main Content Wrapper */
.experience-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.exp-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.section-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--purple-light);
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: #ffffff;
}

.section-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 500px;
}

/* Hero Section */
.hero-container {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.hero-tag {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--purple-accent);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
}

.highlight-text {
  background: linear-gradient(135deg, #c084fc 0%, #e879f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(192, 132, 252, 0.5);
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 650px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.action-btn {
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.primary-btn {
  background: linear-gradient(135deg, var(--purple-glow) 0%, var(--purple-dark) 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.35);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(168, 85, 247, 0.5);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Constellation Canvas */
.constellation-canvas-wrap {
  position: relative;
  width: 100%;
  height: 400px;
  background: rgba(10, 5, 22, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

#constellation-canvas {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.star-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(22, 10, 42, 0.92);
  border: 1px solid var(--purple-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  display: flex;
  flex-direction: column;
  transform: translate(-50%, -120%);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
  z-index: 20;
}

.tooltip-name {
  font-weight: 800;
  font-size: 0.9rem;
  color: #ffffff;
}

.tooltip-hint {
  font-size: 0.725rem;
  color: var(--purple-light);
}

/* Memories Grid (7 Friends Cards) */
.memories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.memory-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.memory-card:hover {
  transform: translateY(-5px);
  border-color: var(--purple-light);
  box-shadow: 0 15px 35px rgba(168, 85, 247, 0.3);
  background: var(--bg-card-hover);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.card-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--purple-light);
  object-fit: cover;
  background-color: var(--bg-mid);
}

.card-info {
  display: flex;
  flex-direction: column;
}

.friend-name {
  font-weight: 800;
  font-size: 1.1rem;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.friend-role {
  font-size: 0.775rem;
  color: var(--purple-light);
}

.card-snippet {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-audio-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.775rem;
  color: var(--purple-light);
}

.open-page-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple-accent);
}

/* ==========================================================================
   VIEW 2: SEPARATE DEDICATED FRIEND PAGE VIEW
   ========================================================================== */

.friend-page-view {
  width: 100%;
  min-height: calc(100vh - 70px);
  padding: 2rem 1.25rem;
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.friend-page-container {
  max-width: 1050px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Topbar Navigation */
.friend-page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.back-btn:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: var(--purple-light);
  transform: translateX(-3px);
}

.friend-nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.friend-nav-btn {
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.friend-nav-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  color: #ffffff;
  border-color: var(--purple-light);
}

/* Friend Hero Banner */
.friend-hero-card {
  background: linear-gradient(135deg, rgba(30, 10, 60, 0.8) 0%, rgba(15, 5, 30, 0.95) 100%);
  border: 1px solid var(--purple-light);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 30px rgba(168, 85, 247, 0.2);
}

.friend-hero-badge {
  font-size: 0.725rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--purple-light);
  background: rgba(168, 85, 247, 0.15);
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.friend-page-name {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-shadow: 0 0 25px rgba(192, 132, 252, 0.4);
}

.friend-page-role {
  font-size: 1rem;
  color: var(--purple-accent);
  font-weight: 600;
}

.friend-tag-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.tag-pill {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  color: var(--text-muted);
}

/* Friend Content Grid */
.friend-content-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
}

.friend-text-panel {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.panel-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.friend-message-box {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.friend-quote-text {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-secondary);
  font-style: italic;
  position: relative;
  padding-left: 1rem;
  border-left: 3px solid var(--purple-light);
}

/* Dedicated Audio Player Box */
.friend-audio-card {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.panel-subheading {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.audio-player-box {
  background: rgba(10, 5, 22, 0.8);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.audio-info {
  display: flex;
  flex-direction: column;
}

.track-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
}

.track-artist {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.track-play-btn {
  padding: 0.6rem 1.15rem;
  background: linear-gradient(135deg, var(--purple-glow) 0%, var(--purple-dark) 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
  transition: transform var(--transition-fast);
}

.track-play-btn:hover {
  transform: scale(1.05);
}

/* Waveform Bars Animation */
.waveform-anim {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.wave-bar {
  width: 3px;
  height: 100%;
  background: var(--purple-light);
  border-radius: 3px;
  opacity: 0.4;
}

.waveform-active .wave-bar {
  animation: wave 1s ease-in-out infinite alternate;
}

.waveform-active .wave-bar:nth-child(1) { animation-delay: 0.0s; }
.waveform-active .wave-bar:nth-child(2) { animation-delay: 0.2s; }
.waveform-active .wave-bar:nth-child(3) { animation-delay: 0.4s; }
.waveform-active .wave-bar:nth-child(4) { animation-delay: 0.1s; }
.waveform-active .wave-bar:nth-child(5) { animation-delay: 0.3s; }

@keyframes wave {
  0% { height: 20%; opacity: 0.4; }
  100% { height: 100%; opacity: 1; }
}

/* Toast Button */
.toast-action-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  gap: 1rem;
}

.toast-btn {
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #f43f5e 0%, #e879f9 100%);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.3);
  transition: transform var(--transition-fast);
}

.toast-btn:hover {
  transform: translateY(-2px);
}

.toast-counter {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--purple-light);
}

/* Friend Photos Gallery Panel */
.friend-photos-panel {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.friend-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-photo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--border-glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.15);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.gallery-photo-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple-light);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(232, 121, 249, 0.3);
}

.gallery-photo-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-photo-card:hover .gallery-photo-img {
  transform: scale(1.02);
}

.gallery-photo-caption {
  position: relative;
  padding: 1.15rem 1.25rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #f1f5f9;
  background: rgba(15, 5, 30, 0.85);
  text-align: left;
  border-top: 1px solid rgba(192, 132, 252, 0.25);
  word-wrap: break-word;
}

/* Final Reveal Section */
.final-banner {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 10, 60, 0.8) 0%, rgba(15, 5, 30, 0.9) 100%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  overflow: hidden;
  text-align: center;
}

.final-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.final-tag {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--purple-accent);
}

.final-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: #ffffff;
}

.final-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 680px;
  line-height: 1.6;
}

.collage-gallery {
  display: flex;
  gap: 1.5rem;
  margin: 1.5rem 0;
  width: 100%;
  max-width: 750px;
  justify-content: center;
  flex-wrap: wrap;
}

.collage-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.collage-frame {
  position: relative;
  width: 260px;
  height: 260px;
}

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

.collage-overlay {
  position: absolute;
  bottom: 0;
  inset-x: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  padding: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
}

.collage-card-inner {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  width: 260px;
  height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.celebrate-btn {
  padding: 1rem 2rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #d946ef 0%, #a855f7 50%, #6366f1 100%);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(217, 70, 239, 0.4);
  transition: all var(--transition-fast);
}

.celebrate-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 35px rgba(217, 70, 239, 0.6);
}

.exp-footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Hero Surrounded Layout for Grand Finale */
.hero-surround-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin: 2rem 0;
  width: 100%;
}

.hero-main-frame {
  position: relative;
  width: 320px;
  max-width: 90vw;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 2px solid var(--purple-light);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(168, 85, 247, 0.4);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.hero-main-frame:hover {
  transform: scale(1.03);
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.7),
    0 0 50px rgba(232, 121, 249, 0.6);
}

.hero-main-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.hero-main-badge {
  position: absolute;
  bottom: 0;
  inset-x: 0;
  background: linear-gradient(to top, rgba(7, 3, 14, 0.95) 0%, rgba(7, 3, 14, 0.6) 70%, transparent 100%);
  padding: 1.25rem 1rem 0.85rem 1rem;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-shadow: 0 0 12px var(--purple-light);
}

.surrounding-friends-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  max-width: 700px;
}

.friend-star-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1.15rem;
  background: rgba(31, 12, 56, 0.85);
  border: 1px solid var(--purple-light);
  border-radius: 50px;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(168, 85, 247, 0.25);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.friend-star-pill:hover {
  transform: translateY(-3px) scale(1.05);
  background: linear-gradient(135deg, #a855f7 0%, #d946ef 100%);
  border-color: #ffffff;
  box-shadow: 0 10px 25px rgba(168, 85, 247, 0.5);
}
.master-tribute-wall {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin: 2.5rem 0;
}

.tribute-subheading {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-bottom: 1px solid rgba(192, 132, 252, 0.25);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.tribute-messages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
  text-align: left;
}

.tribute-message-card {
  background: rgba(22, 10, 42, 0.85);
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.tribute-message-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple-light);
  box-shadow: 0 15px 35px rgba(168, 85, 247, 0.35);
}

.tribute-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.tribute-card-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--purple-light);
  object-fit: cover;
}

.tribute-card-info {
  display: flex;
  flex-direction: column;
}

.tribute-card-name {
  font-weight: 800;
  font-size: 1.1rem;
  color: #ffffff;
}

.tribute-card-role {
  font-size: 0.775rem;
  color: var(--purple-accent);
}

.tribute-card-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-style: italic;
  white-space: pre-line;
  padding-left: 0.85rem;
  border-left: 3px solid var(--purple-light);
}

.tribute-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}

.tribute-photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  background: var(--bg-mid);
}

.tribute-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.tribute-photo-item:hover .tribute-photo-img {
  transform: scale(1.06);
}

.tribute-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: rgba(7, 3, 14, 0.88);
  border: 1px solid var(--purple-light);
  color: #ffffff;
  font-size: 0.725rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.tribute-photo-caption {
  position: absolute;
  bottom: 0;
  inset-x: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 70%, transparent 100%);
  padding: 0.85rem 0.65rem 0.55rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  line-height: 1.35;
}

.tribute-video-item {
  background: linear-gradient(135deg, rgba(31, 12, 56, 0.9) 0%, rgba(59, 14, 80, 0.9) 100%);
  border: 1.5px solid var(--purple-accent);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
  grid-column: span 2;
}

@media (max-width: 600px) {
  .tribute-video-item {
    grid-column: span 1;
  }
}

/* Utilities & Animations */
.hidden {
  display: none !important;
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* Responsive Styles */
@media (max-width: 850px) {
  .friend-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.75rem 1.25rem;
    gap: 1.25rem;
    border-radius: var(--radius-lg);
  }

  .portal-title {
    font-size: 1.25rem;
  }

  .portal-subtitle {
    font-size: 0.825rem;
  }

  .field-label {
    font-size: 0.8rem;
  }

  .input-wrapper input {
    font-size: 0.9rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .enter-btn {
    padding: 0.85rem;
    font-size: 0.95rem;
    min-height: 48px;
  }

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

  .brand-title {
    font-size: 0.9rem;
  }

  .btn-label-desktop {
    display: none;
  }

  .friend-page-name {
    font-size: 1.85rem;
  }

  .collage-frame, .collage-card-inner {
    width: 100%;
    height: 220px;
  }
}

/* --- TRIBUTE WALL PHOTO MOSAIC GALLERY --- */
.tribute-wall-gallery {
  margin-top: 2.5rem;
  width: 100%;
}

.tribute-gallery-heading {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #f5d0fe;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-shadow: 0 0 15px var(--purple-glow);
}

.tribute-wall-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
}

@media (min-width: 640px) {
  .tribute-wall-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .tribute-wall-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
  }
}

.tribute-wall-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(168, 85, 247, 0.15);
  cursor: pointer;
  aspect-ratio: 3 / 4;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.tribute-wall-item:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: var(--purple-light);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(232, 121, 249, 0.4);
}

.tribute-wall-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.tribute-wall-item:hover .tribute-wall-img {
  transform: scale(1.08);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(7, 3, 14, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(232, 121, 249, 0.5);
  border: 1.5px solid var(--purple-light);
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  display: block;
  object-fit: contain;
}

.lightbox-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 100000;
}

.lightbox-close-btn:hover {
  background: rgba(232, 121, 249, 0.5);
  transform: scale(1.1);
}

/* --- FULL SCREEN LETTER READER POPUP MODAL --- */
.letter-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(7, 3, 14, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

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

.letter-modal-content {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  background: #121216;
  color: #e2e8f0;
  border-radius: 0;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(1);
  transition: transform 0.35s ease;
}

.letter-header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  background: #1a1a22;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.letter-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #f5d0fe;
  background: rgba(232, 121, 249, 0.2);
  padding: 0.2rem 0.85rem;
  border-radius: 50px;
  border: 1px solid rgba(232, 121, 249, 0.4);
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.letter-modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.letter-author {
  font-size: 0.85rem;
  color: var(--purple-light);
  font-weight: 600;
  margin-top: 0.25rem;
}

.letter-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

.letter-close-btn:hover {
  background: rgba(232, 121, 249, 0.6);
  transform: scale(1.1);
}

.letter-modal-body {
  padding: 2.5rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  overflow-y: auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Document Blocks & Side-by-side Photo Layouts */
.doc-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
}

@media (min-width: 640px) {
  .doc-row {
    flex-direction: row;
    align-items: flex-start;
  }
}

.doc-row-img-left .doc-img-wrap {
  order: 1;
}
.doc-row-img-left .doc-text-wrap {
  order: 2;
}

.doc-row-img-right .doc-text-wrap {
  order: 1;
}
.doc-row-img-right .doc-img-wrap {
  order: 2;
}

.doc-img-wrap {
  flex: 0 0 220px;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.doc-inline-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  cursor: pointer;
}

.doc-text-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.doc-section-heading {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.doc-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.doc-polaroid-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.doc-polaroid-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 10px 10px 16px 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  color: #1a1a22;
  text-align: center;
  transition: transform 0.3s ease;
}

.doc-polaroid-card:hover {
  transform: translateY(-6px) rotate(1deg);
}

.doc-polaroid-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  cursor: pointer;
}

.doc-polaroid-caption {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 10px;
  color: #2d1241;
}

/* Button Card in Friend Page */
.letter-trigger-card {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(232, 121, 249, 0.15) 100%);
  border: 1.5px solid var(--purple-light);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(168, 85, 247, 0.2);
}

.letter-trigger-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.letter-trigger-sub {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1rem;
}

.letter-read-btn {
  background: linear-gradient(135deg, #a855f7 0%, #d946ef 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.letter-read-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 30px rgba(232, 121, 249, 0.6);
}


