/* public/style.css - Premium Child-Friendly Responsive Glassmorphic Design System */

/* --- DESIGN SYSTEM & CSS VARIABLES --- */
:root {
  --font-display: 'Fredoka', ui-rounded, 'Segoe UI', sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Theme Defaults (Forest Adventure) */
  --primary-color: #2C5E43;
  --secondary-color: #8B5A2B;
  --bg-gradient-start: #F7FAF7;
  --bg-gradient-end: #E6EDE6;
  --accent-color: #D4A373;
  --text-color: #162B20;
  --text-muted: #4B6053;

  /* Glassmorphism Styles */
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-bg-dark: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-glow: 0 8px 32px 0 rgba(44, 94, 67, 0.05);
  
  --shadow-sm: 0 4px 10px -2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 25px -5px rgba(22, 43, 32, 0.06), 0 8px 16px -6px rgba(22, 43, 32, 0.04);
  --shadow-lg: 0 25px 45px -10px rgba(22, 43, 32, 0.1), 0 15px 20px -8px rgba(22, 43, 32, 0.05);
  
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 32px;
  
  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

/* --- RESET & GENERAL STYLES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Custom Premium Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}
::-webkit-scrollbar-thumb {
  background: rgba(44, 94, 67, 0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(44, 94, 67, 0.3);
}

::selection {
  background: rgba(212, 163, 115, 0.25);
  color: var(--primary-color);
}

body {
  font-family: var(--font-body);
  color: var(--text-color);
  background: 
    var(--theme-bg-overlay, linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.08) 100%)),
    var(--theme-bg-image, none),
    linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background 0.8s ease-in-out, var(--transition-smooth);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Interactive Particle Canvas Background */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: auto; /* allows mouse tracking */
}

/* App Wrapper to float above background canvas */
#app-root {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- HEADINGS & TYPOGRAPHY --- */
h1, h2, h3, h4, .title-font {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

/* --- STYLISH NAVIGATION HEADER --- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2.5rem;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-glow);
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin: 0 auto;
  width: 100%;
  max-width: 1300px;
  box-sizing: border-box;
  transition: var(--transition-smooth);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.45rem;
  color: var(--primary-color);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-bounce);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-logo {
  font-size: 1.8rem;
  filter: drop-shadow(0 4px 6px rgba(44, 94, 67, 0.15));
}

.brand-text {
  letter-spacing: -0.5px;
}

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

/* Premium Language Selector */
.lang-selector {
  position: relative;
}

.lang-select-btn {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.lang-select-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.lang-dropdown {
  position: absolute;
  top: 115%;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 170px;
  z-index: 200;
  transform-origin: top right;
  animation: slideInDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.lang-dropdown.show {
  display: flex;
}

.lang-option {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-color);
  transition: var(--transition-smooth);
  font-weight: 500;
}

.lang-option:hover {
  background: rgba(44, 94, 67, 0.05);
  color: var(--primary-color);
  font-weight: 600;
}

.lang-option.active {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
}

/* Premium Button UI */
.btn {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition-bounce);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #3B7D59 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(44, 94, 67, 0.3);
  filter: brightness(1.05);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--glass-border);
  color: var(--text-color);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(44, 94, 67, 0.2);
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px -4px rgba(220, 38, 38, 0.25);
  filter: brightness(1.05);
}

/* --- SPA CONTAINERS (VIEWS) --- */
.view-container {
  display: none;
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-container.active {
  display: block;
}

/* --- SECTION 1: LANDING PAGE --- */
.landing-hero {
  text-align: center;
  padding: 3.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  position: relative;
  background: rgba(255, 255, 255, 0.72); /* Translucent glass container for 100% legibility */
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 860px;
  margin: 2rem auto 3rem auto;
}

.landing-hero::before {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(212, 163, 115, 0.15) 0%, transparent 70%);
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

.hero-tag {
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--glass-border);
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: var(--shadow-sm);
  color: var(--primary-color);
  backdrop-filter: blur(5px);
}

.landing-hero h1 {
  font-size: 3.4rem; /* Slightly reduced to fit beautifully in the glass container */
  letter-spacing: -1.5px;
  max-width: 820px;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--primary-color) 20%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.landing-hero p {
  font-size: 1.15rem;
  max-width: 620px;
  line-height: 1.6;
  color: var(--text-color); /* Changed from text-muted to main text-color for high contrast readability */
  font-weight: 500;
  opacity: 0.95;
}

/* Themes Showcase grid */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
  margin-top: 3.5rem;
}

.theme-card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--glass-glow);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  cursor: pointer;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.theme-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--theme-color);
  opacity: 0.85;
  transition: var(--transition-smooth);
}

.theme-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px -5px rgba(22, 43, 32, 0.08), 0 8px 16px -8px rgba(22, 43, 32, 0.05);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.8);
}

.theme-card:hover::before {
  height: 9px;
  opacity: 1;
}

.theme-card-icon {
  font-size: 2.8rem;
  text-align: center;
  margin: 0.25rem 0 0.5rem 0;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.06));
}

.theme-card h3 {
  text-align: center;
  color: var(--primary-color);
  font-size: 1.35rem;
  letter-spacing: -0.2px;
}

.theme-card p {
  font-size: 0.88rem;
  line-height: 1.55;
  text-align: center;
  color: var(--text-muted);
}

