/* DMH-Online Dark Fantasy Theme - Main Stylesheet */

:root {
  --bg-dark: #0a0a0f;
  --bg-card: #12121c;
  --bg-card-hover: #1a1a2e;
  --border-gold: #8b6914;
  --gold: #d4a843;
  --gold-light: #f0d78c;
  --text-primary: #e8dcc8;
  --text-secondary: #9a8e7a;
  --accent-red: #8b1a1a;
  --accent-green: #2d5a27;
  --glow-gold: rgba(212, 168, 67, 0.3);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: 'Crimson Text', Georgia, serif;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(139, 105, 20, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 26, 26, 0.04) 0%, transparent 50%);
}

/* Top decorative border */
.top-border {
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Header */
header {
  text-align: center;
  padding: 3rem 1rem 2rem;
  position: relative;
}

header::after {
  content: '';
  display: block;
  width: 60%;
  max-width: 500px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 2rem auto 0;
}

.logo {
  font-family: 'Cinzel', serif;
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 20px var(--glow-gold), 0 2px 4px rgba(0,0,0,0.8);
  letter-spacing: 0.15em;
  margin-bottom: 0.25rem;
}

.logo-link { text-decoration: none; }
.logo-link:hover .logo { color: var(--gold-light); }

.logo-subtitle {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* Navigation */
nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}

nav a {
  font-family: 'Cinzel', serif;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
}

nav a:hover {
  color: var(--gold);
  border-color: var(--border-gold);
  background: rgba(139, 105, 20, 0.1);
  text-shadow: 0 0 8px var(--glow-gold);
}

nav a.active {
  color: var(--gold-light);
  border-color: var(--border-gold);
  background: rgba(139, 105, 20, 0.15);
}

/* Main content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

.section-divider {
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 2rem;
}

/* Hero / Welcome */
.hero {
  text-align: center;
  padding: 3rem 2rem;
  margin-bottom: 3rem;
  background: linear-gradient(180deg, rgba(18, 18, 28, 0.8), transparent);
  border-radius: 8px;
  border: 1px solid rgba(139, 105, 20, 0.15);
}

.hero h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 400;
}

.hero p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid rgba(139, 105, 20, 0.15);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(139, 105, 20, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--glow-gold);
}

.card:hover::before { opacity: 1; }

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.card h3 {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.08em;
}

.card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.card a.card-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--gold);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.card a.card-link:hover {
  border-bottom-color: var(--gold);
}

/* Tools section */
.tools-section { margin-top: 2rem; }

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

.tool-btn {
  background: rgba(139, 105, 20, 0.08);
  border: 1px solid rgba(139, 105, 20, 0.2);
  color: var(--text-primary);
  padding: 1rem;
  border-radius: 6px;
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
  text-align: center;
}

.tool-btn:hover {
  background: rgba(139, 105, 20, 0.2);
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 0 15px var(--glow-gold);
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 1rem;
  border-top: 1px solid rgba(139, 105, 20, 0.15);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

footer a {
  color: var(--gold);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Global link styling - bright gold for visibility on dark backgrounds */
a:not(nav a):not(.logo-link) {
  color: #f0d78c; /* var(--gold-light) - bright yellow-gold */
  text-decoration: none;
  transition: all 0.3s ease;
}

a:not(nav a):not(.logo-link):hover {
  color: #fff8dc; /* Even brighter on hover */
  text-shadow: 0 0 8px rgba(240, 215, 140, 0.5);
}

/* Tool buttons and card links use their own styles but ensure visibility */
.tool-btn {
  color: #f0d78c !important; /* Bright gold for visibility */
}

.tool-btn:hover {
  color: #fff8dc !important;
}

.card-link {
  color: #f0d78c !important;
}

.card-link:hover {
  color: #fff8dc !important;
}

/* Responsive */
@media (max-width: 768px) {
  .logo { font-size: 2.2rem; letter-spacing: 0.1em; }
  nav a { padding: 0.5rem 0.8rem; font-size: 0.75rem; }
  .hero { padding: 2rem 1rem; }
  main { padding: 1rem 1rem 3rem; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-gold); border-radius: 4px; }

/* Data tables (cities page) */
.data-table {
  border-collapse: collapse;
  width: 100%;
}

.data-table th {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--border-gold);
}

.data-table td {
  vertical-align: top;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.data-table tbody tr {
  border-bottom: 1px solid rgba(139, 105, 20, 0.15);
}

.data-table tbody tr:hover {
  background: rgba(139, 105, 20, 0.05);
}

/* Two-column grid (regions page thumbnails) */
.two-col-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 600px;
  margin: 0 auto;
}

.two-col-grid a img {
  border-radius: 4px;
  transition: all 0.3s ease;
  opacity: 0.85;
}

.two-col-grid a:hover img {
  opacity: 1;
  box-shadow: 0 0 12px var(--glow-gold);
}

.small-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
  margin-top: 0.25rem;
}

/* Muted text utility */
.muted {
  color: var(--text-secondary);
}
