/* ==========================================================================
   HÀ NỘI TRONG TÔI - STYLESHEET
   Warm Editorial Aesthetic, Mobile Optimized & Comments / Admin System
   ========================================================================== */

:root {
  /* Warm Theme Colors (Default) */
  --bg-primary: #faf7f2;
  --bg-secondary: #f3eee6;
  --bg-card: #ffffff;
  --bg-overlay: rgba(250, 247, 242, 0.92);
  
  --text-primary: #22252a;
  --text-secondary: #575e6a;
  --text-muted: #8c93a0;
  
  --accent: #c4552b;
  --accent-hover: #a8411b;
  --accent-light: #fbeee8;
  --accent-border: #f0cbbe;
  
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --success: #16a34a;
  --gold: #d97706;
  --border: #e6dfd5;
  --border-light: #f0ebe2;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --shadow-warm: 0 12px 30px rgba(196, 85, 43, 0.15);

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-primary: #121417;
  --bg-secondary: #1a1e24;
  --bg-card: #20262e;
  --bg-overlay: rgba(18, 20, 23, 0.94);
  
  --text-primary: #f0f2f5;
  --text-secondary: #a2abb9;
  --text-muted: #6b7585;
  
  --accent: #e06c3f;
  --accent-hover: #f07e53;
  --accent-light: rgba(224, 108, 63, 0.15);
  --accent-border: rgba(224, 108, 63, 0.3);
  
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.2);
  --success: #22c55e;
  --gold: #f59e0b;
  --border: #2e3642;
  --border-light: #252c36;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-warm: 0 12px 30px rgba(224, 108, 63, 0.2);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 72px; /* Space for bottom navigation */
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Navigation Bar (Desktop / Tablet)
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.logo-icon {
  font-size: 1.4rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.btn-donate-nav {
  background: var(--accent-light);
  color: var(--accent) !important;
  border: 1px solid var(--accent-border);
  padding: 0.45rem 1rem !important;
  border-radius: var(--radius-full) !important;
  font-weight: 600 !important;
}

.btn-donate-nav:hover {
  background: var(--accent);
  color: #ffffff !important;
}

.btn-admin-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.btn-admin-nav:hover {
  color: var(--accent);
}

.theme-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.theme-btn:hover {
  transform: rotate(15deg);
  background: var(--border-light);
}

/* ==========================================================================
   Mobile Bottom Navigation Bar
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: var(--bg-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 0.4rem 1rem env(safe-area-inset-bottom, 0.4rem);
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }
  .nav-links .nav-link,
  .nav-links .btn-admin-nav {
    display: none;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
  color: var(--accent);
}

.mobile-nav-item .m-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.m-donate-highlight {
  color: var(--accent);
}

.m-donate-highlight .m-icon {
  transform: scale(1.15);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7.5rem 1.5rem 4rem;
  background: radial-gradient(circle at 50% 20%, var(--bg-secondary) 0%, var(--bg-primary) 70%);
  text-align: center;
  overflow: hidden;
}

@media (max-width: 600px) {
  .hero-section {
    padding: 6rem 1.25rem 3rem;
    min-height: auto;
  }
}

.hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.05;
  background-image: radial-gradient(var(--text-primary) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 860px;
  z-index: 2;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-subquote {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto 1.25rem;
}

.hero-story {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 740px;
  margin: 0 auto 1.5rem;
  padding: 0.9rem 1.4rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.hero-story p {
  margin: 0.35rem 0;
}

.hero-greeting {
  margin-bottom: 2rem;
}

.greeting-highlight {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 700;
  display: block;
  margin-bottom: 0.4rem;
}

.hero-hope {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-warm);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(196, 85, 43, 0.25);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

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

.btn-block {
  width: 100%;
}

/* Stats */
.hero-stats {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.75rem 2rem;
  box-shadow: var(--shadow-sm);
  gap: 1.75rem;
}

@media (max-width: 600px) {
  .hero-stats {
    padding: 0.6rem 1.25rem;
    gap: 1rem;
  }
}

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

.stat-number {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
}

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

.stat-divider {
  width: 1px;
  height: 26px;
  background: var(--border);
}

/* ==========================================================================
   Gallery Section
   ========================================================================== */
.gallery-section {
  padding: 4rem 1.5rem;
  max-width: 1350px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .gallery-section {
    padding: 2.5rem 1rem;
  }
}

.section-container {
  width: 100%;
}

.gallery-header {
  margin-bottom: 2rem;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 1.75rem;
}

.section-subtitle {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
}

.gallery-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-card);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.control-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

@media (max-width: 768px) {
  .control-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

.control-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  flex-shrink: 0;
  min-width: 55px;
}