/* Feature grid */
.features-section {
  margin: 6rem 0 4rem 0;
  text-align: center;
}

.features-section h2 {
  font-size: 1.8rem;
  color: var(--primary-color);
  display: inline-block;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.6rem 2.2rem;
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
  margin: 0 auto 3.5rem auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.2rem;
}

.feature-box {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--glass-border);
  padding: 2.2rem 2rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  box-shadow: var(--glass-glow);
  transition: var(--transition-smooth);
}

.feature-box:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255,255,255,0.9);
}

.feature-emoji {
  font-size: 2.2rem;
  background: #ffffff;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255,255,255,0.7);
  transition: var(--transition-bounce);
}

.feature-box:hover .feature-emoji {
  transform: scale(1.1) rotate(5deg);
}

.feature-box h3 {
  font-size: 1.25rem;
  color: var(--primary-color);
  letter-spacing: -0.2px;
}

.feature-box p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
}


/* --- SECTION 2: CREATOR WIZARD --- */
.creator-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: start;
}

.creator-panel {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  transition: var(--transition-smooth);
}

.creator-panel:hover {
  box-shadow: var(--shadow-lg);
  background: rgba(255, 255, 255, 0.5);
}

.creator-step {
  display: none;
}

.creator-step.active {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  animation: fadeIn 0.4s ease-out forwards;
}

.creator-step h2 {
  font-size: 1.65rem;
  color: var(--primary-color);
  border-bottom: 2px solid rgba(212, 163, 115, 0.35);
  padding-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  letter-spacing: -0.5px;
}

/* Wizard Steps Indicator bar */
.wizard-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  position: relative;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.wizard-progress::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(44, 94, 67, 0.06);
  z-index: 0;
  transform: translateY(-50%);
}

.wizard-dot {
  background: #EAF0EC;
  border: 3px solid #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #8C9F93;
  z-index: 1;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-bounce);
  cursor: default;
  user-select: none;
}

.wizard-dot.active {
  background: var(--accent-color);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(212, 163, 115, 0.4);
  border-color: #ffffff;
}

.wizard-dot.completed {
  background: var(--primary-color);
  color: white;
  border-color: #ffffff;
}

/* Forms styling */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group label {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.1px;
}

.input-field {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.85rem 1.25rem;
  border: 1px solid rgba(44, 94, 67, 0.15);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-color);
  outline: none;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.input-field:focus {
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(44, 94, 67, 0.08), var(--shadow-md);
}

.input-field::placeholder {
  color: rgba(22, 43, 32, 0.35);
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

/* Preset Picker in Creator */
.preset-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.85rem;
  max-height: 420px;
  overflow-y: auto;
  padding: 0.5rem 0.2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(44, 94, 67, 0.25) transparent;
}

.preset-picker::-webkit-scrollbar {
  width: 6px;
}

.preset-picker::-webkit-scrollbar-track {
  background: transparent;
}

.preset-picker::-webkit-scrollbar-thumb {
  background-color: rgba(44, 94, 67, 0.25);
  border-radius: 3px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(44, 94, 67, 0.1);
  border-radius: var(--radius-md);
  padding: 1.2rem 0.6rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
  min-height: 110px;
}

.preset-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-color);
  background: #ffffff;
}

.preset-btn.active {
  border-color: var(--primary-color);
  background: var(--bg-gradient-start);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
  border-width: 2px;
}

.preset-emoji {
  font-size: 2rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.06));
  display: flex;
  align-items: center;
  justify-content: center;
}

.preset-emoji img {
  width: 2.2rem;
  height: 2.2rem;
  object-fit: contain;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.preset-btn:hover .preset-emoji img {
  transform: scale(1.18);
}


/* Beautiful Premium Search Input Wrapper */
.theme-search-wrapper {
  position: relative;
  margin-bottom: 1.2rem;
  width: 100%;
}

.theme-search-wrapper #theme-search-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(44, 94, 67, 0.15);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-color);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.theme-search-wrapper #theme-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(44, 94, 67, 0.1);
}

.theme-search-wrapper .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.theme-search-wrapper #theme-search-input:focus + .search-icon {
  opacity: 0.9;
}

/* Beautiful Animated No Themes Found State */
.no-themes-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.35);
  border: 1px dashed rgba(44, 94, 67, 0.15);
  border-radius: var(--radius-md);
  animation: fadeIn 0.4s ease-out;
}

.no-themes-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: bounceSlow 2s infinite ease-in-out;
}

.no-themes-title {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.no-themes-desc {
  font-size: 0.9rem;
  color: rgba(22, 43, 32, 0.6);
  max-width: 320px;
}

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

.preset-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: capitalize;
  color: var(--text-color);
}

