/* ========================================
   赵丁伊个人主页 - 主题样式
   可爱·清新·二次元
   ======================================== */

:root {
  --primary: #ff6b9d;
  --primary-light: #ffb3c6;
  --primary-dark: #e84a7a;
  --secondary: #a78bfa;
  --secondary-light: #c4b5fd;
  --accent: #fbbf24;
  --bg: #fdf2f8;
  --bg-card: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #f3e8ff;
  --shadow: 0 4px 24px rgba(255, 107, 157, 0.12);
  --shadow-hover: 0 8px 40px rgba(255, 107, 157, 0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-cn: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-en: "Nunito", "Poppins", system-ui, sans-serif;

  /* 动画变量 */
  --float-duration: 4s;
  --bounce-duration: 0.6s;
}

/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-cn);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 107, 157, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(167, 139, 250, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(251, 191, 36, 0.04) 0%, transparent 50%);
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ========== Loading Screen ========== */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s, visibility 0.6s;
}
#loading-screen.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loading-star {
  font-size: 3rem;
  animation: starPulse 1.2s ease-in-out infinite;
}
.loading-text {
  margin-top: 16px;
  font-size: 1rem;
  color: var(--text-muted);
  animation: textFade 1.5s ease-in-out infinite;
}

@keyframes starPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}
@keyframes textFade {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ========== Navigation ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.nav.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
  font-family: var(--font-en);
}
.nav-brand span { font-family: var(--font-cn); }
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(255, 107, 157, 0.1);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

/* ========== Hero Section ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 60px;
  position: relative;
  overflow: hidden;
}
.hero-bg-decor {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  pointer-events: none;
}
.hero-bg-decor:nth-child(1) {
  width: 400px; height: 400px;
  background: var(--primary-light);
  top: -100px; right: -100px;
  animation: float-slow 8s ease-in-out infinite;
}
.hero-bg-decor:nth-child(2) {
  width: 300px; height: 300px;
  background: var(--secondary-light);
  bottom: -50px; left: -50px;
  animation: float-slow 10s ease-in-out infinite reverse;
}
.hero-bg-decor:nth-child(3) {
  width: 150px; height: 150px;
  background: var(--accent);
  top: 40%; left: 10%;
  opacity: 0.08;
  animation: float-slow 6s ease-in-out infinite;
}
@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(5deg); }
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 700px;
}
.hero-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}
.hero-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 8px 32px rgba(255, 107, 157, 0.2);
  transition: var(--transition);
}
.hero-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 48px rgba(255, 107, 157, 0.3);
}
.hero-avatar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px dashed var(--primary-light);
  animation: spin-slow 20s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

.hero-emoji-float {
  position: absolute;
  font-size: 1.5rem;
  animation: floatAround 3s ease-in-out infinite;
}
.hero-emoji-float:nth-child(2) { top: -10px; right: -20px; animation-delay: 0s; }
.hero-emoji-float:nth-child(3) { bottom: 0; left: -15px; animation-delay: 0.5s; }
.hero-emoji-float:nth-child(4) { top: 20%; right: -30px; animation-delay: 1s; }

@keyframes floatAround {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(10deg); }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  line-height: 1.2;
}
.hero .subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: var(--font-en);
}
.hero .bio-line {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 24px;
}
.hero-badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: white;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 107, 157, 0.15);
  border-color: var(--primary-light);
}
.badge .emoji { font-size: 1rem; }

.hero-scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
  font-size: 0.75rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ========== Section Common ========== */
