/* Homepage — Miaomiao Li
   Rewritten 2026-03-22 */

/* === 1. Reset === */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; margin: 0; }
p { margin: 0; padding: 0; }
button { background: none; border: none; cursor: pointer; padding: 0; font: inherit; }

/* === 2. Custom Properties === */
:root {
  --accent: #C44D58;
  --accent-nav: #E34F00;
  --text: #000;
  --nav-height: 60px;
  --card-max-width: 800px;
  --avatar-size: 120px;
  --avatar-radius: 28px;
}

/* === 3. Base / Typography === */
body {
  color: var(--text);
  background-image: url("https://mangaedt-bkt.oss-cn-shenzhen.aliyuncs.com/img/background.jpg");
  background-position: 0 0;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* Hide scrollbar (all browsers) */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

/* === 4. Header / Navigation === */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  padding-top: 22px;
  z-index: 10;
}

#headerNav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 40px;
  height: 100%;
}

#navLinks {
  display: flex;
  align-items: center;
  gap: 25px;
}

.navItem {
  font-size: 18px;
  font-family: "Temporarium", serif;
  cursor: pointer;
  transition: all 0.2s;
}

.navItem a {
  font-size: 18px;
  font-family: "Temporarium", serif;
  color: var(--text);
}

.navItem a:hover {
  border-bottom: 1px solid var(--accent);
}

/* Higher specificity so the orange border persists even on hover */
.navItem:first-child a,
.navItem:first-child a:hover {
  border-bottom: 1px solid var(--accent-nav);
}

#navIdentity {
  display: flex;
  align-items: center;
  margin-left: 25px;
}

#navAvatar {
  padding-left: 27px;
  margin-right: 10px;
  border-left: 1px solid #999;
}

#navAvatar img {
  border: 1px solid #E3E3E3;
  border-radius: 10px;
  box-shadow: 0 2px 1px rgba(0, 0, 0, 0.4);
  width: 26px;
  height: 26px;
}

#navUserName {
  font-size: 19px;
  font-family: "Open Sans Condensed", "Segoe UI", "Ubuntu Condensed", sans-serif;
}

#hamburger {
  display: none;
  font-size: 24px;
  color: var(--text);
}

/* === 5. Center Card Layout === */
#wrapper {
  width: 90%;
  max-width: var(--card-max-width);
  text-align: center;
}

#centerDisp {
  text-align: center;
}

/* === 6. Avatar === */
#avatar {
  background-image: url('https://moeka.me/img/moeka.jpg');
  width: var(--avatar-size);
  height: var(--avatar-size);
  border: 3px solid #E3E3E3;
  border-radius: var(--avatar-radius);
  box-shadow: 0 3px 2px rgba(0, 0, 0, 0.3);
  display: inline-block;
  cursor: pointer;
  background-size: cover;
}

#centerDisp h1 {
  font-family: "Open Sans Condensed", "Segoe UI", "Ubuntu Condensed", sans-serif;
  font-size: 32px;
  margin-top: 20px;
}

#centerDisp h3 {
  font-family: "Open Sans Condensed", "Segoe UI", "Ubuntu Condensed", sans-serif;
  font-size: 20px;
  margin-bottom: 0;
}

#centerDisp p {
  font-family: "Temporarium", serif;
  font-size: 20px;
  margin-bottom: 0;
  line-height: 1.5em;
}

#centerDisp p a {
  font-family: "Temporarium", serif;
  color: var(--accent);
  border-bottom: 1px dashed var(--accent);
  font-size: 20px;
  margin-left: 2px;
  margin-right: 2px;
}

#centerDisp p a:hover {
  border-bottom: 1px solid var(--accent);
}

/* === 7. Carousel / Slides === */
#slideArea {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 25px;
}

#description {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

#description ul {
  display: flex;
  flex-wrap: nowrap;
}

#description ul li {
  width: 100%;
  flex-shrink: 0;
}

.slide {
  display: block;
  min-height: 7em;
}

/* Crossfade for title/subtitle */
#title, #subtitle {
  transition: opacity 150ms ease;
}

#title.fading, #subtitle.fading {
  opacity: 0;
}

/* Slide content fade-in */
.slide {
  transition: opacity 600ms ease;
}

.slide.fading {
  opacity: 0;
}

/* === 8. Pager Dots + Chevrons === */
#pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
  height: 18px;
  z-index: 5;
}

#pager .dot {
  display: block;
  width: 12px;
  height: 12px;
  text-indent: -999em;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 1px 1px #707173;
  transition: all 0.3s;
  margin: 0 5px;
}

#pager .dot:hover {
  background: #c0c0c0;
  box-shadow: 0 0 1px 1px var(--accent);
}

#pager .dot.enabled {
  box-shadow: 0 0 1px 1px var(--accent);
  background: #707173;
}

/* === 9. Arrow Buttons === */
.arrow {
  color: var(--accent);
  font-size: 28px;
  opacity: 0.4;
  transition: opacity 0.2s;
  padding: 0 12px;
  flex-shrink: 0;
  user-select: none;
}

.arrow:hover {
  opacity: 0.8;
}

/* === 10. Hamburger Menu === */
#navLinks.open {
  display: flex;
}

/* === 11. Responsive Media Queries === */

/* Tablet: 560-1023px — links only, no avatar/name */
@media (max-width: 1023px) {
  #navIdentity {
    display: none;
  }

  #headerNav {
    padding: 0 20px;
  }
}

/* Mobile: < 560px — hamburger menu */
@media (max-width: 559px) {
  #headerNav {
    justify-content: space-between;
    padding: 0 16px;
  }

  #hamburger {
    display: block;
    order: 2;
    font-size: 28px;
  }

  #navLinks {
    display: none;
    position: absolute;
    top: calc(var(--nav-height) + 22px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    flex-direction: column;
    padding: 16px 0;
    gap: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 20;
  }

  #navLinks.open {
    display: flex;
  }

  #navLinks .navItem {
    padding: 12px 24px;
    width: 100%;
  }

  /* Show name label on left side */
  #navIdentity {
    display: flex;
    margin-left: 0;
    order: 1;
  }

  #navAvatar {
    display: none;
  }

  #navUserName {
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 0 4px #fff,
                 0 0 10px #fff,
                 0 0 20px rgba(255, 255, 255, 0.5);
  }

  /* Slightly wider card on mobile */
  #wrapper {
    width: 92%;
  }
}
