:root {
  --background: #3e2f25;
  --dossier: #5a3e36;
  --text-main: #f2e6d8;
  --accent: #b78c4d;
  --name-color: #4e0505;
  --footer-color: #000000;
  --runes: #fbdd7a;
  --hover-glow: #8d0303;
}

/* Base Styles */
body {
  margin: 0;
  font-family: 'MedievalSharp', serif;
  color: var(--text-main);
  background-color: var(--background);
  background-image: url('../images/character-bg2.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Banner */
.banner-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 24px 0;
  position: relative;
  background-image: url('../images/character-bg3.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  overflow: hidden;
}

.banner-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1;
  animation: bannerGlow 4s infinite alternate;
}

.banner {
  width: 95%;
  max-width: 1200px;
  border-radius: 12px;
  border: 2px solid var(--accent);
  box-shadow: 0 8px 40px rgba(190,128,83,0.6);
  position: relative;
  z-index: 2;
}

@keyframes bannerGlow {
  0%, 100% { background: rgba(0,0,0,0.25); filter: brightness(1); }
  25% { background: rgba(0,0,0,0.28); filter: brightness(1.02); }
  50% { background: rgba(0,0,0,0.22); filter: brightness(1.05); }
  75% { background: rgba(0,0,0,0.27); filter: brightness(1.03); }
}

/* Scroll Nav */
.scroll-banner {
  width: 100%;
  background: linear-gradient(to bottom, var(--background), var(--accent));
  padding: 16px 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  box-sizing: border-box;
}

.scroll-banner ul {
  list-style: none;
  margin: 0;
  padding: 0 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center; 
  gap: 16px;
}

.scroll-banner a {
  font-family: 'Cinzel Decorative', serif;
  color: var(--text-main);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  text-decoration: none;
  white-space: nowrap;
}

.scroll-banner a:hover { color: var(--hover-glow); }

.rune {
  font-family: 'Uncial Antiqua', serif;
  color: var(--runes);
  font-size: clamp(1rem,1.5vw,1.2rem);
  padding: 0 4px;
  opacity: 0.9;
  white-space: nowrap;
}

body, html { overflow-x: hidden; }

/* Scene Wrapper */
.scene-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 80vh;
}

.background-box {
  position: relative;
  width: 95%;
  max-width: 1300px;
  aspect-ratio: 16/9;
  margin: 3vh auto;
  border: 0.3vw solid var(--accent);
  border-radius: 0.5vw;
  overflow: hidden;
  box-shadow: 0 0 2vw #000;
}

.background-box .background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Dossier Container */
.dossier-container {
  position: absolute;
  top: 5%;
  left: 2%;
  width: 32%;
  max-width: 400px;
  height: 90%;
  background-color: rgba(90,62,54,0.95);
  border: 0.2vw solid var(--accent);
  padding: 1.5%;
  border-radius: 0.4vw;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 0 2vw var(--accent), 0 0 4vw rgba(255,180,100,0.6), inset 0 0 2vw rgba(255,200,120,0.3);
  animation: candleFlicker 3s infinite alternate;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2vh;
  box-sizing: border-box;
}

/* Character Cards */
.character {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 1vh 1vw;
  width: 100%;
  box-sizing: border-box;
}

.character-portrait {
  width: 100%;
  max-width: 150px;
  height: auto;
  border-radius: 6px;
  margin-bottom: 1vh;
}

.character-name {
  font-family: 'UnifrakturCook', cursive;
  font-size: clamp(1.5em,2.5vw,2.2em);
  margin-bottom: 1vh;
  color: var(--name-color);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  word-wrap: break-word;
}

.character p {
  font-size: clamp(0.95em,1.2vw,1em);
  line-height: 1.5;
  margin: 0.5vh 0;
  word-wrap: break-word;
}

/* Dossier Footer */
.dossier-footer {
  margin-top: 3vh;
  font-style: italic;
  font-size: 0.95em;
  color: var(--footer-color);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  text-align: center;
}

.confidential {
  margin-top: 1vh;
  font-weight: bold;
  color: var(--footer-color);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

/* Responsive */
@media (max-width: 1200px) {
  .dossier-container { width: 35%; max-width: 350px; }
  .character-portrait { max-width: 130px; }
}

@media (max-width: 800px) {
  .dossier-container { width: 45%; max-width: 300px; }
  .character-portrait { max-width: 120px; }
  .character-name { font-size: 1.6em; }
  .character p { font-size: 0.95em; }
}

@media (max-width: 500px) {
  .dossier-container { width: 70%; left: 15%; top: 5%; height: 80%; }
  .character-portrait { max-width: 100px; }
  .character-name { font-size: 1.4em; }
  .character p { font-size: 0.85em; }
}

/* Mobile */
@media(max-width:600px) {
  .dossier-container {
    width: 90%;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    height: 70%;
    padding: 1%;
    font-size: 0.9em;
  }
  .character-name { font-size:1.5em; }
}

/* Site Footer */
.site-footer {
  width: 100%;
  text-align: center;
  padding: 20px;
  color: #d4af37;
  background-color: #0f0f0f;
  font-family: 'MedievalSharp', Georgia, serif;
}