/* ==========================================================================
   North Pole Family Christmas Wishlist - Main Stylesheet
   Theme: North Pole / Christmas Green, Red & White
   ========================================================================== */

:root {
  /* Festive Color Palette */
  --christmas-red: #c4151c;
  --christmas-red-deep: #991118;
  --christmas-red-light: #fef2f2;
  --christmas-green: #146b3a;
  --christmas-green-deep: #0b4623;
  --christmas-green-light: #f0fdf4;
  --snow-white: #ffffff;
  --snow-soft: #f8fafc;
  --frost-ice: #e2f1f8;
  --holiday-gold: #f59e0b;
  --holiday-gold-light: #fef3c7;
  
  /* Wood Plank / North Pole Signpost Colors */
  --wood-dark: #3e2213;
  --wood-medium: #5e371b;
  --wood-light: #7a4825;
  --wood-grain: #4d2b15;
  --wood-text: #fff8f0;

  /* Neutrals & Text */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-shadow: 0 10px 25px -5px rgba(20, 107, 58, 0.12), 0 8px 10px -6px rgba(196, 21, 28, 0.08);
  --card-shadow-hover: 0 20px 35px -5px rgba(20, 107, 58, 0.2), 0 12px 16px -6px rgba(196, 21, 28, 0.15);

  /* Typography */
  --font-display: 'Mountains of Christmas', cursive, fantasy;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Layout & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --max-width: 1240px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: linear-gradient(180deg, #092316 0%, #0d3822 180px, #104128 360px, #124b2e 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Snowfall Canvas (Fixed Fullscreen Overlay) */
#snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* ==========================================================================
   Header & Garland Styling
   ========================================================================== */

.candy-stripe-bar {
  height: 10px;
  background: repeating-linear-gradient(
    -45deg,
    var(--christmas-red),
    var(--christmas-red) 14px,
    var(--snow-white) 14px,
    var(--snow-white) 24px,
    var(--christmas-green) 24px,
    var(--christmas-green) 38px,
    var(--snow-white) 38px,
    var(--snow-white) 48px
  );
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.holiday-header {
  position: relative;
  background: linear-gradient(180deg, rgba(8, 28, 17, 0.95) 0%, rgba(13, 56, 34, 0.95) 100%);
  border-bottom: 3px solid rgba(245, 158, 11, 0.4);
  padding-bottom: 2rem;
  text-align: center;
  z-index: 20;
}

/* Festive String Lights Garland */
.garland-decoration {
  display: flex;
  justify-content: space-around;
  padding: 8px 16px;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.garland-bulb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  position: relative;
  animation: glowTwinkle 2.4s infinite alternate ease-in-out;
}

.garland-bulb::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 4px;
  width: 6px;
  height: 4px;
  background: #334155;
  border-radius: 2px 2px 0 0;
}

.garland-bulb.red {
  background: #ff3344;
  box-shadow: 0 0 12px 3px rgba(255, 51, 68, 0.8);
  animation-delay: 0.1s;
}

.garland-bulb.green {
  background: #22c55e;
  box-shadow: 0 0 12px 3px rgba(34, 197, 94, 0.8);
  animation-delay: 0.6s;
}

.garland-bulb.gold {
  background: #fbbf24;
  box-shadow: 0 0 14px 4px rgba(251, 191, 36, 0.9);
  animation-delay: 1.1s;
}

@keyframes glowTwinkle {
  0% { opacity: 0.45; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.15); }
}

.header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0.5rem;
}

.north-pole-stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border: 1.5px dashed rgba(245, 158, 11, 0.8);
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.stamp-year {
  background: var(--christmas-red);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 800;
}

