*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #000;
  color: #fff;
  overflow-x: hidden;
  min-height: 100vh;
}

/* 星空背景 */
.star-background {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  width: 2px; height: 2px;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}

.star.bright {
  width: 3px; height: 3px;
  box-shadow: 0 0 4px rgba(255,255,255,0.8);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* 流星 */
.meteor {
  position: absolute;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.5) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: rotate(35deg);
  transform-origin: left center;
  animation: meteor-move 2s linear forwards;
  opacity: 0;
}

@media (min-width: 768px) {
  .meteor { width: 80px; }
}

@keyframes meteor-move {
  0% { transform: translateX(-100px) translateY(-100px) rotate(35deg); opacity: 0; }
  10% { opacity: 1; }
  20% { opacity: 1; }
  30% { transform: translateX(200px) translateY(200px) rotate(35deg); opacity: 0; }
  100% { transform: translateX(200px) translateY(200px) rotate(35deg); opacity: 0; }
}

/* 首页 */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero-content {
  position: relative;
  width: 100%;
  max-width: 800px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 泡泡导航 */
.bubble-nav {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

.avatar-container {
  position: relative;
  width: 90px; height: 90px;
  margin-bottom: 1rem;
  z-index: 2;
  cursor: pointer;
}

@media (min-width: 768px) {
  .avatar-container { width: 120px; height: 120px; margin-bottom: 1.5rem; }
}

.avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
}

.avatar-glow {
  position: absolute;
  top: -8px; left: -8px; right: -8px; bottom: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.3) 0%, transparent 70%);
  animation: pulse-glow 3s ease-in-out infinite;
  z-index: -1;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-text {
  text-align: center;
  margin-bottom: 1rem;
  z-index: 2;
}

.title-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (min-width: 768px) { .site-title { font-size: 2rem; } }

.follow-badge {
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(45,212,191,0.4);
  color: rgba(45,212,191,0.9);
  border-radius: 12px;
  font-size: 0.65rem;
  margin-top: -0.5rem;
}

.tagline {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1rem;
}

.social-icons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.social-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.6rem;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
  overflow: hidden;
}

.social-icon:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
  transform: scale(1.1);
}

.social-icon svg { width: 20px; height: 20px; flex-shrink: 0; }

#btnBilibili { font-size: 0.6rem; font-weight: 500; }

/* 泡泡 */
.bubble {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  font-size: 0.7rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.bubble.teal {
  border-color: rgba(45,212,191,0.4);
  background: rgba(45,212,191,0.05);
  color: rgba(45,212,191,0.9);
}

.bubble.purple {
  border-color: rgba(168,85,247,0.4);
  background: rgba(168,85,247,0.05);
  color: rgba(168,85,247,0.9);
}

.bubble.pink {
  border-color: rgba(236,72,153,0.4);
  background: rgba(236,72,153,0.05);
  color: rgba(236,72,153,0.9);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  animation: arrow-bounce 2s ease-in-out infinite;
  cursor: pointer;
  z-index: 2;
}

@keyframes arrow-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(5px); }
}

.scroll-indicator .arrow { width: 20px; height: 20px; }

/* 轮播图 */
.carousel-section { position: relative; padding: 3rem 1rem; z-index: 1; }

.carousel-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.carousel-wrapper {
  overflow: hidden;
  border-radius: 12px;
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.5s ease;
}

.carousel-item {
  flex: 0 0 100%;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 21/9;
  cursor: pointer;
}

.carousel-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.carousel-item:hover img { transform: scale(1.05); }

.carousel-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.carousel-info h3 { font-size: 1rem; font-weight: 500; margin-bottom: 0.25rem; }
.carousel-info p { font-size: 0.75rem; color: rgba(255,255,255,0.7); }

.carousel-hint {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: rgba(0,0,0,0.5);
  border-radius: 12px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.8);
  pointer-events: none;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.indicator {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
}

.indicator.active {
  background: rgba(45,212,191,0.8);
  width: 24px;
  border-radius: 4px;
}

