/* ---------- RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: white;
}

/* ---------- 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;
}

/* ---------- THEME COLORS ---------- */
:root {
  --background: #301934;
  --text-color: #ffff;
  --header-bg: #800080;
  --nav-hover: #FFA500;
  --footer-bg: #FF0000;
  --accent-border: #FFA500;
}

/* ---------- BODY ---------- */
body {
  background: var(--background);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 18px;
}

/* ---------- HEADER ---------- */
header {
  background: var(--header-bg);
  padding: 10px 20px;
}
.dashboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo a {
  color: #ffffff;
  font-size: 28px;
  text-decoration: none;
}
nav ul {
  list-style: none;
  display: flex;
}
nav ul li {
  margin: 0 10px;
}
nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  padding: 5px 10px;
  transition: background 0.3s;
}
nav ul li a.active,
nav ul li a:hover {
  background: var(--nav-hover);
  border-radius: 4px;
}

/* ---------- FOOTER ---------- */
footer {
  background: var(--footer-bg);
  padding: 20px;
  text-align: center;
  color: #ffffff;
}

/* ---------- LAYOUT: Two-column Layout ---------- */
.content-wrapper {
  display: flex;
  max-width: 1200px;
  margin: 20px auto;
  gap: 20px;
}

/* ---------- SIDEBAR / INFO BOX ---------- */
.info-box {
  flex: 0 0 300px;
  background: var(--background);
  padding: 20px;
  border: 2px solid var(--accent-border);
  border-radius: 8px;
}
.info-box .info-image {
  width: 100%;
  border: 3px solid var(--accent-border);
  border-radius: 8px;
  margin-bottom: 20px;
}
.info-box h1 {
  font-size: 36px;
  color: var(--nav-hover);
  margin-bottom: 10px;
}
.info-list {
  list-style: none;
  font-size: 18px;
}
.info-list li {
  margin-bottom: 8px;
}

/* ---------- WAIFUS SECTION ---------- */
.waifu-info-box {
  margin-top: 20px;
}
.waifu-info-box h2 {
  font-size: 28px;
  color: var(--nav-hover);
  margin-bottom: 10px;
}
.waifu-category {
  margin-bottom: 20px;
}
.waifu-category h3 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--accent-border);
}
.waifu {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.waifu img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 2px solid var(--accent-border);
  border-radius: 50%;
  margin-right: 10px;
}
.waifu-details {
  text-align: left;
  font-size: 16px;
}

/* ---------- SOCIAL MEDIA SECTION ---------- */
.social-media {
  padding: 20px;
  background: var(--footer-bg);
  text-align: center;
  border: 2px solid var(--accent-border);
  border-radius: 8px;
  margin-top: 20px;
}
.social-media h2 {
  font-size: 28px;
  color: #ffffff;
  margin-bottom: 10px;
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.social-links a img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 2px solid var(--accent-border);
  border-radius: 50%;
  transition: transform 0.3s;
}
.social-links a img:hover {
  transform: scale(1.1);
}

/* ---------- MAIN CONTENT ---------- */
.main-content {
  flex: 1;
  background: var(--background);
  padding: 20px;
}

/* ---------- FAVORITE SONGS SECTION ---------- */
.favorite-songs {
  padding: 20px;
  background: var(--header-bg);
  margin-bottom: 20px;
  border: 2px solid var(--accent-border);
  border-radius: 8px;
}
.favorite-songs h2 {
  font-size: 28px;
  color: #ffffff;
  margin-bottom: 10px;
}

/* ---------- BIOGRAPHY SECTION ---------- */
.biography {
  padding: 20px;
  background: var(--background);
  margin-bottom: 20px;
  border: 2px solid var(--accent-border);
  border-radius: 8px;
}
.biography h2 {
  font-size: 28px;
  color: var(--accent-border);
  margin-bottom: 10px;
}
.biography p {
  font-size: 18px;
  text-align: justify;
}