/* AI prompt generator panel */
.ai-prompt-box {
  background: linear-gradient(135deg, rgba(255,255,255,0.7) 0%, rgba(245, 243, 255, 0.7) 100%);
  border: 1px dashed rgba(114, 9, 183, 0.3);
  padding: 1.8rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.ai-badge {
  position: absolute;
  top: -12px;
  right: 15px;
  background: linear-gradient(135deg, #7209B7 0%, #3F37C9 100%);
  color: white;
  font-family: var(--font-display);
  font-size: 0.75rem;
  padding: 0.25rem 0.8rem;
  border-radius: 100px;
  box-shadow: 0 4px 10px rgba(114, 9, 183, 0.25);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.sparkle-icon {
  animation: spin 3s linear infinite;
  display: inline-block;
}

.limit-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.ai-limit-tag {
  background: rgba(114, 9, 183, 0.06);
  color: #7209B7;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-weight: 700;
}

/* Navigation buttons in Creator */
.creator-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

/* Live Preview Side Panel */
.preview-container {
  position: sticky;
  top: 130px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  width: 100%;
}

.preview-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--primary-color);
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.2px;
}

/* --- THE REALTIME BIRTHDAY CARD WIDGET (3D TILT EFFECT) --- */
.invitation-card-3d-wrap {
  perspective: 1500px;
  width: 100%;
  max-width: 440px;
}

.invitation-card {
  --color-primary: var(--primary-color);
  --color-accent: var(--accent-color);
  --color-text: var(--text-color);
  
  width: 100%;
  min-height: 580px;
  height: auto;
  background: #ffffff; /* pure high-end paper cardstock */
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px -10px rgba(22, 43, 32, 0.12), 0 10px 20px -8px rgba(22, 43, 32, 0.06);
  padding: 1.8rem; /* Scaled down from 2.5rem to prevent bottom layout cut-off */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, box-shadow 0.3s;
}

/* Internal double border mimicking traditional formal card layouts */
.invitation-card::after {
  content: '';
  position: absolute;
  inset: 10px; /* Adjusted inset to match the tighter padding */
  border: 1px solid rgba(44, 94, 67, 0.08);
  border-radius: calc(var(--radius-lg) - 10px);
  pointer-events: none;
}

/* Playful background blobs */
.card-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.28;
  z-index: 0;
  transition: var(--transition-smooth);
}

.blob-1 {
  width: 190px;
  height: 190px;
  top: -30px;
  right: -30px;
  background: var(--color-accent);
}

.blob-2 {
  width: 240px;
  height: 240px;
  bottom: -60px;
  left: -60px;
  background: var(--color-primary);
}

/* Card Content Levels for 3D Layering */
.card-header-art, .glass-medallion {
  transform: translateZ(40px);
  text-align: center;
  font-size: 2.2rem; /* Scaled down from 3.8rem to guarantee text fits beautifully */
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.08));
  margin-top: 0.25rem; /* Tighter margins to maximize printable text space */
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;  /* Ensure the container has a fixed size so inline width/height: 100% fits perfectly */
  height: 3.5rem;
  margin-left: auto;
  margin-right: auto;
}

.card-header-art img, .glass-medallion img {
  width: 2.8rem; /* Scaled down from 4.8rem to prevent page detail truncation */
  height: 2.8rem;
  object-fit: contain;
  vertical-align: middle;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-header-art img:hover, .glass-medallion img:hover {
  transform: scale(1.2) rotate(5deg); /* Slightly more punchy hover effect */
}


.card-body-text {
  transform: translateZ(30px);
  text-align: center;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.8rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
}

.card-birthday-badge {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  font-family: var(--font-display);
  font-size: 0.8rem; /* Adjusted for refined visual balance */
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-kid-name {
  font-family: var(--font-display);
  font-size: 1.8rem; /* Scaled down from 2.2rem to guarantee no wrapping or layout shifting */
  color: var(--color-primary);
  text-shadow: 1px 1px 0px white;
}

.card-kid-age {
  font-size: 0.9rem; /* Sleeker, highly legible secondary text */
  font-weight: 600;
  opacity: 0.85;
}

.card-desc {
  font-size: 0.8rem; /* Highly legible and leaves plenty of structural breathing room */
  line-height: 1.45;
  margin-top: 0.25rem;
  opacity: 0.95;
  white-space: pre-wrap;
}

.card-details-box {
  transform: translateZ(50px);
  background: rgba(255, 255, 255, 0.7); /* Slightly higher opacity for outstanding readability */
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.8rem; /* Refined vertical padding to avoid overflow */
  display: flex;
  flex-direction: column;
  gap: 0.3rem; /* Scaled down spacing */
  font-size: 0.78rem;
  z-index: 1;
  box-shadow: var(--shadow-sm);
}

.card-detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.card-detail-icon {
  font-size: 1.1rem;
}

/* --- SECTION 3: ADMIN GUEST LIST PANEL (SPREADSHEET GRID) --- */
.admin-card {
  background: var(--glass-bg-dark);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--glass-glow);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-title-area h2 {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.admin-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-chip {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.05);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* The custom Spreadsheet container */
.spreadsheet-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: var(--shadow-sm);
  background: white;
}

.guest-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.guest-table th {
  background: #F3F4F6;
  color: #374151;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.9rem 1rem;
  border-bottom: 2px solid #E5E7EB;
  user-select: none;
}

.guest-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #E5E7EB;
  background: white;
}

.guest-table tr:hover td {
  background: #F9FAFB;
}

.guest-table tr.selected-guest-row td {
  background: rgba(79, 70, 229, 0.08) !important;
  box-shadow: inset 4px 0 0 var(--color-primary, #4f46e5);
}

/* Editable Cell styling */
.editable-cell {
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.editable-cell:focus {
  background: #FFFBEB !important;
  box-shadow: inset 0 0 0 2px #F59E0B;
  cursor: text;
}

/* Status Pill dropdown selector inside cell */
.status-cell-select {
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
  max-width: 130px;
  -webkit-appearance: none;
  text-align: center;
}

.status-cell-select.pending {
  background: #FEF3C7;
  color: #D97706;
}

.status-cell-select.confirmed {
  background: #D1FAE5;
  color: #059669;
}

.status-cell-select.declined {
  background: #FEE2E2;
  color: #DC2626;
}

/* Guest status badge inside the Step 4 links table */
.guest-status-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
  text-align: center;
  white-space: nowrap;
}

.guest-status-badge.status-pending-badge {
  background: #FEF3C7;
  color: #D97706;
}

.guest-status-badge.status-confirmed-badge {
  background: #D1FAE5;
  color: #059669;
}

.guest-status-badge.status-declined-badge {
  background: #FEE2E2;
  color: #DC2626;
}

/* Actions cell buttons */
.row-actions-btn {
  background: none;
  border: none;
  color: #9CA3AF;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.row-actions-btn:hover {
  color: #EF4444;
  background: #FEE2E2;
}

/* Utility buttons toolbar */
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.left-toolbar {
  display: flex;
  gap: 0.5rem;
}

.right-toolbar {
  display: flex;
  gap: 0.5rem;
}

/* Import/export buttons file upload wrapper */
.file-upload-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.file-upload-input {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
  height: 100%;
  width: 100%;
}

/* Custom Modal Dialog for PIN Login / Admin Info */
dialog {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 2.5rem;
  width: 90%;
  max-width: 450px;
  margin: auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  outline: none;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
}

.dialog-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
}

.dialog-wrap h3 {
  font-size: 1.6rem;
  color: var(--primary-color);
}

.dialog-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #9CA3AF;
  transition: var(--transition-smooth);
}

