* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
  color: white;
  height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../images/home_bg.jpg') center/cover no-repeat;
  z-index: -2;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

.main-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.cards-container {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 260px;
  height: 180px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  opacity: 0.9;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.card-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  line-height: 1.4;
}

.site-footer {
  text-align: center;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  padding: 1rem 0;
}

@media (max-width: 768px) {
  .cards-container {
    flex-direction: column;
    gap: 1.8rem;
  }
  .card {
    width: 100%;
    max-width: 320px;
  }
}

#character-container {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}

.dialog {
  position: relative;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  border-radius: 14px;
  padding: 0.7rem 1rem;
  width: 260px;
  min-height: 48px;
  margin-bottom: 0.8rem;
  transition: background 0.25s ease;
}

.dialog::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.75) transparent transparent;
}

#dialog-text {
  display: block;
  white-space: normal;
  text-align: center;
  line-height: 1.4;
  font-size: 0.95rem;
}

#search-wrapper {
  display: none;
  width: 100%;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.dialog.search-mode {
  background: rgba(255, 255, 255, 0.95);
  color: #333;
}

.dialog.search-mode::after {
  border-color: rgba(255, 255, 255, 0.95) transparent transparent;
}

.dialog.search-mode #dialog-text {
  display: none;
}

.dialog.search-mode #search-wrapper {
  display: flex;
}

#search-input {
  flex: 1;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 0.95rem;
  background: white;
  color: #333;
  box-shadow: 0 0 4px rgba(0,0,0,0.15);
}

#search-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: 0.25s ease;
  display: flex;          
  align-items: center;  
  justify-content: center;
  white-space: nowrap;    
}

#search-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.07);
}

#character {
  width: 90px;
  height: auto;
  transition: transform 0.25s ease-out;
  user-select: none;
  pointer-events: auto;
  animation: breathe 3.5s ease-in-out infinite;
}

@keyframes breathe {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.theme-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.top-nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 0.8rem 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 50;
}

.nav-inner {
  width: 88%;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
}

.nav-links a {
  position: relative;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 1rem;
  transition: 0.25s ease;
}

.nav-links a:hover {
  color: white;
  transform: scale(1.12);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: white;
  transition: width 0.25s ease;
}

.nav-links a:hover::after {
  width: 100%;
}
.social-links {
  margin-top: 2.5rem;
  display: flex;
  gap: 1.8rem;
  justify-content: center;
  align-items: center;
}

.social-item {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.25s ease;
}

.social-item img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  opacity: 0.9;
}

.social-item:hover {
  transform: translateY(-6px) scale(1.08);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}
.visit-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  transition: 0.25s ease;
}

.visit-badge:hover {
  transform: translateY(-3px) scale(1.05);
  background: rgba(255, 255, 255, 0.18);
}

#music-player {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
}

#music-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255,255,255,0.9);
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: 0.25s ease;
  position: relative; 
  z-index: 2;      
}

#music-toggle:hover {
  transform: translateY(-3px) scale(1.08);
  background: rgba(255,255,255,0.18);
}

.music-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.music-controls button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.25s ease;
}

.music-controls button:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.1);
}

#music-list {
  list-style: none;
  max-height: 140px;
  overflow-y: auto;
  padding-right: 4px;
  -ms-overflow-style: none;   
  scrollbar-width: none;      
}

#music-list::-webkit-scrollbar {
  display: none;
}

#music-list li {
  padding: 6px 8px;
  border-radius: 8px;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: 0.2s ease;
}

#music-list li:hover {
  background: rgba(255,255,255,0.18);
}

#music-list .active {
  background: rgba(255,255,255,0.28);
  font-weight: 600;
}

#music-panel {
  position: absolute;   
  bottom: 60px;         
  right: 0;             
  width: 300px; 
  padding: 1rem;
  margin-bottom: 0.8rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 18px 35px rgba(0,0,0,0.35);
  display: flex;             
  flex-direction: column;
  gap: 0.8rem;
  opacity: 0;   
  transform: translateY(20px) scale(0.95);      
  transform-origin: bottom right;
  transform: translateY(8px) scale(0.96);
  opacity: 0;
  pointer-events: none;       
  transition: opacity 0.35s ease, transform 0.35s ease;
}

#music-panel.open {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;            
}

.music-info {
  text-align: center;
  color: rgba(255,255,255,0.95);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.music-artist {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}

.music-progress {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
}

#progress-bar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  outline: none;
  cursor: pointer;
}

#progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255,255,255,0.8);
}

.music-volume {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
}

#volume-bar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  outline: none;
  cursor: pointer;
}

#volume-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
}

.lyrics {
  max-height: 120px; 
  overflow-y: auto;   
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 10px 0;
  scrollbar-width: none;
  position: relative;
}
.lyrics::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.lyrics-line {
  opacity: 0.45;
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.lyrics-line.active {
  opacity: 1;
  color: #fff;
  transform: scale(1.08);
  text-shadow: 0 0 6px rgba(255,255,255,0.8);
}