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

/* ---------- GLOBAL ---------- */
body {
  font-family: "Crimson Text", serif;
  background: linear-gradient(135deg, #2c1810 0%, #1a0f08 50%, #0f0704 100%);
  color: #e8dcc0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* soft light “spots” used in the session page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(139, 69, 19, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(184, 134, 11, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(160, 82, 45, 0.05) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: -1;
}

a {
  color: #a0522d;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #d4af37;
}

/* ---------- PARCHMENT WRAPPER ---------- */
.parchment {
  max-width: 1100px;
  margin: 2rem auto;
  background: linear-gradient(135deg, #f4f1e8 0%, #e8dcc0 100%);
  color: #3a2817;
  border-radius: 15px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 3px rgba(255, 255, 255, 0.3), 0 0 30px rgba(184, 134, 11, 0.2);
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-5px) rotate(0.5deg);
  }
}
.parchment::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(139, 69, 19, 0.02) 2px,
    rgba(139, 69, 19, 0.02) 4px
  );
  pointer-events: none;
}

/* ---------- HEADER ---------- */
header {
  background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
  color: #f4f1e8;
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
}
header::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 80%;
  height: 10px;
  transform: translateX(-50%);
  background: linear-gradient(to right, transparent, #8b4513, transparent);
  border-radius: 0 0 10px 10px;
}
header h1 {
  font-family: "Cinzel", serif;
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ---------- NAVIGATION ---------- */
nav {
  background: #d9c89b;
  padding: 0.8rem 1rem;
  text-align: center;
}
nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  list-style: none;
}
nav a {
  font-weight: 600;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
}
nav a:hover {
  background: #f5f0d8;
}

/* ---------- NEW SITE LINK ---------- */
#new-site-link a {
  background-color: #d4af37; /* Gold color */
  color: #3a2817; /* Dark brown text */
  font-weight: bold;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 10px 20px rgba(212, 175, 55, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
  }
}

/* ---------- ANNOUNCEMENT ---------- */
.announcement-section {
  background: #fdf8e1;
  border: 3px dashed #d4af37;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  animation: shake 5s infinite;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

.announcement-section h2 {
  color: #a0522d;
  text-align: center;
}

/* ---------- SECTION HEADERS ---------- */
h2 {
  font-family: "Cinzel", serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #8b4513;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #d4af37;
  position: relative;
}
h2::after {
  content: "⚔️";
  position: absolute;
  top: 0;
  right: 0;
  font-size: 1.2rem;
}

main {
  padding: 2.5rem;
  line-height: 1.7;
}

/* ---------- CHARACTER CARDS ---------- */
.character-cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 1.5rem;
}
.character-card {
  background: linear-gradient(135deg, #f9f6f0 0%, #f0ead6 100%);
  padding: 1.5rem;
  border: 2px solid #d4af37;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}
.character-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}
.character-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}
.character-card h3 {
  color: #8b4513;
  margin-bottom: 0.3rem;
}
.character-card p {
  font-size: 0.9rem;
  color: #5d4037;
  text-align: justify;
}

/* ---------- SEARCH ---------- */
#searchInput {
  width: 100%;
  max-width: 500px;
  padding: 0.6rem 0.8rem;
  border: 2px solid #d4af37;
  border-radius: 6px;
  font-family: inherit;
  margin-bottom: 1rem;
}
#searchResults ul {
  list-style: none;
  margin-top: 0.5rem;
}
#searchResults li {
  margin: 0.3rem 0;
}
.section-tag {
  font-size: 0.75rem;
  color: #8b4513;
  margin-left: 0.4rem;
}

/* ---------- TABLES ---------- */
.glossary-tables-container {
  margin-top: 1.5rem;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
th,
td {
  border: 1px solid #d4af37;
  padding: 0.4rem 0.6rem;
}
th {
  background: #e8dcc0;
  color: #3a2817;
  font-weight: 600;
}

/* ---------- FOOTER ---------- */
footer {
  background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
  color: #f4f1e8;
  text-align: center;
  padding: 1.5rem;
  font-style: italic;
  border-top: 2px solid #d4af37;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .parchment {
    margin: 1rem;
  }
  header h1 {
    font-size: 2rem;
  }
  main {
    padding: 1.5rem;
  }
}