.dialog-close-btn:hover {
  color: var(--text-color);
}

.pin-inputs-wrap {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.pin-digit-input {
  width: 50px;
  height: 60px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  border: 2px solid #E5E7EB;
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition-smooth);
}

.pin-digit-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(44, 94, 67, 0.25);
}

/* --- SECTION 4: GUEST PORTAL (PHYSICAL OPENING ENVELOPE) --- */
.guest-view-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  min-height: 80vh;
  justify-content: center;
  padding: 1rem;
}

.envelope-container {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1 / 0.72;
  perspective: 1500px;
  cursor: pointer;
  margin-bottom: 2rem;
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.envelope-container.open {
  aspect-ratio: auto;
  height: 980px; /* Expands container to fit the full open card */
}

/* The magical Envelope card */
.envelope {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #E9D8A6; /* Organic old parchment envelope */
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.envelope-container.open .envelope {
  top: 650px; /* Slides the envelope parchment background to the bottom */
  height: 330px; /* Prevents the envelope card from stretching vertically */
}

/* Envelope Flaps */
.envelope-flap-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 230px solid transparent;
  border-right: 230px solid transparent;
  border-top: 170px solid #D4A373; /* Slightly darker shade */
  transform-origin: top;
  z-index: 3;
  transition: transform 0.6s ease-in-out, z-index 0.2s;
}

.envelope-flap-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 210px solid #E3D5CA;
  border-top: 165px solid transparent;
  border-bottom: 165px solid transparent;
  z-index: 2;
}

.envelope-flap-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-right: 210px solid #E3D5CA;
  border-top: 165px solid transparent;
  border-bottom: 165px solid transparent;
  z-index: 2;
}

.envelope-flap-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 180px;
  background: #DFD0B8;
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
  z-index: 2;
  border-radius: 0 0 8px 8px;
}

/* Label on closed envelope front */
.envelope-label {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(10px);
  background: #FFF;
  border: 2px dashed var(--accent-color);
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--primary-color);
  box-shadow: var(--shadow-md);
  text-align: center;
  z-index: 4;
  white-space: nowrap;
  pointer-events: none;
  animation: floatEnvelopeLabel 4s ease-in-out infinite;
}

.envelope-tap-hint {
  font-size: 0.8rem;
  font-family: var(--font-body);
  display: block;
  opacity: 0.6;
  margin-top: 0.2rem;
}

/* The actual Letter inside */
.envelope-letter {
  position: absolute;
  width: 90%;
  left: 5%;
  bottom: 5%;
  z-index: 1;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease, visibility 0.4s ease;
  transform: translateY(0) scale(0.95);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  opacity: 0;
  visibility: hidden;
}

/* Open Envelope States */
.envelope-container.open .envelope-flap-top {
  transform: rotateX(180deg);
  z-index: 0;
}

.envelope-container.open .envelope-letter {
  transform: translateY(-20%) scale(1.02) translateZ(10px);
  z-index: 5;
  pointer-events: auto; /* enables clicks on letter details/RSVP */
  opacity: 1;
  visibility: visible;
}

.envelope-container.open .envelope-label {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8) translateZ(0);
  transition: opacity 0.3s, transform 0.3s;
}

/* Disable pointer events on envelope flaps when open so clicks hit letter details/RSVP buttons */
.envelope-container.open .envelope-flap-top,
.envelope-container.open .envelope-flap-left,
.envelope-container.open .envelope-flap-right,
.envelope-container.open .envelope-flap-bottom {
  pointer-events: none;
}

