:root {
  /* Font Scaling */
  --font-base: 16px;
  --font-scale: 1;

  /* Theme Variables - Default: Dark Mode Sky Blue */
  --bg-color: #0f172a;
  --text-color: #e2e8f0;
  --container-bg: #1e293b;
  --primary-color: #38bdf8; /* Sky Blue */
  --secondary-color: #0ea5e9;
  --accent-color: #7dd3fc;
  --border-color: #334155;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --btn-bg: #334155;
  --btn-text: #f8fafc;
  --btn-hover: #475569;
  --link-color: #38bdf8;
  --link-hover: #7dd3fc;
}

/* Light Theme Sky Blue */
[data-theme="light-sky-blue"] {
  --bg-color: #f0f9ff;
  --text-color: #0f172a;
  --container-bg: #ffffff;
  --primary-color: #0284c7;
  --secondary-color: #0ea5e9;
  --accent-color: #bae6fd;
  --border-color: #e0f2fe;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --btn-bg: #e0f2fe;
  --btn-text: #0c4a6e;
  --btn-hover: #bae6fd;
  --link-color: #0369a1;
  --link-hover: #0284c7;
}

/* Dark Theme - Midnight */
[data-theme="dark-midnight"] {
  --bg-color: #000000;
  --text-color: #cccccc;
  --container-bg: #1a1a1a;
  --primary-color: #6a0dad;
  --secondary-color: #8a2be2;
  --link-color: #9370db;
}

/* Dark Theme - Charcoal */
[data-theme="dark-charcoal"] {
  --bg-color: #2c2c2c;
  --text-color: #dddddd;
  --container-bg: #3a3a3a;
  --primary-color: #ff5722;
  --link-color: #ffab91;
}

/* Dark Theme - Deep Purple */
[data-theme="dark-purple"] {
  --bg-color: #240046;
  --text-color: #e0aaff;
  --container-bg: #3c096c;
  --primary-color: #9d4edd;
  --link-color: #c77dff;
}

/* Light Theme - Paper */
[data-theme="light-paper"] {
  --bg-color: #f5f5dc;
  --text-color: #333333;
  --container-bg: #fff8dc;
  --primary-color: #8b4513;
  --link-color: #a0522d;
}

/* Light Theme - Cream */
[data-theme="light-cream"] {
  --bg-color: #fffdd0;
  --text-color: #555555;
  --container-bg: #ffffff;
  --primary-color: #d4a017;
  --link-color: #b8860b;
}

/* Light Theme - Mint */
[data-theme="light-mint"] {
  --bg-color: #e0fff4;
  --text-color: #004d40;
  --container-bg: #ffffff;
  --primary-color: #00796b;
  --link-color: #00695c;
}

html {
  font-size: calc(var(--font-base) * var(--font-scale));
  scroll-behavior: smooth;
}

body {
  font-family: 'Lato', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Layout Containers */
.main-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}

.content-box {
  background-color: var(--container-bg);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 10px 25px var(--shadow-color);
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px); /* Glassmorphism hint */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Gabriela', serif;
  color: var(--primary-color);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; text-align: center; text-shadow: 1px 1px 3px rgba(0,0,0,0.3); }
h2 { font-size: 1.8rem; border-bottom: 2px solid var(--border-color); padding-bottom: 0.5rem; }
p { font-size: 1.1rem; margin-bottom: 1rem; text-align: justify; }
li { font-size: 1.1rem; margin-bottom: 0.5rem; }

a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Title Bar */
.title-bar {
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1rem;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 15px var(--shadow-color);
}

.title-bar img {
  width: 100%;
  height: auto; /* Responsive */
  max-height: 400px;
  object-fit: cover;
  display: block;
}

.title-text {
  padding: 3rem 1rem;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.title-text h1 { color: white; margin: 0; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }

/* Description */
.page-description {
  text-align: center;
  font-style: italic;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  color: var(--text-color);
  opacity: 0.9;
}

/* Control Bar */
.control-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  background: var(--container-bg);
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px var(--shadow-color);
}

.control-btn {
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform 0.1s, background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  box-shadow: 0 2px 4px var(--shadow-color);
}

.control-btn:hover {
  background-color: var(--btn-hover);
  transform: translateY(-2px);
}

.control-btn:active {
  transform: translateY(0);
}

/* Local Menu */
.local-menu-container {
  position: relative;
  display: inline-block;
}

.local-menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0; /* Or left depending on preference */
  background-color: var(--container-bg);
  min-width: 200px;
  box-shadow: 0 8px 16px var(--shadow-color);
  z-index: 1000;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.local-menu-dropdown a {
  color: var(--text-color);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 1rem;
  transition: background 0.2s;
}

.local-menu-dropdown a:hover {
  background-color: var(--btn-hover);
}

.show-menu {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Exhortation Box (from original) */
.exhortation {
  background-color: rgba(56, 189, 248, 0.1); /* Transparent primary */
  border-left: 5px solid var(--primary-color);
  padding: 1.5rem;
  margin-top: 2rem;
  border-radius: 0 1rem 1rem 0;
  font-weight: 500;
}

/* Helper Classes */
.text-center { text-align: center; }
.hidden { display: none; }

/* Responsive */
@media (max-width: 600px) {
  .main-container { padding: 0.5rem; }
  .content-box { padding: 1rem; }
  h1 { font-size: 2rem; }
  .control-bar { gap: 0.5rem; }
  .control-btn { padding: 0.4rem 0.8rem; font-size: 1rem; }
}