/* 模块 */
.modules-section { position: relative; padding: 3rem 1rem; z-index: 1; }

.modules-container { max-width: 1000px; margin: 0 auto; }

.category-toggle {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.toggle-btn {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  cursor: pointer;
}

.toggle-btn.active {
  background: rgba(45,212,191,0.2);
  border-color: rgba(45,212,191,0.5);
  color: rgba(45,212,191,0.9);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) { .module-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }

.module-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 0.6rem;
  cursor: pointer;
  transition: all 0.3s;
}

.module-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
}

.module-cover {
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  background: rgba(255,255,255,0.05);
}

.module-cover img { width: 100%; height: 100%; object-fit: cover; }

.module-info h3 { font-size: 0.85rem; color: rgba(255,255,255,0.9); }
.module-info p { font-size: 0.65rem; color: rgba(255,255,255,0.4); }

/* 社交弹窗 */
.social-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}

.social-modal.active { display: flex; }

.modal-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 400px;
  background: rgba(20,20,25,0.98);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.1);
}

.modal-close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}

.modal-title {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s;
}

.social-link:first-child {
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(168,85,247,0.2));
  border: 1px solid rgba(99,102,241,0.3);
}

.social-link.bilibili {
  background: linear-gradient(135deg, rgba(236,72,153,0.2), rgba(239,68,68,0.2));
  border: 1px solid rgba(236,72,153,0.3);
}

.social-link:hover { transform: scale(1.02); }

/* 轮播图大图弹窗 */
.lightbox-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox-modal.active { display: flex; }

.lightbox-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.95);
}

.lightbox-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
}

.lightbox-content {
  position: relative;
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .lightbox-content { flex-direction: row; }
}

.lightbox-image-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
}

.lightbox-image-wrapper img {
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
  border-radius: 8px;
}

@media (min-width: 768px) {
  .lightbox-image-wrapper img { max-height: 80vh; }
}

.lightbox-info {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.1);
}

@media (min-width: 768px) {
  .lightbox-info { width: 300px; }
}

.lightbox-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.lightbox-info p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
}

.lightbox-exif {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.exif-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}

.exif-icon { font-size: 1rem; }

/* 图库列表页 */
.gallery-page {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background: #000;
  z-index: 50;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.gallery-page.active { display: flex; }

.gallery-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(0,0,0,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 10;
}

.gallery-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.8);
  background: none;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
}

.gallery-back svg { width: 20px; height: 20px; }

.gallery-title { font-size: 1.1rem; font-weight: 500; }

.gallery-count { font-size: 0.8rem; color: rgba(255,255,255,0.5); }

.gallery-list-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.gallery-list {
  padding: 1rem;
  padding-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
  column-count: 1;
  column-gap: 1rem;
}

.gallery-list-item {
  width: 100%;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
  break-inside: avoid;
  display: inline-block;
  background: rgba(255,255,255,0.03);
}

.gallery-list-item img {
  width: 100%;
  height: auto;
  transition: transform 0.3s;
  display: block;
}

.gallery-list-item:hover img { transform: scale(1.05); }

@media (min-width: 768px) {
  .gallery-list {
    column-count: 3;
    column-gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  .gallery-list-item {
    margin-bottom: 1.5rem;
  }
}

/* 图库大图弹窗 */
.photo-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.photo-modal.active { display: flex; }

.photo-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.95);
}

.photo-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
}

.photo-content {
  position: relative;
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .photo-content { flex-direction: row; }
}

.photo-image-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
}

.photo-image-wrapper img {
  max-width: 100%;
  max-height: 50vh;
  object-fit: contain;
  border-radius: 8px;
}

@media (min-width: 768px) {
  .photo-image-wrapper img { max-height: 80vh; }
}

.photo-info {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.1);
}

@media (min-width: 768px) {
  .photo-info { width: 300px; }
}

.photo-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.photo-info p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
}

.photo-exif {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
