/* ==========================================================================
   TAVERN & PORTAL FANTASY THEME
   ========================================================================== */

:root {
  --bg-dark: #0c0806;
  --bg-surface: #17100b;
  --bg-surface-elevated: #221812;
  --bg-card: rgba(26, 18, 12, 0.85);
  --border-gold: #c59b27;
  --border-subtle: #3a271b;
  --text-main: #e8dccb;
  --text-muted: #a89a88;
  --text-gold: #f3c258;
  --flame-bright: #ff9d00;
  --flame-core: #ff4500;
  --accent-red: #8b0000;
  --accent-green: #2e7d32;
  --shadow-warm: 0 4px 20px rgba(255, 115, 0, 0.15);
  --font-heading: 'Cinzel', serif;
  --font-body: 'Lora', serif;
  --font-tavern: 'MedievalSharp', cursive, serif;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--text-gold);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(243, 194, 88, 0.6);
}

/* Header & Navigation */
header.tavern-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 8, 6, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 6px var(--flame-bright));
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-gold);
}

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

nav.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  border: 1px solid transparent;
}

nav.nav-links a.active,
nav.nav-links a:hover {
  border-color: var(--border-gold);
  background: rgba(197, 155, 39, 0.1);
  color: #fff;
}

.audio-control-btn {
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--text-gold);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.audio-control-btn:hover {
  background: var(--border-gold);
  color: #000;
}

/* Fireplace Hero Section */
.fireplace-hero {
  position: relative;
  min-height: 65vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 1.5rem;
  overflow: hidden;
  border-bottom: 2px solid var(--border-subtle);
  background: radial-gradient(circle at center bottom, rgba(74, 28, 9, 0.6) 0%, rgba(12, 8, 6, 0.95) 70%);
}

#fire-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
  z-index: 1;
}

.hearth-vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(12, 8, 6, 0.8) 85%, #0c0806 100%);
  pointer-events: none;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
}

.hero-subtitle {
  font-family: var(--font-tavern);
  font-size: 1.5rem;
  color: var(--flame-bright);
  text-shadow: 0 0 10px rgba(255, 157, 0, 0.6);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 115, 0, 0.4);
  margin-bottom: 1.25rem;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 2rem;
}

.cta-button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, #c59b27 0%, #9e7917 100%);
  color: #0c0806;
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 0.85rem 1.85rem;
  border-radius: 4px;
  font-size: 1rem;
  letter-spacing: 1px;
  border: 1px solid #ffd700;
  box-shadow: 0 4px 15px rgba(197, 155, 39, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(243, 194, 88, 0.6);
  color: #000;
}

.btn-secondary {
  background: rgba(34, 24, 18, 0.8);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0.85rem 1.85rem;
  border-radius: 4px;
  font-size: 1rem;
  letter-spacing: 1px;
  border: 1px solid var(--border-gold);
}

.btn-secondary:hover {
  background: rgba(197, 155, 39, 0.15);
  color: #fff;
  transform: translateY(-2px);
}

/* Main Container */
main.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  flex: 1;
  width: 100%;
}

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

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--text-gold);
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--border-gold), transparent);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

/* Campaign Grid Cards */
.campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.campaign-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.campaign-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(255, 157, 0, 0.15);
}

.card-banner {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.card-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-surface) 5%, transparent 80%);
}

.badge-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  background: rgba(12, 8, 6, 0.85);
  border: 1px solid var(--border-gold);
  color: var(--text-gold);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.badge-tag.live {
  border-color: #4caf50;
  color: #81c784;
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
  gap: 0.5rem;
}

.btn-foundry-quick {
  background: var(--flame-core);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-foundry-quick:hover {
  background: var(--flame-bright);
  color: #000;
  box-shadow: 0 0 10px var(--flame-bright);
}

/* Lore Wiki Styles */
.wiki-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
}

.wiki-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 5.5rem;
}

.wiki-search {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-main);
  font-family: var(--font-body);
  margin-bottom: 1.25rem;
}

.wiki-search:focus {
  outline: none;
  border-color: var(--border-gold);
}

.wiki-category-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 1rem 0 0.5rem;
}

.wiki-nav-list {
  list-style: none;
}

.wiki-nav-list li {
  margin-bottom: 0.4rem;
}

.wiki-nav-list a {
  color: var(--text-muted);
  font-size: 0.95rem;
  display: block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.wiki-nav-list a:hover,
.wiki-nav-list a.active {
  color: #fff;
  background: rgba(197, 155, 39, 0.15);
  border-left: 2px solid var(--border-gold);
}

.wiki-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2.5rem;
}

.wiki-article {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.wiki-article:last-child {
  border-bottom: none;
}

.wiki-article h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  color: var(--text-gold);
  margin-bottom: 0.75rem;
}

.wiki-article h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: #fff;
  margin: 1.25rem 0 0.5rem;
}

.wiki-article p {
  margin-bottom: 1rem;
  color: var(--text-main);
}

.wiki-stat-box {
  background: var(--bg-surface-elevated);
  border-left: 4px solid var(--border-gold);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 4px 4px 0;
}

/* Footer */
footer.tavern-footer {
  background: #080504;
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 850px) {
  .wiki-layout {
    grid-template-columns: 1fr;
  }
  .wiki-sidebar {
    position: static;
  }
  .hero-title {
    font-size: 2.4rem;
  }
  header.tavern-nav {
    flex-direction: column;
    gap: 1rem;
  }
}
