/* ==========================================
   DAD'S 61ST BIRTHDAY CELEBRATION - STYLES
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-dark: #060913;
  --bg-card: #0d1527;
  --bg-card-hover: #131e36;
  --bg-glass: rgba(13, 21, 39, 0.75);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(245, 158, 11, 0.3);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-gold: #f59e0b;
  --accent-amber: #fbbf24;
  --accent-crimson: #9e1b32;
  --accent-cowboys: #003594;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-heart: #ef4444;
  
  --font-serif: 'Cinzel', Georgia, serif;
  --font-sans: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  
  --shadow-glow: 0 0 25px rgba(245, 158, 11, 0.2);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  min-width: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 40%, rgba(158, 27, 50, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(0, 53, 148, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  position: relative;
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
}

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Strict Mobile Overflow Protection */
nav, header, section, footer, div, p, span, form, input, select, textarea, img {
  max-width: 100%;
  box-sizing: border-box;
}

/* Typography */
h1, h2, h3, .serif-title {
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
}

/* Navbar & Sticky Header */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 9, 19, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 12px 0;
  width: 100%;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  max-width: calc(100% - 55px);
  overflow: hidden;
}

.brand-badge {
  display: none; /* Hidden on mobile to prevent navbar overflow */
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: #000;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 60%, var(--accent-amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-menu-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 1.2rem;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-links {
  display: none;
}

.nav-links.active {
  display: flex !important;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(6, 9, 19, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-glass);
  padding: 16px;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.95);
  z-index: 200;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0d1527;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

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

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: 20px;
}

/* Hero Section */
.hero-section {
  padding: 20px 0;
  position: relative;
  overflow: hidden;
}

.hero-top-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}

.btn-toast {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 12px 20px;
  border-radius: 40px;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
}

.quick-jump-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.quick-jump-bar .btn {
  width: 100%;
  justify-content: center;
}

/* Stat Cards Grid (Mobile-First Vertical Stack) */
.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  width: 100%;
}

.stat-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: var(--transition);
}

.stat-header {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.stat-header-icon {
  color: var(--accent-gold);
  font-size: 0.95rem;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-subtitle {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* Section Headers */
.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--border-glass);
  width: 100%;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
}

.section-badge-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  word-break: break-word;
  overflow-wrap: break-word;
  width: 100%;
}

.badge-count {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.view-controls {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass);
  padding: 4px;
  border-radius: 30px;
  gap: 4px;
  width: 100%;
}

.toggle-btn {
  flex: 1;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle-btn.active {
  background: var(--accent-gold);
  color: #000;
}

/* Filter Bar: Wrap Pills cleanly on mobile! */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  width: 100%;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-pill:hover, .filter-pill.active {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
  font-weight: 600;
}

/* Family Media & Vault Vertical Grids */
.family-vault-section, .photo-vault-section, .sports-section, .timeline-section, .wish-wall-section, .fun-section {
  padding: 40px 0;
  width: 100%;
  overflow-x: hidden;
}

.family-media-grid, .photo-vault-grid, .sports-grid, .jokes-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.family-media-card, .memory-card, .card-item-3d, .joke-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.family-media-thumb-wrap, .memory-thumb-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  background: #000;
  overflow: hidden;
}

.family-media-thumb, .memory-thumb, .card-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.family-media-card-body, .card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.family-media-filename {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-word;
  line-height: 1.35;
}

/* Wish Wall Vertical Stack */
.wish-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.wish-form-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
}

.wish-form-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.wish-form-subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

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

.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px !important; /* Fixes iOS Safari auto-zoom */
}

.icon-selector-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.icon-option {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
}

.icon-option.selected {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

.wish-cards-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.wish-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 16px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 20px 16px;
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}

/* ==========================================
   DESKTOP MULTI-COLUMN GRIDS (DESKTOPS > 992px ONLY)
   ========================================== */
@media (min-width: 993px) {
  .container {
    padding: 0 24px;
  }
  .brand-badge {
    display: inline-block;
  }
  .brand-title {
    font-size: 1.4rem;
  }
  .nav-brand {
    max-width: none;
  }
  .mobile-menu-toggle {
    display: none !important;
  }
  .nav-links {
    display: flex !important;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
    flex-direction: row;
    box-shadow: none;
    gap: 20px;
  }
  .hero-top-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .btn-toast {
    width: auto;
  }
  .quick-jump-bar {
    flex-direction: row;
    width: auto;
  }
  .quick-jump-bar .btn {
    width: auto;
  }
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
  }
  .section-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
  .section-title {
    font-size: 2.2rem;
  }
  .toggle-btn {
    flex: initial;
  }
  .family-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 20px !important;
  }
  .photo-vault-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)) !important;
    gap: 24px !important;
  }
  .sports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 24px !important;
  }
  .wish-grid {
    display: grid;
    grid-template-columns: 360px 1fr !important;
    gap: 28px !important;
  }
  .jokes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 20px !important;
  }
}