.year-tabs,
.album-tabs,
.tag-pills {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 4px;
  width: 100%;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.year-tabs::-webkit-scrollbar,
.album-tabs::-webkit-scrollbar,
.tag-pills::-webkit-scrollbar {
  display: none;
}

.year-tab,
.album-tab {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
  cursor: pointer;
}

.year-tab:hover,
.album-tab:hover {
  background: var(--border-light);
  color: var(--text-primary);
  border-color: var(--accent-light);
}

.year-tab.active,
.album-tab.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.album-tab.album-food-highlight {
  border-color: rgba(196, 85, 43, 0.4);
  color: #c4552b;
  font-weight: 700;
}

.album-tab.album-food-highlight.active {
  background: #c4552b;
  color: #ffffff;
}
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(196, 85, 43, 0.25);
}

.tag-pill {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
}

.tag-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.tag-pill.active {
  background: var(--gold);
  color: #ffffff;
  border-color: var(--gold);
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.25);
}

.lightbox-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.lightbox-tag-badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-tag-badge:hover {
  background: var(--accent);
}

.search-sort-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem;
  min-width: 220px;
  flex: 1;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-box svg {
  color: var(--text-muted);
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.search-box input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  width: 100%;
}

.clear-search-btn {
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 0.2rem;
}

.toolbar-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-sort:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg-card);
}

/* ==========================================================================
   Gallery Grid & Cards (Optimized for Mobile & Desktop)
   - Layout 1: Masonry (Default) - Beautiful rhythmic Pinterest/editorial flow
   - Layout 2: Grid - Uniform 4:3 cells
   ========================================================================== */
.gallery-grid {
  width: 100%;
  margin-top: 1.75rem;
}

/* 1. Masonry Layout Mode */
.gallery-grid.layout-masonry {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .gallery-grid.layout-masonry {
    gap: 1.25rem;
  }
}

@media (min-width: 1100px) {
  .gallery-grid.layout-masonry {
    gap: 1.5rem;
  }
}

.masonry-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

@media (min-width: 640px) {
  .masonry-col {
    gap: 1.25rem;
  }
}

@media (min-width: 1100px) {
  .masonry-col {
    gap: 1.5rem;
  }
}

/* 2. Grid Layout Mode */
.gallery-grid.layout-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .gallery-grid.layout-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 1100px) {
  .gallery-grid.layout-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
  }
}

/* Card Styling */
.photo-card {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.3, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.2s ease;
}

.layout-grid .photo-card {
  aspect-ratio: 4 / 3;
}

.layout-masonry .photo-card {
  /* Natural aspect ratio assigned dynamically via inline style */
  aspect-ratio: auto;
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-border);
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.3, 0, 0.2, 1);
  display: block;
}

.layout-masonry .photo-img {
  height: auto;
}

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

.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(18, 20, 23, 0.88) 0%,
    rgba(18, 20, 23, 0.2) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.85rem;
}

@media (hover: none) {
  /* On touch devices, keep a gentle subtle gradient and always show badge */
  .photo-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(18, 20, 23, 0.75) 0%, transparent 60%);
  }
  .photo-title {
    display: none;
  }
}

.photo-card:hover .photo-overlay {
  opacity: 1;
}

.photo-badge-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.photo-badge {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.photo-comment-badge {
  background: rgba(196, 85, 43, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.photo-info {
  color: #ffffff;
}

.photo-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-meta {
  font-size: 0.75rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Loader & Sentinel */
.gallery-sentinel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 3rem 0 2rem;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 15px rgba(196, 85, 43, 0.25);
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-load-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 85, 43, 0.35);
}

.gallery-progress-info {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

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

.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-top: 2rem;
}

.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Home Main Section (35 Selected Photos) & CTA
   ========================================================================== */
.home-main-section {
  padding: 3.5rem 1.5rem 4.5rem;
  background: var(--bg-primary);
}

.home-main-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.home-main-desc {
  max-width: 600px;
  margin: 0.5rem auto 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}

.home-cta-box {
  margin-top: 4rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.home-cta-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #c4552b 0%, #d4a373 50%, #c4552b 100%);
}

.home-cta-content {
  max-width: 650px;
  margin: 0 auto;
}

.home-cta-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.home-cta-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.home-cta-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

.home-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.gallery-header-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-section {
  padding: 3rem 1.5rem 4rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-container {
  max-width: 900px;
  margin: 0 auto;
}

.about-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 600px) {
  .about-card {
    padding: 1.75rem;
  }
}

.about-tag {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}

.about-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.about-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-text:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Open Letter Section (Thư Ngỏ)
   ========================================================================== */
.letter-section {
  padding: 4rem 1.5rem 5rem;
  max-width: 860px;
  margin: 0 auto;
}

.letter-paper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), 0 12px 40px rgba(0, 0, 0, 0.04);
  padding: 3.5rem 3rem;
  position: relative;
  overflow: hidden;
}

