
/* ========================================
   GLOBAL STYLES
   ======================================== */

:root {
  --background: #101b30;
  --text: #f0e6d2;
  --muted: #b5b9c3;
  --accent: #e1c79b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(
    ellipse at 50% 10%,
    #243653 0%,
    var(--background) 70%
  );
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
}


/* ========================================
   HOMEPAGE
   ======================================== */

.homepage {
  width: min(1200px, 92%);
  margin: 0 auto;
  padding: 65px 0 25px;
}

.intro {
  text-align: center;
  margin-bottom: 50px;
}

.eyebrow {
  font-family: Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--accent);
}

.intro h1 {
  margin: 20px 0;
  font-size: clamp(32px, 4vw, 54px);
  font-weight: normal;
  line-height: 1.2;
}

.intro p {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
}

.worlds {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.world-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  text-decoration: none;
  background: #243653;
  transition: transform 0.25s ease;
}

.world-card:hover {
  transform: translateY(-6px);
}

.world-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.world-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.world-card::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(
    transparent,
    rgba(7, 14, 28, 0.85)
  );
  pointer-events: none;
}

.world-name {
  position: absolute;
  z-index: 1;
  bottom: 24px;
  left: 10px;
  right: 10px;
  text-align: center;
  color: #fff2d8;
  font-size: clamp(18px, 2vw, 26px);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.footer {
  text-align: center;
  margin-top: 60px;
  font-size: 13px;
  color: var(--muted);
}


/* ========================================
   UNIVERSE PAGE
   ======================================== */

.universe-page {
  width: min(1050px, 90%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 35px 0 80px;
}

.back-navigation a {
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 14px;
  text-decoration: none;
}

.back-navigation a:hover {
  color: var(--text);
}

.universe-intro {
  text-align: center;
  margin: 90px auto 65px;
  max-width: 650px;
}

.universe-intro h1 {
  font-size: clamp(48px, 7vw, 78px);
  font-weight: normal;
  margin: 18px 0;
  color: var(--text);
}

.universe-intro p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.universe-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.universe-option {
  min-height: 240px;
  padding: 35px 25px;
  border: 1px solid rgba(225, 199, 155, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  text-decoration: none;
  color: var(--text);
  text-align: center;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.universe-option:hover {
  background: rgba(225, 199, 155, 0.09);
  transform: translateY(-4px);
}

.universe-option:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.option-icon {
  display: block;
  font-size: 38px;
  color: var(--accent);
  margin-bottom: 24px;
}

.universe-option h2 {
  font-size: 25px;
  font-weight: normal;
  margin: 0 0 15px;
}

.universe-option p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}


/* ========================================
   STORY LISTS
   ======================================== */

.story-list-page {
  width: min(720px, 90%);
  margin: 0 auto;
  min-height: 100vh;
  padding: 35px 0 90px;
}

.story-list-header {
  text-align: center;
  margin: 65px 0 45px;
}

.story-list-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: normal;
  margin: 15px 0;
}

.story-list {
  display: flex;
  flex-direction: column;
}

.story-list a {
  display: block;
  padding: 18px 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 19px;
  line-height: 1.5;
  border-bottom: 1px solid rgba(225, 199, 155, 0.15);
  transition: background 0.2s ease;
}

.story-list a:hover {
  background: rgba(225, 199, 155, 0.07);
  color: var(--accent);
}

.story-list a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}


/* ========================================
   STORY READER
   ======================================== */

.reader-page {
  width: 90%;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 0 90px;
}

.reader-header {
  text-align: center;
  margin: 65px 0 45px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(225, 199, 155, 0.2);
}

.reader-header h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: normal;
  line-height: 1.3;
  margin: 18px 0 0;
}

.reader-content {
  font-size: 20px;
  font-weight: normal;
  line-height: 1.85;
  color: var(--text);
}

.reader-content p {
  margin: 0 0 1.5em;
}

.reader-content em,
.reader-content i {
  color: var(--accent);
}

/* Illustrations inside stories */

.reader-content figure,
.story-illustration {
  margin: 35px 0 45px;
  text-align: center;
}

.reader-content figure img,
.story-illustration img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* Reader footer */

.reader-footer {
  text-align: center;
  margin-top: 65px;
  padding-top: 30px;
  border-top: 1px solid rgba(225, 199, 155, 0.2);
}

.reader-footer a {
  color: var(--accent);
  text-decoration: none;
  font-size: 16px;
}

.reader-footer a:hover {
  color: var(--text);
}


/* ========================================
   TABLETS
   ======================================== */

@media (max-width: 900px) {
  .worlds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .homepage {
    padding-top: 45px;
  }
}

@media (max-width: 700px) {
  .universe-intro {
    margin: 65px auto 45px;
  }

  .universe-options {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .universe-option {
    min-height: 170px;
    padding: 25px;
  }

  .option-icon {
    margin-bottom: 12px;
  }
}


/* ========================================
   MOBILE PHONES
   ======================================== */

@media (max-width: 480px) {
  .worlds {
    gap: 14px;
  }

  .world-card {
    border-radius: 12px;
  }

  .world-name {
    font-size: 17px;
    bottom: 15px;
  }

  .intro {
    margin-bottom: 30px;
  }

  .intro p {
    font-size: 15px;
  }

  .story-list-header {
    margin: 45px 0 30px;
  }

  .story-list a {
    font-size: 17px;
    padding: 16px 8px;
  }

  .reader-page {
    width: 92%;
    padding-top: 25px;
  }

  .reader-header {
    margin: 45px 0 30px;
  }

  .reader-content {
    font-size: 18px;
    line-height: 1.8;
  }

  .reader-content figure,
  .story-illustration {
    margin: 25px 0 35px;
  }
}


/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .world-card,
  .universe-option,
  .story-list a {
    transition: none;
  }
}


/* ========================================
   CHARACTER WIKI
   ======================================== */

.wiki-page,
.character-page {
  width: min(1000px, 90%);
  margin: 0 auto;
  min-height: 100vh;
  padding: 35px 0 90px;
}

.wiki-header,
.character-header {
  text-align: center;
  margin: 65px auto 50px;
}

.wiki-header h1,
.character-header h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: normal;
  margin: 18px 0;
}

.wiki-header p,
.character-header p {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
}

/* Character gallery */

.character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.character-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(225, 199, 155, 0.2);
  background: rgba(255, 255, 255, 0.035);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease;
}

.character-card:hover {
  transform: translateY(-5px);
}

.character-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.character-card h2 {
  font-size: 23px;
  font-weight: normal;
  text-align: center;
  padding: 18px;
  margin: 0;
}

/* Character detail */

.character-image {
  max-width: 760px;
  margin: 0 auto 45px;
}

.character-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.character-description {
  max-width: 720px;
  margin: 0 auto;
  font-size: 20px;
  line-height: 1.85;
}

.character-description p {
  margin: 0 0 1.5em;
}

@media (max-width: 700px) {
  .character-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .character-description {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .character-grid {
    grid-template-columns: 1fr;
  }
}


.copyright-notice {
  max-width: 680px;
  margin: 90px auto 30px;
  padding: 28px 20px 0;
  border-top: 1px solid rgba(240, 230, 210, 0.18);
  text-align: center;
  color: #b5b9c3;
  font-size: 0.82rem;
  line-height: 1.8;
}

.copyright-notice h3 {
  color: #e1c79b;
  font-size: 0.95rem;
  font-weight: normal;
  margin-bottom: 18px;
}

.copyright-notice p {
  margin-bottom: 12px;
}

.copyright-signature {
  margin-top: 24px;
  opacity: 0.7;
  font-size: 0.75rem;
}