/* ---------- TRIVIA SECTION ---------- */
.trivia {
  padding: 20px;
  background: var(--header-bg);
  margin-bottom: 20px;
  border: 2px solid var(--accent-border);
  border-radius: 8px;
}
.trivia h2 {
  font-size: 28px;
  color: #ffffff;
  margin-bottom: 10px;
}
.trivia p {
  font-size: 18px;
  text-align: justify;
}

/* ---------- SLIDESHOW SECTION ---------- */
.slideshow {
  padding: 20px;
  background: var(--background);
  margin-bottom: 20px;
  border: 2px solid var(--accent-border);
  border-radius: 8px;
  text-align: center;
}
.slideshow h2 {
  font-size: 28px;
  color: var(--accent-border);
  margin-bottom: 10px;
}
.slideshow-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
}
.slide {
  display: none;
}
.slide.active {
  display: block;
}
.slideshow-container img {
  width: 100%;
  border: 3px solid var(--accent-border);
  border-radius: 10px;
}

/* ---------- VIDEO SECTION ---------- */
.video-section {
  padding: 20px;
  background: var(--header-bg);
  margin-bottom: 20px;
  border: 2px solid var(--accent-border);
  border-radius: 8px;
  text-align: center;
}
.video-section h2 {
  font-size: 28px;
  color: #ffffff;
  margin-bottom: 10px;
}
.video-container {
  max-width: 800px;
  margin: 0 auto;
}
.video-container video {
  width: 100%;
  height: auto;
  border: 3px solid var(--accent-border);
  border-radius: 10px;
}

/* ---------- UNIQUE FEATURE / RUBIK'S CUBE SECTION ---------- */
.unique-feature {
  padding: 20px;
  background: var(--background);
  margin-bottom: 20px;
  border: 2px solid var(--accent-border);
  border-radius: 8px;
  text-align: center;
  margin-top: 40px;
}
.unique-feature h2 {
  font-size: 28px;
  color: var(--accent-border);
  margin-bottom: 10px;
}

/* 3D Scene: compact size */
.scene {
  width: 180px;
  height: 180px;
  perspective: 600px;
  margin: 2rem auto; 
  position: relative;
  overflow: visible;
}
.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  cursor: grab;
}

/* Each face of the cube */
.face {
  position: absolute;
  width: 180px;
  height: 180px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  transform-style: preserve-3d;
}
.square {
  width: 60px;
  height: 60px;
  border: 1px solid #222;
}

/* Position each face around the cube */
.face-0 { transform: rotateX(90deg) translateZ(90px); }
.face-1 { transform: rotateY(90deg) translateZ(90px); }
.face-2 { transform: translateZ(90px); }
.face-3 { transform: rotateY(-90deg) translateZ(90px); }
.face-4 { transform: rotateY(180deg) translateZ(90px); }
.face-5 { transform: rotateX(-90deg) translateZ(90px); }

/* Rubik's Cube Buttons */
.rubik-controls {
  margin: 0.3rem;
}
.rubik-controls button {
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  border: 2px solid var(--accent-border);
  background: var(--footer-bg);
  color: #ffffff;
  margin: 0 0.2rem;
  font-size: 1rem;
  border-radius: 4px;
}
.rubik-controls button:hover {
  background: var(--nav-hover);
  color: #000;
}

/* ---------- MUSIC PLAYER STYLES (NAMESPACED) ---------- */
.music-player-wrapper {
  margin-bottom: 20px;
}
.music-player-wrapper .music-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  width: 380px;
  margin: 20px auto;
}

/* Outer Animated Circle (Pre-hover state) */
.music-player-wrapper .outer-circle {
  position: relative;
  z-index: 0;
  height: 70px;
  margin-bottom: -4px;
  transition: height 0.2s ease;
  overflow: hidden;
}
/* Outer Cover Image */
.music-player-wrapper .outer-cover {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border: 4px solid #9ca3af;
  border-radius: 9999px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  animation: spin 3s linear infinite;
  transition: all 0.3s ease;
}
/* On hover, collapse the outer circle to hide it */
.music-player-wrapper .music-player:hover .outer-circle {
  height: 0;
}
.music-player-wrapper .outer-icon {
  position: absolute;
  z-index: 10;
  width: 32px;
  height: 32px;
  background: #fff;
  border: 4px solid #9ca3af;
  border-radius: 9999px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  top: 48px;
  left: 48px;
}