@media (max-width: 600px) {
  .letter-paper {
    padding: 2.25rem 1.35rem;
  }
}

.letter-paper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #c4552b 0%, #d4a373 50%, #c4552b 100%);
}

.letter-stamp-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 1.25rem;
}

.vintage-stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border: 2px dashed var(--accent);
  border-radius: 4px;
  background: var(--bg-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

.letter-date-mark {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.letter-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.letter-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.letter-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.letter-divider {
  width: 50px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto;
  border-radius: 2px;
}

.letter-body {
  font-size: clamp(1.02rem, 1.7vw, 1.15rem);
  line-height: 1.85;
  color: var(--text-primary);
}

.letter-p {
  margin-bottom: 1.35rem;
}

.letter-lead {
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.8;
}

.letter-highlight {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--accent);
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
}

.letter-break {
  text-align: center;
  color: var(--accent);
  opacity: 0.45;
  letter-spacing: 0.5em;
  font-size: 0.9rem;
  margin: 2rem 0;
}

.letter-list {
  list-style: none;
  padding-left: 0.5rem;
  margin-bottom: 1.35rem;
}

.letter-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  color: var(--text-secondary);
}

.letter-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.letter-healing {
  background: var(--bg-secondary);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 1.12rem;
  line-height: 1.75;
  margin: 2rem 0;
}

.letter-healing strong {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 1.22rem;
}

.letter-wish {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.18rem;
  color: var(--text-primary);
  text-align: center;
  margin: 2.25rem 0 1.25rem;
}

.letter-signature-block {
  text-align: right;
  margin: 2rem 0 2rem;
}

.signature-line {
  display: inline-block;
  width: 70px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 0.4rem;
}

.signature-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.signature-role {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.letter-note-box {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  margin-top: 1.75rem;
}

.note-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.note-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.letter-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Donate Section
   ========================================================================== */
.donate-section {
  padding: 5rem 1.5rem;
  max-width: 1050px;
  margin: 0 auto;
}

.donate-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 3rem 2rem;
}

@media (max-width: 600px) {
  .donate-card {
    padding: 2rem 1.25rem;
  }
}

.donate-header {
  text-align: center;
  margin-bottom: 2rem;
}

.donate-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.donate-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
}

.donate-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 820px) {
  .donate-body {
    grid-template-columns: 1.3fr 1fr;
  }
}

.donate-message-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.75rem;
  border-left: 5px solid var(--accent);
}

.quote-symbol {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.3;
  margin-bottom: -1rem;
}

.donate-quote {
  font-size: 1.12rem;
  line-height: 1.8;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 1.25rem;
  font-style: italic;
}

.author-signature {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
}

.donate-qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.qr-frame {
  position: relative;
  background: #ffffff;
  padding: 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  max-width: 250px;
  margin-bottom: 0.85rem;
  transition: var(--transition);
}

.qr-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
}

.qr-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   Food & Coffee Showcase in Donate Section
   ========================================================================== */
.donate-food-showcase {
  margin-top: 2.75rem;
  padding-top: 2.5rem;
  border-top: 1px dashed var(--border);
}

.food-showcase-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.food-showcase-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(196, 85, 43, 0.12);
  color: #c4552b;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.food-showcase-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.food-showcase-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

.food-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 2rem;
}

@media (min-width: 600px) {
  .food-preview-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 900px) {
  .food-preview-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
  }
}

.food-preview-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.3, 0, 0.2, 1), box-shadow 0.3s ease;
}

.food-preview-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

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

.food-preview-card:hover .food-preview-img {
  transform: scale(1.08);
}

.food-preview-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.6rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.95;
}

.food-showcase-footer {
  text-align: center;
}

.btn-show-food-album {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.85rem;
  font-size: 1rem;
  font-weight: 700;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(196, 85, 43, 0.35);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-show-food-album:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 85, 43, 0.45);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.footer-container {
  max-width: 800px;
  margin: 0 auto;
}

