/* ===================== */
/*    Global & Base CSS  */
/* ===================== */

/* Import Custom Font */
@font-face {
  font-family: 'GenshinFont';
  src: url('../fonts/zh-cn.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
* {
  font-family: 'GenshinFont', sans-serif;
  font-weight: bold;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Body Styles */
body {
  background: linear-gradient(270deg, #1E3C72, #D4AF37);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  color: #fff;
  transition: background 0.3s, color 0.3s;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===================== */
/*   Navigation Styles   */
/* ===================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1E3C72;
  padding: 10px 20px;
}
.navbar .logo a {
  color: #D4AF37;
  text-decoration: none;
  font-size: 28px;
  cursor: help;
}
/* Push nav-links to the right */
.nav-links {
  list-style: none;
  display: flex;
  margin-left: auto;
}
.nav-links li {
  margin: 0 10px;
}
.nav-links li a {
  color: #fff;
  text-decoration: none;
  padding: 5px 10px;
  transition: background-color 0.3s;
  cursor: pointer;
}
.nav-links li a:hover,
.nav-links li a.active {
  background-color: rgba(212,175,55,0.3);
  border-radius: 4px;
}

/* ===================== */
/*   News Ticker Styles  */
/* ===================== */
.news-ticker {
  background-color: #D4AF37;
  color: #1E3C72;
  padding: 10px 0;
  overflow: hidden;
  position: relative;
}
.ticker p {
  white-space: nowrap;
  font-size: 16px;
  margin: 0;
  padding-left: 100%;
  animation: ticker 15s linear infinite;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ===================== */
/*      Banner Styles    */
/* ===================== */
.banner {
  background: url('../images/banner.jpg') no-repeat center center/cover;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.banner-overlay {
  position: relative;
  background: linear-gradient(45deg, rgba(30,60,114,0.8), rgba(212,175,55,0.6));
  padding: 40px;
  text-align: center;
  border-radius: 8px;
  z-index: 2;
}
.banner-overlay::before {
  content: "";
  background: url('images/homepagebanner.jpg') no-repeat center center;
  background-size: cover;
  opacity: 0.3;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}
.banner-overlay h1 {
  color: #fff;
  font-size: 48px;
  margin-bottom: 20px;
}
.banner-overlay p {
  color: #eee;
  font-size: 24px;
  margin-bottom: 20px;
}
.banner-overlay button {
  padding: 10px 20px;
  font-size: 18px;
  background-color: #D4AF37;
  border: none;
  color: #1E3C72;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.banner-overlay button:hover {
  background-color: #c99b32;
}
.banner-picture {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 3;
}
.banner-picture img {
  width: 200px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* ===================== */
/*   Random Quote Styles */
/* ===================== */
.random-quote {
  padding: 40px 20px;
  background-color: #1E3C72;
  text-align: center;
}
.random-quote h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: #D4AF37;
}
.random-quote p {
  font-size: 20px;
  margin-bottom: 10px;
  color: #fff;
}
.random-quote button {
  padding: 8px 16px;
  font-size: 16px;
  background-color: #D4AF37;
  border: none;
  color: #1E3C72;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.random-quote button:hover {
  background-color: #c99b32;
}

/* ===================== */
/*   Slideshow Styles    */
/* ===================== */
.slideshow {
  padding: 40px 20px;
  background-color: #1E3C72;
  text-align: center;
}
.slideshow-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}
.slide {
  width: 100%;
  display: none;
  border-radius: 8px;
}
.slide.active {
  display: block;
}
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(30,60,114,0.7);
  border: none;
  color: #fff;
  padding: 8px;
  cursor: pointer;
  border-radius: 50%;
}
.prev { left: 10px; }
.next { right: 10px; }

/* ===================== */
/*   MP3 Player Styles   */
/* ===================== */
/* Using your original MP3 player snippet structure */
.mp3-player-container {
  margin: 2rem auto;
  width: 500px;
  height: 360px;
  background: #111;
  box-shadow: 0 30px 20px -20px #000;
  border-radius: 8px;
  box-sizing: border-box;
}
.mp3-player-container header {
  width: 100%;
  height: 2rem;
  line-height: 2rem;
  font-size: 1.2rem;
  padding: 1rem 2rem;
  box-sizing: border-box;
}
.mp3-player-container header .playlist {
  float: left;
  cursor: pointer;
}
.mp3-player-container header .setting {
  float: right;
  cursor: pointer;
}
.mp3-player-container main {
  clear: both;
  padding: 1rem 2rem;
  box-sizing: border-box;
}
.mp3-player-container main .album-art {
  float: left;
  padding: 0.5rem;
  background: #000;
}
.mp3-player-container main .album-art img {
  width: 160px;
  border-radius: 8px;
}
.mp3-player-container main .player {
  position: relative;
  float: right;
  width: 176px;
  height: 176px;
  background: linear-gradient(0deg, #222, #111);
  border-radius: 100%;
  border: 2px solid #000;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.2), 0 4px 2px rgba(0,0,0,0.2);
}
.mp3-player-container main .player .fa {
  font-size: 1.2rem;
  position: absolute;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mp3-player-container main .player .fa:hover {
  color: cyan;
  text-shadow: 0 0 4px cyan;
}
/* Combine play and pause button styling to prevent shifts */
.mp3-player-container main .player .fa-play,
.mp3-player-container main .player .fa-pause {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 88px;
  height: 88px;
  border: 2px solid #000;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.2), 0 0 8px rgba(0,0,0,0.6);
  border-radius: 100%;
  line-height: 88px;
  text-align: center;
  background: linear-gradient(0deg, #111, #222);
}
.mp3-player-container main .player .fa-repeat {
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
}
.mp3-player-container main .player .fa-fast-backward {
  top: 50%;
  left: 8%;
  transform: translateY(-50%);
}
.mp3-player-container main .player .fa-fast-forward {
  top: 50%;
  left: 82%;
  transform: translateY(-50%);
}
.mp3-player-container main .player .fa-random {
  top: 82%;
  left: 50%;
  transform: translateX(-50%);
}
.mp3-player-container footer {
  clear: both;
  padding: 2rem 2rem;
  color: #999;
  text-shadow: 2px 2px #111;
  font-family: 'Roboto', sans-serif;
}
.mp3-player-container footer .title {
  text-align: center;
  padding-bottom: 0.5rem;
}
/* Updated Duration/TIME-TRACKER */
.mp3-player-container footer .time-tracker {
  display: flex;
  align-items: center;
  border-top: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
  padding-top: 0.5rem;
  white-space: nowrap;
}
.mp3-player-container footer .time-tracker .timer {
  position: relative;
  width: 90%;
  height: 2rem;
  cursor: pointer;
  /* remove float so flex layout works correctly */
}
.mp3-player-container footer .time-tracker .timer .bg {
  position: relative;
  top: 50%;
  margin-right: 0.5rem;
  transform: translateY(-50%);
  height: 0.6rem;
  border-top: 1px solid #000;
  border-radius: 10px;
  background: #333; /* background for unused portion */
  overflow: hidden;
  box-shadow: inset 0 -1px 1px rgba(255,255,255,0.2);
}
.mp3-player-container footer .time-tracker .timer .bg .progress {
  height: 100%;
  width: 0%; /* will be updated via JS */
  background: cyan;
  border-radius: 10px;
  box-shadow: 0 0 2px 2px cyan;
}
.mp3-player-container footer .time-tracker .time {
  width: 10%;
  line-height: 2rem;
}

/* ===================== */
/*   Quick Access Styles */
/* ===================== */
.preview {
  padding: 40px 20px;
  background-color: #fff;
  text-align: center;
  color: #1E3C72;
}
.preview h2 {
  margin-bottom: 20px;
}
.preview-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.card {
  width: 250px;
  background-color: #f9f9f9;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, border 0.3s;
}
.card:hover {
  transform: scale(1.05);
  border: 2px solid #1E3C72;
}
.card-image {
  position: relative;
}
.card-image img {
  width: 100%;
  display: block;
}
.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30,60,114,0.7);
  color: #D4AF37;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover .card-overlay {
  opacity: 1;
}
.card-content {
  padding: 15px;
}

/* ===================== */
/*      Modal Pop-up     */
/* ===================== */
.modal {
  display: none;
  position: fixed;
  z-index: 150;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}
.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  max-width: 500px;
  border-radius: 8px;
  position: relative;
}
.modal-content .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

/* ===================== */
/*     Scroll To Top     */
/* ===================== */
#scrollTopBtn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  font-size: 24px;
  border: none;
  outline: none;
  background-color: #D4AF37;
  color: #1E3C72;
  cursor: pointer;
  padding: 15px;
  border-radius: 50%;
  transition: opacity 0.3s;
}
#scrollTopBtn:hover {
  background-color: #c99b32;
}

/* ===================== */
/*  Fade-In on Scroll    */
/* ===================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
