/*—— Vars & Reset poo ——*/
:root {
  --gradient: linear-gradient(120deg, #78991D, #900103);
  --card-bg: rgba(0, 0, 0, 0.75);
  --modal-bg: rgba(0, 0, 0, 0.85);
  --accent: #7C675F;
  --white: #fff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--gradient);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/*—— Header & Nav ——*/
header {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000; /* fine to keep this high, just less than modal */
}


nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links button {
  position: relative;
  background: transparent;
  border: 2px solid var(--accent);
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  transition: background 0.3s;
}

.nav-links button::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.nav-links button:hover,
.nav-links button.active {
  background: var(--accent);
  color: #000;
}

.nav-links button:hover::after,
.nav-links button.active::after {
  transform: scaleX(1);
}

/*—— Main & Sections ——*/
main {
  flex: 1;
  max-width: 1200px;
  margin: 2rem auto;
  width: 90%;
}

section {
  display: none;
}

section.active {
  display: block;
}


/*—— Character Cards ——*/
#characters .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  display: block;
}

.card h3 {
  padding: 0.75rem;
  font-size: 1.1rem;
  background: rgba(0, 0, 0, 0.6);
}

.pronounce-example {
  font-style: italic;
  margin-top: 0.5em;
  font-size: 0.9em;
}

.character-credit {
  text-align: center;
  font-size: 0.85em;
  margin: 0.5em 0;
  color: #666;
}
/*—— Modal ——*/
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--modal-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 9999; /* very high to sit above everything */
}


.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--card-bg);
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  padding: 1.5rem;
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.3s;
  max-height: 80vh;
  overflow-y: auto;

}

.modal.open .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--accent);
  cursor: pointer;
}

.modal-content img {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* Site Title */
.site-title {
  text-align: center;
  font-size: 3rem;
  margin-top: 1rem;
  color: #f5f5f5;
}

/* Meta Info Section */
.meta-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 2rem auto;
  max-width: 1200px;
}

.version-box,
.updates-box {
  flex: 1 1 300px;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.version-box {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: #ecf0f1;
}

.updates-box {
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  color: #fdfefe;
}

.updates-box ul {
  list-style: none;
  padding-left: 0;
}

.updates-box li {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  position: relative;
}

.updates-box li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #ffd700;
}

/* GIF Banner */
.gif-banner {
  margin: 3rem auto;
  text-align: center;
}

.gif-banner img {
  width: 100%;
  max-width: 1500px;
  height: auto;
  max-height: 1000px;
  border-radius: 12px;
}

/* Honorary Members Section */
.honorary-members {
  margin: 4rem auto;
  padding: 2rem;
  background: linear-gradient(to right, #222, #333);
  border-radius: 12px;
  color: #f0f0f0;
  text-align: center;
  max-width: 1200px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.honorary-members h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.honorary-intro {
  font-style: italic;
  margin-bottom: 2rem;
  color: #ccc;
}

/* Member Grid */
.member-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.member-card {
  width: 250px;
  background-color: #444;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  transition: transform 0.3s ease;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.member-card:hover {
  transform: scale(1.05);
}

.member-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.member-card a {
  color: #00aced;
  text-decoration: none;
  font-weight: bold;
}

/*—— Ebook List ——*/
#ebooks .ebook-list {
  list-style: none;
  display: flex;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

#ebooks li {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

#ebooks img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
  border-radius: 6px;
}

#ebooks h4 {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.read-btn {
  display: inline-block;
  margin-top: 0.75rem;
  background: var(--accent);
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
}

/*—— Story Section ——*/
#story .page {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
  line-height: 1.6;
  position: relative;
  overflow: hidden;
}

#story h1 {
  margin-bottom: 0.75rem;
}

.pager {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.pager button {
  background: var(--accent);
  border: none;
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}
.fancy-btn {
  background: transparent;
  border: 2px solid #8C8C8C; /* Rich brown */
  color: #fff; /* White text always */
  padding: 0.6rem 1.2rem;
  border-radius: 0; /* Sharp corners */
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease, color 0.3s ease;
}

.fancy-btn:hover {
  background: #636363;
  color: #fff;
}

.ebook-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem; /* Adds spacing between stories */
}

.ebook-list img {
  max-width: 1000px;
  max-height: 1500px;
  width: auto;
  height: auto;
  display: block;
  margin-bottom: 1rem;
}

/*—— Species ——*/
.species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(1000px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.species-card {
  background: #1e1e1e;
  color: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.species-card:hover {
  transform: scale(1.03);
}

.species-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.species-card.blank {
  background: #2a2a2a;
  text-align: center;
  font-style: italic;
  opacity: 0.6;
}
.more-info {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #444;
  font-size: 0.95rem;
  color: #ccc;
}

.hidden {
  display: none;
}

/* Roles Grid */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Role Card */
.role-card {
  background-color: #1a1a1a;
  border: 2px solid #00ffff;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  color: #fff;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

/* Role Logo */
.role-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 8px #00ffff);
}

/* Role Name */
.role-card h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

/* Lore Panel */
.role-lore {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #111;
  border-radius: 12px;
  border: 1px solid #00ffff;
  animation: fadeIn 0.4s ease forwards;
}

.role-lore.hidden {
  display: none;
}

/* Role 1 */
.role-1 {
  background-color: #4BC21C;
  border: 2px solid #55E21D;
  box-shadow: 0 0 12px #55E21D;
}
.role-1:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px #4BC21C;
}

/* Role 2 */
.role-2 {
  background-color: #18A9AF;
  border: 2px solid #1CCBD2;
  box-shadow: 0 0 12px #1CCBD2;
}
.role-2:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px #18A9AF;
}

