@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Lora:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --bg-dark: #070e0a;
  --forest-green: #112a18;
  --forest-light: #244b2f;
  --wood-brown: #332317;
  --gold: #d4af37;
  --gold-glow: rgba(212, 175, 55, 0.6);
  --text-light: #e6eee8;
  --text-dark: #1a1a1a;
  --nav-bg: rgba(11, 19, 14, 0.85);

  --font-heading: 'Cinzel', serif;
  --font-body: 'Lora', serif;
}

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

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

h1, h2, h3, .cinzel {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold-glow);
}

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

a:hover {
  text-shadow: 0 0 8px var(--gold);
}

/* Global Navigation */
nav {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  padding: 1rem 2rem;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

nav a {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: 2px;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--gold);
  transition: width 0.3s ease;
  box-shadow: 0 0 5px var(--gold);
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

/* Background effects container */
.magical-bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: brightness(0.4) contrast(1.2);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 0%, rgba(7, 14, 10, 0.9) 100%);
  z-index: -1;
  pointer-events: none;
}

/* Mist animation */
.mist {
  position: fixed;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: url('https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog1.png') repeat-x;
  background-size: auto 100%;
  z-index: -1;
  opacity: 0.15;
  animation: drift 60s linear infinite;
  pointer-events: none;
}
.mist.slow {
  background: url('https://raw.githubusercontent.com/danielstuart14/CSS_FOG_ANIMATION/master/fog2.png') repeat-x;
  background-size: auto 100%;
  animation: drift 100s linear infinite;
}

@keyframes drift {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

/* Fireflies / particles */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 10px 2px var(--gold-glow);
  animation: float 4s ease-in-out infinite alternate;
  opacity: 0;
}

@keyframes float {
  0% { transform: translateY(0) scale(0.8); opacity: 0.2; }
  50% { opacity: 0.8; }
  100% { transform: translateY(-20px) scale(1.2); opacity: 0; }
}

/* Main Container */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
  animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

header.hero {
  text-align: center;
  margin-bottom: 4rem;
}

header.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

header.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Cards (Creatures) */
.creature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 2rem;
}

.card {
  background: rgba(36, 75, 47, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s ease;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--gold);
  box-shadow: 0 0 30px var(--gold-glow);
}

.card-img {
  width: 100%;
  height: 250px;
  background-size: cover;
  background-position: center;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
  transition: all 0.4s ease;
}

.card:hover .card-img {
  filter: brightness(1.2) contrast(1.1);
}

.card-content {
  padding: 1.5rem;
  text-align: center;
}

.card-content h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Creature Specific Pages */
.creature-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.creature-header img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  box-shadow: 0 0 20px var(--gold-glow);
}

.content-box {
  background: rgba(17, 42, 24, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
  margin-bottom: 2rem;
}

.content-box p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* Mini-games */
.game-container {
  text-align: center;
  padding: 3rem;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.btn-magic {
  background: linear-gradient(45deg, var(--wood-brown), var(--forest-light));
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  padding: 1rem 2rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
  text-transform: uppercase;
  margin-top: 2rem;
}

.btn-magic:hover {
  background: linear-gradient(45deg, var(--forest-light), var(--wood-brown));
  box-shadow: 0 0 20px var(--gold-glow);
  transform: scale(1.05);
  color: #fff;
}

.audio-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(11, 19, 14, 0.8);
  border: 1px solid var(--gold);
  color: var(--gold);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
}

.audio-btn:hover {
  box-shadow: 0 0 15px var(--gold-glow);
  transform: scale(1.1);
}

/* Page transitions overlay wrapper */
.page-transition {
  animation: pageFade 0.6s ease-in-out;
}

@keyframes pageFade {
  0% { opacity: 0; filter: blur(5px); }
  100% { opacity: 1; filter: blur(0); }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
  }
  .creature-header {
    flex-direction: column;
    text-align: center;
  }
  header.hero h1 {
    font-size: 2.5rem;
  }
}

/* Fellowship Team Cards */
.fellowship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.fellowship-card {
  background: rgba(17, 42, 24, 0.8);
  border: 2px solid var(--wood-brown);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.6);
  transition: all 0.4s ease;
}

.fellowship-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
  box-shadow: 0 0 20px var(--gold-glow);
}

.avatar-wrapper {
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 3px dashed var(--gold);
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.4);
  font-size: 2.5rem;
  color: var(--text-muted);
}

.fellowship-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
  color: var(--gold);
}

.fellowship-card .role {
  font-size: 0.9rem;
  color: #a4d4b4;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.btn-portfolio {
  display: inline-block;
  background: var(--nav-bg);
  border: 1px solid var(--gold);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.btn-portfolio:hover {
  background: var(--gold);
  color: var(--bg-dark);
  box-shadow: 0 0 10px var(--gold-glow);
}