/* Guest Portal Invitation Card sizing override (Dynamic height to prevent cutoff) */
#guest-portal-letter-card {
  aspect-ratio: auto;
  height: auto;
  padding: 1.5rem;
  gap: 1rem;
  justify-content: flex-start;
}

/* RSVP interactive panel nested inside invitation card */
.invitation-card .guest-rsvp-panel {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: none;
  padding: 1rem;
  margin-top: 0.5rem;
  border-radius: var(--radius-md);
  gap: 0.8rem;
  z-index: 10;
  transform: translateZ(20px);
  width: 100%;
  box-sizing: border-box;
  display: none; /* Controlled by JS */
  flex-direction: column;
}

.invitation-card .guest-rsvp-panel h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-primary);
  text-align: center;
}

/* Compact Inputs Row layout */
.rsvp-inputs-row {
  display: flex;
  gap: 0.8rem;
  width: 100%;
}

.rsvp-inputs-row .form-group {
  flex: 1;
  gap: 0.25rem;
  display: flex;
  flex-direction: column;
}

.rsvp-inputs-row .form-group label {
  font-size: 0.75rem;
  margin: 0;
  font-weight: 700;
  color: var(--color-primary);
}

.rsvp-inputs-row .input-field {
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  height: auto;
  box-sizing: border-box;
  width: 100%;
}