/* Role 3 */
.role-3 {
  background-color: #7C7D59;
  border: 2px solid #B7B981;
  box-shadow: 0 0 12px #B7B981;
}
.role-3:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px #7C7D59;
}

/* Role 4 */
.role-4 {
  background-color: #838383;
  border: 2px solid #B9B9B6;
  box-shadow: 0 0 12px #B9B9B6;
}
.role-4:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px #838383;
}

/* Role 5 */
.role-5 {
  background-color: #4D607F;
  border: 2px solid #6883B3;
  box-shadow: 0 0 12px #6883B3;
}
.role-5:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px #4D607F;
}

/* Role 6 */
.role-6 {
  background-color: #AF6B05;
  border: 2px solid #E78C04;
  box-shadow: 0 0 12px #E78C04;
}
.role-6:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px #AF6B05;
}

/* Role 7 */
.role-7 {
  background-color: #780001;
  border: 2px solid #BA0103;
  box-shadow: 0 0 12px #BA0103;
}
.role-7:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px #780001;
}

/* Role 1 */
.role-1 .role-lore {
  background-color: #4BC21C;
  border: 2px solid #55E21D;
  box-shadow: 0 0 12px #55E21D;
}

/* Role 2 */
.role-2 .role-lore {
  background-color: #18A9AF;
  border: 2px solid #1CCBD2;
  box-shadow: 0 0 12px #1CCBD2;
}

/* Role 3 */
.role-3 .role-lore {
  background-color: #7C7D59;
  border: 2px solid #B7B981;
  box-shadow: 0 0 12px #B7B981;
}

/* Role 4 */
.role-4 .role-lore {
  background-color: #838383;
  border: 2px solid #B9B9B6;
  box-shadow: 0 0 12px #B9B9B6;
}

/* Role 5 */
.role-5 .role-lore {
  background-color: #4D607F;
  border: 2px solid #6883B3;
  box-shadow: 0 0 12px #6883B3;
}

/* Role 6 */
.role-6 .role-lore {
  background-color: #AF6B05;
  border: 2px solid #E78C04;
  box-shadow: 0 0 12px #E78C04;
}

/* Role 7 */
.role-7 .role-lore {
  background-color: #780001;
  border: 2px solid #BA0103;
  box-shadow: 0 0 12px #BA0103;
}

.name-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.character-name {
  font-weight: bold;
}
.sound-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
}

/*—— PHONE CODE DO NOT TYPE BELOW IF APPLIED TO ALL DEVICES ——*/
@media (max-width: 600px) {
  /* Global mobile reset */
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  *, *::before, *::after {
    box-sizing: inherit;
  }

  /* Header and Navigation */
  header {
    padding: 0.5rem 1rem;
  }

  nav {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .logo {
    font-size: 1.3rem;
    text-align: center;
    width: 100%;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 0.5rem;
  }

  .nav-links button {
    flex: 1 1 calc(50% - 1rem);
    min-width: 120px;
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
    text-align: center;
    background-color: #2e2e2e; /* Dark grey */
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
  }

  /* Species Section */
  .species-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
    width: 100%;
    overflow-x: hidden;
  }

  .species-card {
    width: 100%;
    max-width: 100%;
    background-color: #000; /* Black background */
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .species-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    margin-bottom: 0.5rem;
  }

  .species-card h2 {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    text-align: center;
  }

  .species-card h2 p {
    margin: 0;
  }

  .fancy-btn {
    background-color: #2e2e2e; /* Dark grey */
    color: #fff;
    border: none;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }

  /* Modal Fixes */
  .modal {
    width: 100vw !important;
    height: 100vh !important;
    top: 0 !important;
    left: 0 !important;
    position: fixed !important;
    z-index: 9999 !important;
    overflow-x: hidden;
  }

  .modal-content {
    padding: 1rem;
    max-width: 100%;
  }

  /* Ebooks Section */
  #ebooks {
    padding: 1rem;
    overflow-x: hidden;
    box-sizing: border-box;
    width: 100%;
  }

  .ebook-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    margin: 0;
    width: 100%;
  }

  .ebook-list li {
    background-color: #000;
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .ebook-list h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  .ebook-list p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .ebook-list img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0.5rem;
    border-radius: 6px;
  }

  .fancy-btn {
    background-color: #2e2e2e;
    color: #fff;
    border: none;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    width: 100%;
  }
    
  /* Top Bar */
  #topBar {
    position: fixed;
    top: 0;
    width: 100%;
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  .hide-bar {
    transform: translateY(-100%);
  }
  .gif-banner img {
    max-width: 100%;
    max-height: 500px;
  }

  .site-meta {
    flex-direction: column;
    align-items: center;
  }

  .member-grid {
    flex-direction: column;
    align-items: center;
  }
}