/* Control Panel */
.music-player-wrapper .control-panel {
  z-index: 30;
  background: #fff;
  color: #000;
  width: 200px;
  height: 90px;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  overflow: visible;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.music-player-wrapper .music-player:hover .control-panel {
  width: 340px;
  height: 160px;
  padding: 12px;
}

/* Song Info (Top Row) */
.music-player-wrapper .song-info {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 0;
  transition: height 0.3s ease;
}
.music-player-wrapper .music-player:hover .song-info {
  height: 90px;
}
.music-player-wrapper .album-art {
  position: relative;
  width: 96px;
  height: 96px;
  margin-right: -16px;
  opacity: 0;
  transition: all 0.1s ease;
}
.music-player-wrapper .music-player:hover .album-art {
  margin-top: -16px;
  margin-left: 0;
  opacity: 1;
  animation: spin 3s linear infinite;
}
/* Inner Cover Image (Dynamic Album Cover) */
.music-player-wrapper .inner-cover {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 4px solid #9ca3af;
  border-radius: 9999px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: all 0.1s ease;
}
.music-player-wrapper .inner-icon {
  position: absolute;
  z-index: 10;
  width: 24px;
  height: 24px;
  background: #fff;
  border: 4px solid #9ca3af;
  border-radius: 9999px;
  top: 36px;
  left: 36px;
}
.music-player-wrapper .song-text {
  flex: 1;
  padding-left: 20px;
  overflow: hidden;
}
.music-player-wrapper .song-title {
  font-size: 1.3rem;
  font-weight: bold;
  margin: 4px 0;
  color: purple;
}
.music-player-wrapper .song-artist {
  color: #737373;
  font-size: 1rem;
}

/* Progress Row */
.music-player-wrapper .progress-row {
  display: flex;
  align-items: center;
  background: #e0e7ff;
  border-radius: 0.375rem;
  margin: 12px 16px;
  padding: 0 8px;
  min-height: 24px;
}
.music-player-wrapper .current-time,
.music-player-wrapper .duration {
  font-size: 0.9rem;
  padding: 0 6px;
  display: none;
}
.music-player-wrapper .music-player:hover .current-time,
.music-player-wrapper .music-player:hover .duration {
  display: inline-block;
}
.music-player-wrapper .progress-slider {
  flex: 1;
  margin: 0 8px;
  height: 4px;
  background: #ccc;
  border-radius: 9999px;
  -webkit-appearance: none;
}
.music-player-wrapper .music-player:hover .progress-slider {
  height: 6px;
  margin-bottom: 5px;
}
.music-player-wrapper .progress-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 2px solid #9ca3af;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Controls Row */
.music-player-wrapper .controls-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin: -8px 16px 8px;
  gap: 12px;
  position: relative;
  z-index: 30;
}
.music-player-wrapper .music-player:hover .controls-row {
  margin-top: -25px;
  margin-bottom: 8px;
}
.music-player-wrapper .control {
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 100;
  padding: 8px;
  box-sizing: content-box;
}
.music-player-wrapper .control svg {
  width: 100%;
  height: 100%;
  stroke:purple;
}
.music-player-wrapper .play-pause-control,
.music-player-wrapper .next-control,
.music-player-wrapper .prev-control {
  padding: 10px;
  box-sizing: content-box;
  z-index: 30;
}

/* Play/Pause Control State */
.music-player-wrapper .play-pause-control input {
  display: none;
}
.music-player-wrapper .play-pause-control .play-icon {
  display: inline;
}
.music-player-wrapper .play-pause-control .pause-icon {
  display: none;
}
.music-player-wrapper .play-pause-control.playing .play-icon {
  display: none;
}
.music-player-wrapper .play-pause-control.playing .pause-icon {
  display: inline;
}

/* ---------- KEYFRAME ANIMATIONS ---------- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