/* Party tips in Guest view RSVP panel */
.rsvp-party-tips-wrapper {
  background: rgba(255, 255, 255, 0.45);
  border: 1px dashed var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.rsvp-party-tips-wrapper .tips-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rsvp-party-tips-wrapper .tips-body {
  font-size: 0.8rem;
  line-height: 1.35;
  color: #334155; /* Slate-700 for high readability */
  white-space: pre-line;
  width: 100%;
}

/* Autohide sticky header when guest opens invitation */
body.envelope-opened header {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.rsvp-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.rsvp-choice-btn {
  border: 2px solid rgba(0,0,0,0.06);
  background: white;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.rsvp-choice-btn.confirm-style {
  color: #059669;
}

.rsvp-choice-btn.confirm-style.active {
  background: #D1FAE5;
  border-color: #059669;
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.rsvp-choice-btn.decline-style {
  color: #DC2626;
}

.rsvp-choice-btn.decline-style.active {
  background: #FEE2E2;
  border-color: #DC2626;
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* --- SECTION 5: PRINT PAGE VIEW (MEDIA PRINT SPECIFIC WRAP) --- */
#print-preview-view {
  background: white;
  min-height: 100vh;
  padding: 3rem 0;
  display: none;
}

#print-preview-view.active {
  display: block;
}

.print-instructions-panel {
  max-width: 800px;
  margin: 0 auto 3rem auto;
  padding: 1.5rem;
  background: #FFFBEB;
  border: 1px dashed #F59E0B;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.print-instructions-text h3 {
  color: #B45309;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.print-instructions-text p {
  font-size: 0.85rem;
  color: #78350F;
}

/* The actual print A4 sheets containers for screen preview */
.print-a4-page {
  width: 292mm;
  height: 200mm;
  background: white;
  margin: 0 auto 4rem auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
  padding: 5mm 8mm;
  display: flex;
  gap: 6mm;
  border: 1px solid #ddd;
}

.print-a4-page.portrait-mode {
  width: 200mm;
  height: 272mm;
  padding: 6mm 5mm;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6mm;
  justify-items: center;
  align-items: center;
}

.print-card-wrapper-flat4 {
  width: 92mm;
  height: 127mm;
  overflow: hidden;
  position: relative;
  border: 1px dashed #ccc;
  border-radius: 4px;
}

.print-card-wrapper-flat4 .print-a5-card {
  width: 135mm !important;
  height: 185mm !important;
  transform: scale(0.68) !important;
  transform-origin: top left !important;
  border: none !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
}

/* A5 Cards */
.print-a5-card {
  width: 135mm;
  height: 185mm;
  border: 1px dashed #ccc;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  padding: 10mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #ffffff;
  z-index: 1;
}

/* Premium Card background and framing elements */
.print-card-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.print-card-bg-layer img {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.print-inner-frame {
  position: absolute;
  top: 6mm;
  left: 6mm;
  right: 6mm;
  bottom: 6mm;
  border: 2.5px dashed var(--accent-color, #ccc);
  border-radius: 12px;
  pointer-events: none;
  z-index: 2;
}

/* Left Cover card */
.print-a5-card.cover-side {
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  text-align: center;
}

.print-cover-art {
  font-size: 3.8rem;
  background: rgba(255, 255, 255, 0.95);
  border: 3px solid var(--accent-color, #D4A373);
  border-radius: 50%;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

.print-cover-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  color: var(--primary-color, #2C5E43);
  line-height: 1.15;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8), 0 0 10px rgba(255, 255, 255, 0.5);
  font-weight: 700;
  position: relative;
  z-index: 3;
}

.print-cover-badge {
  background: var(--primary-color, #2C5E43);
  color: white;
  font-family: var(--font-display);
  font-size: 1.1rem;
  padding: 0.5rem 1.6rem;
  border-radius: 100px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
  position: relative;
  z-index: 3;
  display: inline-block;
}

/* Right Details card */
.print-a5-card.details-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.print-details-header {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--primary-color, #2C5E43);
  border-bottom: 2px solid var(--accent-color, #D4A373);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 3;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.print-details-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.95rem;
  position: relative;
  z-index: 3;
}

.print-detail-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.85);
  border-left: 5px solid var(--accent-color, #D4A373);
  padding: 0.5rem 0.8rem;
  border-radius: 100px; /* Aligned standard rounded design */
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.02);
  color: var(--text-color, #1A3326);
}

.print-detail-icon {
  font-size: 1.2rem;
}

.print-details-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  position: relative;
  z-index: 3;
}

.print-footer-text {
  max-width: 60%;
}

.print-footer-guest {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--primary-color, #2C5E43);
  margin-bottom: 0.3rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.print-footer-instructions {
  font-size: 0.7rem;
  opacity: 0.85;
  line-height: 1.35;
  color: var(--text-color, #1A3326);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.print-qr-canvas-holder {
  width: 44mm;
  height: 44mm;
  border: 3px solid var(--accent-color, #D4A373);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5mm;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 3;
}

.print-qr-canvas-holder canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Crop Marks */
.crop-mark {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 1px solid #777;
  pointer-events: none;
}

.crop-top-left     { top: 5mm; left: 5mm; border-right: none; border-bottom: none; }
.crop-top-right    { top: 5mm; right: 5mm; border-left: none; border-bottom: none; }
.crop-bottom-left  { bottom: 5mm; left: 5mm; border-right: none; border-top: none; }
.crop-bottom-right { bottom: 5mm; right: 5mm; border-left: none; border-top: none; }

/* Middle Fold helper line */
.fold-line {
  position: absolute;
  top: 10mm;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 190mm;
  border-left: 1px dashed rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes floatEnvelopeLabel {
  0% { transform: translate(-50%, -50%) translateZ(10px); }
  50% { transform: translate(-50%, -58%) translateZ(15px); }
  100% { transform: translate(-50%, -50%) translateZ(10px); }
}

/* --- SCREEN RESPONSIVENESS MEDIA QUERIES --- */
@media (max-width: 900px) {
  .creator-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .preview-container {
    position: static;
  }
}

@media (max-width: 600px) {
  header {
    padding: 1rem;
  }
  
  .brand-text {
    display: none;
  }
  
  .invitation-card {
    min-height: 420px;
  }
  
  .creator-panel {
    padding: 1.5rem;
  }
  
  .preset-picker {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
  
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .admin-stats {
    width: 100%;
  }
  
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .left-toolbar, .right-toolbar {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }

  .print-a4-page {
    /* on small screens scale print preview down to fit mobile display */
    transform: scale(0.3);
    transform-origin: top left;
    margin-bottom: -140mm; /* adjust overflow space */
  }
}

/* --- PRINT SYSTEM SPECIFICS (@media print) --- */
@media print {
  /* Hide all regular web page containers completely, keeping #app-root visible so we can render #print-preview-view */
  #particles-canvas, header, footer, dialog, section:not(#print-preview-view), .view-container:not(#print-preview-view) {
    display: none !important;
  }

  body, html {
    background: white !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  #print-pages-container {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  #app-root {
    display: block !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Force print page container display */
  #print-preview-view {
    display: block !important;
    visibility: visible !important;
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: white !important;
  }

  .print-instructions-panel {
    display: none !important;
  }

  .print-a4-page {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6mm !important;
    width: 297mm !important;
    height: 210mm !important;
    max-width: 297mm !important;
    max-height: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    page-break-after: always !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact !important; /* Forces colors/background printing */
    print-color-adjust: exact !important;
  }

  .print-a4-page.portrait-mode {
    display: grid !important;
    grid-template-columns: repeat(2, 92mm) !important;
    grid-template-rows: repeat(2, 127mm) !important;
    gap: 6mm !important;
    justify-content: center !important;
    align-content: center !important;
    justify-items: center !important;
    align-items: center !important;
    width: 210mm !important;
    height: 297mm !important;
    max-width: 210mm !important;
    max-height: 297mm !important;
    padding: 0 !important;
  }

  .print-card-wrapper-flat4 {
    border: 1px dashed rgba(0,0,0,0.1) !important;
  }

  .print-a5-card {
    border: 1px dashed rgba(0,0,0,0.1) !important; /* soft crop indicator */
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .print-card-bg-layer {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .print-card-bg-layer img {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 1 !important;
  }
  
  .fold-line {
    border-left: 1px dashed rgba(0, 0, 0, 0.15) !important;
  }
}

/* AI input tabs inside Creator step 2 */
.ai-input-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding-bottom: 0.5rem;
}

.ai-input-tabs .tab-btn {
  flex: 1;
  padding: 0.6rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.ai-input-tabs .tab-btn:hover {
  color: var(--primary-color);
  background: rgba(44, 94, 67, 0.05);
}

.ai-input-tabs .tab-btn.active {
  background: var(--bg-gradient-start);
  color: var(--primary-color) !important;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(44, 94, 67, 0.1);
}

/* Premium Glassmorphic Viral Loop Card */
.guest-viral-banner {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06), var(--shadow-md);
  text-align: center;
  max-width: 460px;
  width: 100%;
  box-sizing: border-box;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 9;
  position: relative;
  overflow: hidden;
}

.guest-viral-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(114, 9, 183, 0.05) 0%, transparent 70%);
  pointer-events: none;
  animation: spin 15s linear infinite;
}

.viral-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.viral-sparkle {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
  display: inline-block;
  animation: pulseSparkle 2s ease-in-out infinite;
}

.guest-viral-banner h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--primary-color);
  margin: 0;
}

/* Sparkle pulsation microanimation */
@keyframes pulseSparkle {
  0%, 100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.2)); }
  50% { transform: scale(1.15) rotate(15deg); filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.6)); }
}

/* --- CLEAN OVERHAUL: REMOVED INLINE STYLES --- */
main {
  flex: 1;
  z-index: 1;
}

.hero-btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.themes-section {
  text-align: center;
  margin-top: 1rem;
}

.themes-section h2 {
  color: var(--primary-color);
  display: inline-block;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.6rem 2.2rem;
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
  margin: 0 auto 2rem auto;
}

.step-section-label {
  color: var(--primary-color);
  margin-top: 0.5rem;
  display: block;
}

.section-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin: 0.5rem 0;
}

.field-hint {
  font-size: 0.75rem;
  opacity: 0.75;
  margin-top: 0.25rem;
}

.btn-ai {
  background: linear-gradient(135deg, #7209B7 0%, #3F37C9 100%) !important;
}

.btn-ai:hover {
  box-shadow: 0 10px 20px -5px rgba(114, 9, 183, 0.3) !important;
}

.step-subtitle {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.col-actions {
  width: 50px;
}

.pre-save-area {
  text-align: center;
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.2rem;
}

.save-success-banner {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid #10B981;
  border-radius: var(--radius-md);
  padding: 1.2rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.save-success-banner .banner-icon {
  font-size: 1.8rem;
}

.save-success-banner h4 {
  color: #065F46;
  font-size: 1.05rem;
  margin: 0;
}

.save-success-banner p {
  color: #065F46;
  font-size: 0.85rem;
  margin: 0;
}

.share-box {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.credentials-box {
  display: flex;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--glass-border);
  padding: 1rem;
  border-radius: var(--radius-md);
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.credentials-box .pin-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.credentials-box strong {
  display: block;
  font-size: 1.6rem;
  color: var(--primary-color);
  font-family: var(--font-display);
  margin-top: 0.25rem;
}

.section-subhead {
  font-size: 1.1rem;
  color: var(--primary-color);
}

.spreadsheet-container.max-h-250 {
  max-height: 250px;
}

#rsvp-additional-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#guest-portal-viral-banner {
  display: none;
  margin-top: 2rem;
}

.guest-viral-banner p {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0.5rem 0 1rem 0;
}

#guest-rsvp-success-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  max-width: 440px;
  background: white;
  border: 1px solid var(--glass-border);
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

#guest-rsvp-success-screen .success-emoji {
  font-size: 5rem;
  animation: spin 2s ease-out 1;
}

#guest-rsvp-success-screen p {
  opacity: 0.85;
  font-size: 0.95rem;
  line-height: 1.6;
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.85rem;
  opacity: 0.7;
  background: rgba(255, 255, 255, 0.4);
  z-index: 10;
}

.dialog-wrap p {
  font-size: 0.9rem;
  opacity: 0.75;
}

#login-error-message {
  display: none;
  color: #DC2626;
  font-size: 0.85rem;
  font-weight: 600;
}

.w-full {
  width: 100%;
}

.share-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.share-input {
  flex: 1;
  padding: 0.5rem;
}

/* Saved Link Warning Box & Locked Content Area */
.admin-saved-warning-box {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  margin: 0.5rem 0;
  backdrop-filter: blur(8px);
}

.admin-saved-warning-box .warning-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.admin-saved-warning-box .warning-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-saved-warning-box strong {
  color: #B45309;
  font-size: 0.95rem;
}

.admin-saved-warning-box p {
  font-size: 0.8rem;
  color: #78350F;
  margin: 0;
  line-height: 1.4;
}

.admin-saved-warning-box .checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.6);
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.admin-saved-warning-box input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: #D97706;
}

