@charset "UTF-8";
@import "variables.css";

/* ============================================================
   Retro 8-Bit Theme — Adventurers League Index (Tavern / Guild Roster)
   Inspired by Final Fantasy & The Legend of Zelda (NES)
   ============================================================ */

/* 2. Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 3. Global Page Layout: Tiled NES Overworld */
html {
  box-sizing: border-box;
  background-image: url("bg_retro.png");
  background-repeat: repeat;
  background-size: 64px 64px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  font-family: var(--font-body);
  color: var(--color-nes-white);
  -webkit-font-smoothing: none;
  font-smooth: never;
  text-rendering: geometricPrecision;
}

body {
  margin: 0;
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 4. Navigation Bar */
.nav {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto 1.25rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  position: relative;
  z-index: 100;
}

.nav a {
  width: 52px;
  height: 52px;
  display: inline-block;
  cursor: pointer;
  background: center/contain no-repeat;
  background-color: var(--nav-btn-bg);
  border: 3px solid var(--nav-btn-border);
  outline: none;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.6));
  border-radius: 50%;
  position: relative;
  z-index: 101;
  transition: transform 0.12s ease, border-color 0.12s ease, filter 0.12s ease;
}

.nav a:hover,
.nav a:focus {
  transform: translateY(-2px);
  border-color: var(--nav-btn-border-hover);
  filter: drop-shadow(0 0 6px rgba(248, 184, 0, 0.8)) drop-shadow(0 4px 4px rgba(0, 0, 0, 0.7));
  z-index: 102;
}

.nav .home {
  background-image: url("homebutton.png");
}

.nav .up {
  background-image: url("upbutton.png");
}
.nav a:hover::before,
.nav a:focus::before {
  content: "";
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 6px 7px 6px;
  border-style: solid;
  border-color: transparent transparent var(--nav-btn-border-hover) transparent;
  pointer-events: none;
  z-index: 1001;
}

.nav a:hover::after,
.nav a:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--color-nes-gold);
  background-color: var(--color-nes-blue-dark);
  border: 2px solid var(--nav-btn-border-hover);
  outline: 2px solid var(--color-nes-black);
  padding: 5px 9px;
  border-radius: 0;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1000;
  text-shadow: 1px 1px 0 #000;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.7);
}

/* 5. Dialogue Window: The Tavern / Guild Roster Box */
#adventurers-league {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;

  /* Classic Final Fantasy Dialog Window Gradient */
  background: linear-gradient(
    180deg,
    var(--color-nes-blue-top) 0%,
    var(--color-nes-blue-mid) 50%,
    var(--color-nes-blue-dark) 100%
  );

  /* NES Pixel Window Frame: Double border with dark outline */
  border: 4px solid var(--color-nes-white);
  outline: 4px solid var(--color-nes-black);
  box-shadow:
    inset 0 0 0 4px var(--color-nes-black),
    0 8px 0 rgba(0, 0, 0, 0.55);
}

/* Guild Roster Top Emblem */
#adventurers-league::before {
  content: var(--content-guild-roster);
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--color-nes-cyan);
  letter-spacing: 3px;
  margin-bottom: 1.25rem;
  text-shadow: 2px 2px 0 var(--color-nes-black);
  text-align: center;
}

/* Heading: Title */
h1.area-title {
  font-family: var(--font-pixel);
  font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  color: var(--color-nes-gold);
  text-shadow: 3px 3px 0 var(--color-nes-black);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  margin: 0 auto 1.25rem;
  line-height: 1.4;
}

/* Subtitle paragraph */
#adventurers-league > p {
  font-family: var(--font-body);
  font-size: 1.35rem;
  line-height: 1.5;
  color: #d0d8e8;
  margin: 0 auto 1.5rem;
  max-width: 32rem;
  text-shadow: 1px 1px 0 var(--color-nes-black);
}

#adventurers-league > p a {
  color: var(--color-nes-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.1s ease;
}

#adventurers-league > p a:hover {
  color: var(--color-nes-gold);
}

/* 8-bit Dotted Gold Divider */
hr {
  border: none;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--color-nes-gold) 0,
    var(--color-nes-gold) 8px,
    transparent 8px,
    transparent 16px
  );
  margin: 1.5rem auto 2rem;
  width: 85%;
}

/* 6. Character Roster (Party Selection Menu) */
div.index {
  margin-top: 1rem;
}

div.index ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  width: 100%;
}

div.index ul li {
  width: 100%;
  max-width: 30rem;
}

div.index ul li a,
div.index ul li a:visited {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem 1.5rem;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--color-nes-white);
  text-decoration: none;
  background: var(--color-nes-blue-dark);
  border: 3px solid var(--color-nes-white);
  outline: 3px solid var(--color-nes-black);
  box-shadow:
    inset 0 0 0 2px var(--color-nes-black),
    0 5px 0 rgba(0, 0, 0, 0.6);
  position: relative;
  transition: all 0.1s ease;
  text-shadow: 1px 1px 0 var(--color-nes-black);
}

div.index ul li a:hover,
div.index ul li a:focus {
  background: #1024a8;
  border-color: var(--color-nes-gold);
  color: var(--color-nes-gold);
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 2px var(--color-nes-black),
    0 7px 0 rgba(0, 0, 0, 0.7);
}

div.index ul li a:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 0 0 2px var(--color-nes-black),
    0 2px 0 rgba(0, 0, 0, 0.5);
}

/* Blinking 8-Bit Menu Cursor on Hover */
@keyframes retroBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

div.index ul li a:hover::before,
div.index ul li a:focus::before {
  content: var(--content-cursor);
  color: var(--color-nes-gold);
  margin-right: 0.5rem;
  animation: retroBlink 0.6s steps(1) infinite;
}

/* 7. Bottom Status Indicator */
#adventurers-league::after {
  content: var(--tagline);
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--color-nes-cyan);
  letter-spacing: 2px;
  margin-top: 2.25rem;
  text-shadow: 1px 1px 0 var(--color-nes-black);
  text-align: center;
}

/* 8. Mobile Responsiveness */
@media (max-width: 600px) {
  body {
    padding: 1.5rem 0.75rem;
  }

  #adventurers-league {
    padding: 1.75rem 1.25rem;
  }

  h1.area-title {
    font-size: 1.1rem;
    line-height: 1.5;
  }

  #adventurers-league > p {
    font-size: 0.65rem;
  }

  div.index ul li a {
    font-size: 0.75rem;
    padding: 0.85rem 1rem;
  }

  #adventurers-league::after {
    font-size: 0.55rem;
  }
}
