:root {
  --body-bg: #f3f4f6;
  --card-bg: #f7fee7;
  --card-border: #bef264;
  --section-bg: #ffffff;
  --section-border: #e5e7eb;
  --heading-color: #1f2937;
  --text-primary: #4b5563;
  --text-muted: #6b7280;
  --button-bg: #be185d;
  --button-bg-hover: #9d174d;
  --button-text: #ffffff;
  --button-ring: #f472b6;
  --accent-bg: transparent;
  --accent-border: #d4d4d4;
}

body[data-theme="dark"] {
  --body-bg: #0c0c0c;
  --card-bg: #1f1f1f;
  --card-border: #2e2e2e;
  --section-bg: #161616;
  --section-border: #2b2b2b;
  --heading-color: #f5f5f5;
  --text-primary: #e6e6e6;
  --text-muted: #8a8a8a;
  --button-bg: #c3cbd9;
  --button-bg-hover: #dbe4f1;
  --button-text: #0c0c0c;
  --button-ring: #c3cbd9;
  --accent-bg: #1f1f1f;
  --accent-border: #3d3d3d;
}

body[data-theme="christmas"] {
  --body-bg: #26110c;
  --card-bg: #3a1a14;
  --card-border: #fcd34d;
  --section-bg: #2b120f;
  --section-border: #f97316;
  --heading-color: #fef3c7;
  --text-primary: #fef3c7;
  --text-muted: #fcd34d;
  --button-bg: #c53030;
  --button-bg-hover: #9b2c2c;
  --button-text: #fff7ed;
  --button-ring: #fbbf24;
  --accent-bg: rgba(248, 250, 252, 0.08);
  --accent-border: #fbbf24;
}

body {
  background-color: var(--body-bg);
  color: var(--text-primary);
  transition: background-color 0.4s ease, color 0.4s ease;
}

.main-card {
  background-color: var(--card-bg);
  border: 2px solid var(--card-border);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.section-card {
  background-color: var(--section-bg);
  border: 1px solid var(--section-border);
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.3s ease;
}

.text-heading {
  color: var(--heading-color);
}

.text-body {
  color: var(--text-primary);
}

.text-muted {
  color: var(--text-muted);
}

.accent-button {
  background-color: var(--button-bg);
  color: var(--button-text);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.accent-button:hover {
  background-color: var(--button-bg-hover);
}

.accent-button:focus-visible {
  box-shadow: 0 0 0 3px var(--button-ring);
}

.theme-toggle {
  background-color: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--button-ring);
}

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

.gallery-item {
  background-color: var(--section-bg);
  border: 1px solid var(--section-border);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  border-color: var(--button-ring);
  transform: translateY(-2px);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.lg-backdrop {
  background-color: rgba(0, 0, 0, 0.9);
}

.lg-outer .lg-toolbar,
.lg-outer .lg-sub-html {
  background-color: rgba(18, 18, 18, 0.85);
}

.lg-outer .lg-icon,
.lg-outer .lg-sub-html,
.lg-outer .lg-counter {
  color: var(--button-text);
}