.admin-saved-warning-box .check-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #78350F;
  cursor: pointer;
  user-select: none;
}

.locked-area {
  filter: blur(5px);
  opacity: 0.4;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.locked-area.unlocked {
  filter: blur(0);
  opacity: 1;
  pointer-events: auto;
}

/* --- MAGICAL AI THEME LOADERS AND CARD TRANSITIONS --- */
.invitation-card {
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.4s ease, 
              background-image 0.8s ease-in-out,
              background-color 0.8s ease-in-out;
  background-blend-mode: overlay;
}

/* Magic Reveal Card Animation (Interactive 3D Flip & Pulse) */
.card-magic-reveal {
  animation: magicReveal 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes magicReveal {
  0% {
    transform: scale(0.9) rotateY(-15deg) rotateX(10deg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  30% {
    transform: scale(1.05) rotateY(180deg) rotateX(-5deg);
    box-shadow: 0 25px 40px rgba(157, 78, 221, 0.35);
  }
  70% {
    transform: scale(1.03) rotateY(360deg) rotateX(5deg);
    box-shadow: 0 30px 60px rgba(0, 245, 212, 0.3);
  }
  100% {
    transform: scale(1) rotateY(360deg) rotateX(0);
    box-shadow: 0 20px 50px -10px rgba(22, 43, 32, 0.12);
  }
}

/* Dedicated Card Background Layer for real-time de-blur/image-synthesis WOW effect */
.card-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  transition: filter 1.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.6s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 1.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

/* Pulsating swirling blurry AI image synthesis animation */
.card-bg-generating {
  filter: blur(24px) saturate(1.8) brightness(1.1);
  transform: scale(1.15) rotate(1deg);
  opacity: 0.75;
  animation: bgGeneratingPulse 4s infinite ease-in-out;
}

@keyframes bgGeneratingPulse {
  0%, 100% {
    filter: blur(24px) saturate(1.8) brightness(1.1);
    transform: scale(1.15) rotate(1deg);
  }
  50% {
    filter: blur(32px) saturate(2.2) brightness(1.25);
    transform: scale(1.22) rotate(-1deg);
  }
}

/* Glassmorphic AI Loader Overlay (Translucent to show background synthesis) */
.card-ai-loader-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 1, 37, 0.45); /* Highly translucent cosmic indigo glass */
  backdrop-filter: blur(5px) saturate(140%);
  -webkit-backdrop-filter: blur(5px) saturate(140%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 2rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  color: #E0AAFF;
  border-radius: var(--radius-lg);
}

.card-ai-loader-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Magic Wizard Wand Sparkle Animation */
.magic-wand-animation {
  font-size: 4rem;
  display: inline-block;
  animation: magicWandTwirl 2.5s infinite ease-in-out;
  filter: drop-shadow(0 0 15px rgba(0, 245, 212, 0.8));
}

@keyframes magicWandTwirl {
  0%, 100% {
    transform: rotate(-10deg) translateY(0) scale(1);
  }
  50% {
    transform: rotate(25deg) translateY(-10px) scale(1.15);
  }
}

/* Shimmer status text */
.loader-status-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  background: linear-gradient(90deg, #FFFFFF 0%, #00F5D4 50%, #9D4EDD 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 3s linear infinite;
  text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

@keyframes textShimmer {
  to {
    background-position: 200% center;
  }
}

.loader-sub-status {
  font-size: 0.85rem;
  color: #BDE0FE;
  opacity: 0.8;
  max-width: 85%;
  margin-top: -0.5rem;
  animation: pulseOpacity 2s infinite ease-in-out;
}

@keyframes pulseOpacity {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Outer shimmering ring container */
.loader-shimmer-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #00F5D4;
  border-bottom-color: #9D4EDD;
  position: relative;
  animation: rotateLoader 1.5s linear infinite;
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.2);
}

.loader-shimmer-ring::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-left-color: #FF758F;
  border-right-color: #D4A373;
  animation: rotateLoader 1s linear infinite reverse;
}

@keyframes rotateLoader {
  to {
    transform: rotate(360deg);
  }
}

/* --- THEME LANDING PAGE SPECIAL STYLING --- */
#theme-landing-view {
  display: none;
}
#theme-landing-view.active {
  display: block;
}
.theme-hero {
  padding: 4rem 1rem 3rem 1rem;
}
.theme-preview-section {
  margin-top: 2rem;
  margin-bottom: 4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.theme-preview-section h2 {
  font-size: 1.6rem;
  margin: 0 auto 2.5rem auto;
  display: inline-block;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.6rem 2.2rem;
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
  color: var(--primary-color);
}
.theme-preview-card-wrapper {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  padding: 3rem 2rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}
.theme-preview-card-wrapper:hover {
  transform: translateY(-4px);
}

/* Premium Vector SVG Icon Sizing */
.print-cover-art-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  vertical-align: middle;
}