.main-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 3px 0 var(--christmas-red-deep), 0 0 25px rgba(255, 255, 255, 0.35);
  letter-spacing: 1px;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.holly-leaf {
  display: inline-block;
  transform: rotate(-10deg);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.subtitle {
  color: #e2f1f8;
  font-size: 1.05rem;
  font-weight: 500;
  max-width: 650px;
  margin: 0 auto 1.5rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Festive Header Buttons */
.festive-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.festive-btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.festive-btn-pill:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   Main Container & North Pole Signpost
   ========================================================================== */

.main-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
  position: relative;
  z-index: 20;
}

/* Signpost Navigation */
.signpost-section {
  margin: 0.5rem auto 2.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.signpost-pole {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: -10px;
}

.signpost-finial {
  width: 32px;
  height: 32px;
  background: radial-gradient(circle, #fde047 30%, #eab308 70%, #ca8a04 100%);
  color: #713f12;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(253, 224, 71, 0.8), 0 2px 4px rgba(0,0,0,0.4);
  font-weight: 900;
  z-index: 2;
}

.signpost-cap {
  width: 24px;
  height: 10px;
  background: #ffffff;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.people-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(10, 36, 22, 0.75);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  max-width: 960px;
  width: 100%;
}

/* Wooden Direction Plank Buttons */
.tab-plank {
  flex: 1 1 160px;
  max-width: 210px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  background: linear-gradient(180deg, var(--wood-light) 0%, var(--wood-medium) 45%, var(--wood-dark) 100%);
  border: 2px solid #94582f;
  border-radius: var(--radius-md);
  color: var(--wood-text);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transition: var(--transition);
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.tab-plank::before {
  content: '•';
  position: absolute;
  left: 6px;
  color: #cca47c;
  font-size: 1.1rem;
  line-height: 1;
}

.tab-plank::after {
  content: '•';
  position: absolute;
  right: 6px;
  color: #cca47c;
  font-size: 1.1rem;
  line-height: 1;
}

.tab-plank:hover {
  transform: translateY(-3px) scale(1.02);
  background: linear-gradient(180deg, #8a532b 0%, #6e4120 50%, #4a2916 100%);
  border-color: #f59e0b;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(245, 158, 11, 0.4);
}

.tab-plank[aria-selected="true"] {
  background: linear-gradient(180deg, #d42426 0%, #b3141b 50%, #870b10 100%);
  border-color: #ffd700;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(196, 21, 28, 0.6), 0 0 18px rgba(255, 215, 0, 0.6);
  transform: translateY(-4px) scale(1.03);
}

.tab-plank[aria-selected="true"]::before,
.tab-plank[aria-selected="true"]::after {
  color: #ffd700;
}

.tab-icon {
  font-size: 1.35rem;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.4));
}

.tab-name {
  white-space: nowrap;
}

.tab-badge-count {
  background: rgba(0, 0, 0, 0.35);
  color: #fef08a;
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 700;
  margin-left: 2px;
}

/* ==========================================================================
   Person Hero Banner Card
   ========================================================================== */

.person-hero-card {
  position: relative;
  background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  border: 3px solid #e2e8f0;
  overflow: hidden;
}

/* Snowy Cap on Hero Card */
.person-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--christmas-red),
    var(--christmas-red) 30px,
    var(--snow-white) 30px,
    var(--snow-white) 60px,
    var(--christmas-green) 60px,
    var(--christmas-green) 90px,
    var(--snow-white) 90px,
    var(--snow-white) 120px
  );
}

.person-hero-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.person-avatar-wrap {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 3px solid var(--christmas-red);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 15px rgba(196, 21, 28, 0.2);
  flex-shrink: 0;
}

.person-avatar {
  font-size: 2.4rem;
  line-height: 1;
}

.person-hero-text {
  flex: 1;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.3rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

/* ==========================================================================
   Wishlist Items Grid & Cards
   ========================================================================== */

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* Item Gift Card */
.wish-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.wish-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(20, 107, 58, 0.35);
}

/* Card Image Area */
.card-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.wish-card:hover .card-image {
  transform: scale(1.05);
}

/* Fallback / Placeholder Graphic */
.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fef2f2 0%, #f0fdf4 100%);
  color: var(--christmas-green);
  gap: 8px;
}

.placeholder-icon {
  font-size: 3.2rem;
}

.placeholder-text {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--christmas-red);
}

/* Card Body */
.card-body {
  padding: 1.35rem 1.35rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.85rem;
}

/* Santa's Notes / Parchment Box */
.card-notes-box {
  background: #fffdf5;
  border: 1px solid #fed7aa;
  border-left: 4px solid #ea580c;
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  margin-bottom: 1.25rem;
  position: relative;
}

.notes-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #9a3412;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.3rem;
}

.card-notes {
  color: #431407;
  font-size: 0.92rem;
  line-height: 1.45;
  word-break: break-word;
}

/* Card Actions */
.card-actions {
  margin-top: auto;
  display: flex;
}

.btn-visit-item {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--christmas-green) 0%, var(--christmas-green-deep) 100%);
  color: #ffffff;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 10px rgba(20, 107, 58, 0.3);
  transition: var(--transition);
}

.btn-visit-item:hover {
  background: linear-gradient(135deg, #188046 0%, var(--christmas-green) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(20, 107, 58, 0.45);
}

.btn-visit-item.disabled {
  background: #94a3b8;
  box-shadow: none;
  cursor: default;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 2px dashed #cbd5e1;
  margin: 1rem 0;
  box-shadow: var(--card-shadow);
}

.empty-illustration {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.empty-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.holiday-footer {
  position: relative;
  background: #06190f;
  color: #94a3b8;
  text-align: center;
  padding: 3.5rem 1rem 3rem;
  border-top: 3px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
  z-index: 20;
}

.footer-decorations {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  letter-spacing: 8px;
}

.footer-text {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.footer-text strong {
  color: #fde047;
}

.footer-subtext {
  font-size: 0.9rem;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
}

.footer-code {
  color: #fca5a5;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.footer-timestamp {
  font-size: 0.8rem;
  color: #64748b;
}

/* ==========================================================================
   Responsive Breakpoints & Motion Settings
   ========================================================================== */

@media (max-width: 768px) {
  .holiday-header {
    padding-bottom: 1.5rem;
  }

  .main-title {
    font-size: 2.2rem;
  }

  .tab-plank {
    flex: 1 1 130px;
    padding: 8px 12px;
    font-size: 0.95rem;
    min-height: 46px;
  }

  .person-hero-card {
    padding: 1.25rem 1rem;
  }

  .person-avatar-wrap {
    width: 60px;
    height: 60px;
  }

  .person-avatar {
    font-size: 2rem;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  #snow-canvas {
    display: none;
  }
}