.footer-copy {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.footer-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-admin-link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

/* ==========================================================================
   Lightbox Modal with Anonymous Comments Drawer
   ========================================================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 12, 16, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lightbox-layout {
  position: relative;
  z-index: 10;
  width: 96vw;
  max-width: 1350px;
  height: 92vh;
  display: flex;
  gap: 1rem;
}

@media (max-width: 900px) {
  .lightbox-layout {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
}

/* Media View Panel (Left / Main) */
.lightbox-media-panel {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.lightbox-image-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease;
}

.lightbox-loader {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

.lightbox-btn,
.lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-radius: 50%;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 20;
}

.lightbox-btn:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

.lightbox-close {
  top: 1rem;
  left: 1rem;
  width: 42px;
  height: 42px;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
}

@media (max-width: 768px) {
  .lightbox-prev {
    left: 0.3rem;
    width: 38px;
    height: 38px;
  }
  .lightbox-next {
    right: 0.3rem;
    width: 38px;
    height: 38px;
  }
}

.lightbox-toolbar {
  background: rgba(20, 24, 30, 0.85);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.lightbox-album {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
}

.lightbox-title {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.lightbox-details {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.meta-dot {
  opacity: 0.5;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-action {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.btn-action:hover {
  background: var(--accent);
}

.btn-toggle-comments {
  background: rgba(196, 85, 43, 0.8);
}

.comment-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ffffff;
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  padding: 0.15rem 0.4rem;
  line-height: 1;
}

/* Comments Panel (Right Column on Desktop, Slide-up Bottom Sheet on Mobile) */
.lightbox-comments-panel {
  width: 360px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s cubic-bezier(0.3, 0, 0.2, 1);
}

@media (max-width: 900px) {
  .lightbox-comments-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 70vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 30;
    transform: translateY(100%);
  }

  .lightbox-comments-panel.active {
    transform: translateY(0);
  }
}

.comments-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
}

.comments-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comments-title {
  font-size: 1rem;
  font-weight: 700;
}

.comments-badge {
  background: var(--accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
}

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

.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.comment-item {
  display: flex;
  gap: 0.75rem;
  background: var(--bg-secondary);
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  position: relative;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}

.comment-author {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.comment-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.comment-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
  word-break: break-word;
}

.btn-delete-comment {
  color: var(--danger);
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--danger-light);
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-weight: 600;
}

.btn-delete-comment:hover {
  opacity: 0.8;
}

.comments-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-chat-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.comment-form {
  padding: 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.form-group {
  position: relative;
}

.author-input-wrap .input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.author-input-wrap .form-input {
  padding-left: 2.2rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}

.form-textarea {
  resize: none;
}

.btn-submit-comment {
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Admin Modals & Dashboard
   ========================================================================== */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1rem;
}

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

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 12, 16, 0.8);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  z-index: 10;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 450px;
  box-shadow: var(--shadow-lg);
}

.modal-dialog-lg {
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-muted);
}

.modal-header {
  text-align: center;
  margin-bottom: 2rem;
}

.admin-avatar {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.form-error {
  background: var(--danger-light);
  color: var(--danger);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Dashboard Content */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.badge-admin {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
}

.admin-stat-card {
  background: var(--bg-secondary);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  text-align: center;
}

.a-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  text-transform: uppercase;
}

.a-stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
}

.dashboard-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.d-tab {
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.d-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.d-tab-content {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.d-tab-content.active {
  display: block;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.admin-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-secondary);
}

.admin-photo-thumb {
  width: 50px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.btn-danger-sm {
  background: var(--danger-light);
  color: var(--danger);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

.btn-danger-sm:hover {
  background: var(--danger);
  color: #ffffff;
}

.change-pw-form {
  max-width: 400px;
  margin: 1rem auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Tabbed Page Views & Transitions
   ========================================================================== */
.main-content {
  min-height: 85vh;
}

.page-view {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

.page-view.active {
  display: block;
  opacity: 1;
  animation: fadeIn 0.28s ease-out;
}

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

.about-footer-btn {
  margin-top: 1.5rem;
  text-align: center;
}

/* ==========================================================================
   Floating Back To Top Button
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(196, 85, 43, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 95;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-hover);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 24px rgba(196, 85, 43, 0.45);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 5.5rem; /* Above mobile bottom navigation bar */
    right: 1.25rem;
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   TikTok Integration Styles
   ========================================================================== */
.btn-tiktok {
  background: #0f141c;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  text-decoration: none;
}

[data-theme="dark"] .btn-tiktok {
  background: #1c222b;
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-tiktok:hover {
  background: #000000;
  color: #ffffff !important;
  transform: translateY(-2px);
  border-color: rgba(254, 44, 85, 0.5);
  box-shadow: 0 8px 24px rgba(254, 44, 85, 0.25), 0 0 12px rgba(37, 244, 238, 0.2);
}

.btn-tiktok svg {
  transition: transform 0.2s ease;
}

.btn-tiktok:hover svg {
  transform: scale(1.12);
}

.btn-tiktok-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 0.45rem 0.85rem !important;
  text-decoration: none;
  transition: var(--transition);
}

.btn-tiktok-nav:hover {
  color: #fe2c55 !important;
  background: rgba(254, 44, 85, 0.08);
}

.signature-social {
  margin-top: 0.75rem;
}

.letter-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.letter-social-link:hover {
  color: #fe2c55;
  border-color: #fe2c55;
  background: rgba(254, 44, 85, 0.05);
  transform: translateY(-1px);
}

.footer-social-wrap {
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-tiktok-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.35rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: var(--transition);
}

.footer-tiktok-pill:hover {
  border-color: #fe2c55;
  color: #fe2c55;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254, 44, 85, 0.18);
}