.theme-card-icon img {
  width: 2.8rem;
  height: 2.8rem;
  object-fit: contain;
  vertical-align: middle;
}

/* Firebase Login Dialog Additions */
.google-btn {
  background: #ffffff !important;
  color: #374151 !important;
  border: 1px solid #d1d5db !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}
.google-btn:hover {
  background: #f9fafb !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}
.google-icon {
  flex-shrink: 0;
}

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 1rem 0;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}
.login-divider:not(:empty)::before {
  margin-right: .5em;
}
.login-divider:not(:empty)::after {
  margin-left: .5em;
}

.email-login-wrap, .pin-login-wrap {
  text-align: left;
}
.login-section-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.login-user-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  color: #334155;
  margin-bottom: 1rem;
}
.user-invitations-list {
  scrollbar-width: thin;
}
.user-invitation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.user-invitation-item:hover {
  border-color: var(--primary-color);
  background: #f8fafc;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.user-invitation-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.user-invitation-title {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.9rem;
}
.user-invitation-meta {
  font-size: 0.75rem;
  color: #64748b;
}
.user-invitation-btn {
  padding: 0.4rem 0.8rem !important;
  font-size: 0.8rem !important;
  height: auto !important;
  width: auto !important;
  margin: 0 !important;
}
.login-feedback-success {
  text-align: center;
  animation: fadeIn 0.3s ease;
}

/* Guest Portal Envelope Opened Mobile Adjustments */
@media (max-width: 600px) {
  body.envelope-opened .guest-view-wrap {
    padding: 8px !important;
  }
  
  body.envelope-opened .envelope-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  
  body.envelope-opened .envelope-letter {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
  }
  
  body.envelope-opened #guest-portal-letter-card {
    padding: 1rem 0.6rem !important;
  }
  
  body.envelope-opened #guest-portal-letter-card::after {
    inset: 4px !important;
  }
}