.section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.section-header .section-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ========== Card Grid ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.card-grid.small {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* ========== Card ========== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.card-image-wrap {
  position: relative;
  width: 100%;
  padding-top: 66.67%;
  overflow: hidden;
  background: #f3f4f6;
}
.card-image-wrap.square { padding-top: 100%; }
.card-image-wrap.wide { padding-top: 56.25%; }
.card-image-wrap img,
.card-image-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.card:hover .card-image-wrap img,
.card:hover .card-image-wrap video {
  transform: scale(1.05);
}
.card-image-wrap .play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  transition: var(--transition);
}
.card-image-wrap .play-btn::after {
  content: '▶';
  font-size: 3rem;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.card-image-wrap:hover .play-btn {
  background: rgba(0,0,0,0.15);
}
.card-body {
  padding: 16px 20px 20px;
}
.card-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.card-body .card-meta {
  font-size: 0.82rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.card-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}
.card-tag {
  font-size: 0.75rem;
  padding: 2px 10px;
  background: var(--bg);
  border-radius: 12px;
  color: var(--text-muted);
}

/* ========== Timeline ========== */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary-light), var(--secondary-light));
  transform: translateX(-50%);
}
.timeline-item {
  position: relative;
  margin-bottom: 48px;
  width: 100%;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid white;
  box-shadow: 0 0 0 3px var(--primary-light);
  z-index: 2;
}
.timeline-content {
  width: calc(50% - 40px);
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.timeline-content:hover {
  box-shadow: var(--shadow-hover);
}
.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
}
.timeline-item:nth-child(even) .timeline-content {
  margin-right: auto;
}
.timeline-content .tl-date {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  font-family: var(--font-en);
  margin-bottom: 4px;
}
.timeline-content h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.timeline-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
}
.timeline-content .tl-media {
  margin-top: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.timeline-content .tl-media img,
.timeline-content .tl-media video {
  width: 100%;
  border-radius: var(--radius-sm);
}

/* ========== Interests ========== */
.interests-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 16px 4px 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.interests-scroll::-webkit-scrollbar { height: 6px; }
.interests-scroll::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }
.interest-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 2px solid transparent;
}
.interest-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-hover);
}
.interest-card .interest-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
}
.interest-card h3 { font-size: 1rem; margin-bottom: 4px; }
.interest-card p { font-size: 0.82rem; color: var(--text-muted); }

/* ========== Lightbox ========== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 20px;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  object-fit: contain;
}
.lightbox video.lightbox-content { background: #000; }
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.3);
}
.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.9rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  max-width: 80%;
  text-align: center;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ========== Footer ========== */
.footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.footer .footer-heart {
  color: var(--primary);
  display: inline-block;
  animation: heartbeat 1.5s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ========== Animations ========== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-up:nth-child(2) { transition-delay: 0.1s; }
.fade-in-up:nth-child(3) { transition-delay: 0.2s; }
.fade-in-up:nth-child(4) { transition-delay: 0.3s; }
.fade-in-up:nth-child(5) { transition-delay: 0.4s; }
.fade-in-up:nth-child(6) { transition-delay: 0.5s; }

/* ========== Category Tabs ========== */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}
.category-tab {
  padding: 8px 20px;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: white;
  color: var(--text-muted);
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-cn);
}
.category-tab:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}
.category-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 0.95rem; }

/* ========== Section Background Alternation ========== */
.section-alt {
  background: linear-gradient(180deg, var(--bg), rgba(167, 139, 250, 0.04), var(--bg));
  padding: 80px 20px;
}
.section-alt > .section { padding: 0; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .hero h1 { font-size: 2.2rem; }
  .hero-avatar { width: 120px; height: 120px; }

  .card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
  .card-grid.small { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

  .section { padding: 60px 16px; }
  .section-alt { padding: 60px 16px; }

  .timeline::before { left: 24px; }
  .timeline-dot { left: 24px; }
  .timeline-content {
    width: calc(100% - 56px);
    margin-left: 56px !important;
    margin-right: 0 !important;
  }

  .interests-scroll { padding-bottom: 16px; }
  .interest-card { flex: 0 0 180px; }

  .lightbox-content { max-width: 95vw; max-height: 70vh; }
  .lightbox-nav { width: 36px; height: 36px; font-size: 1rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .card-grid { grid-template-columns: 1fr; }
  .badge { font-size: 0.78rem; padding: 4px 12px; }
}
