:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-card: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --accent: #ff6b9d;
  --accent-hover: #ff5287;
  --border: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.1);
  --overlay: rgba(255, 255, 255, 0.9);
  --font-main: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

[data-theme="dark"] {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #1f2937;
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #707070;
  --accent: #ff6b9d;
  --accent-hover: #ff8ab5;
  --border: #374151;
  --shadow: rgba(0, 0, 0, 0.3);
  --overlay: rgba(26, 26, 46, 0.9);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  outline: none;
  transition: all var(--transition-fast);
}

input, textarea {
  font-family: inherit;
  outline: none;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 10px 15px;
  transition: border-color var(--transition-fast);
}

input:focus, textarea:focus {
  border-color: var(--accent);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--shadow);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
}

.header-nav {
  display: flex;
  gap: 25px;
}

.nav-link {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 5px;
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent);
  background: var(--bg-secondary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-toggle {
  background: none;
  font-size: 20px;
  padding: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: var(--bg-secondary);
}

.main-content {
  padding-top: 80px;
  min-height: calc(100vh - 60px);
  padding-bottom: 50px;
}

.avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
}

.page-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px var(--shadow);
  animation: avatarDrop 1s ease-out forwards;
}

@keyframes avatarDrop {
  0% {
    transform: translateY(-100vh);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.info-section {
  text-align: center;
  margin-top: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.info-line {
  opacity: 0;
  animation: textReveal 0.5s ease-out forwards;
  margin: 10px 0;
}

.info-line:nth-child(1) { animation-delay: 0.2s; }
.info-line:nth-child(2) { animation-delay: 0.4s; }
.info-line:nth-child(3) { animation-delay: 0.6s; }
.info-line:nth-child(4) { animation-delay: 0.8s; }
.info-line:nth-child(5) { animation-delay: 1.0s; }

@keyframes textReveal {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.info-nickname {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-primary);
}

.info-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  color: var(--text-secondary);
  font-size: 14px;
}

.info-bio {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line;
}

.info-email {
  color: var(--accent);
  font-size: 14px;
}

.btn-section {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 25px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 157, 0.3);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
}

.content-list {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px;
}

.content-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 2px 10px var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.content-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.card-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-primary);
}

.card-meta {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: var(--text-muted);
}

.card-content {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 15px;
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
  padding: 20px;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-normal);
}

.gallery-item:hover {
  transform: scale(1.07);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.gallery-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
}

.gallery-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
}

.gallery-desc {
  font-size: 12px;
  opacity: 0.8;
}

.gallery-meta {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
}

.gallery-tags {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 5px;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 16px;
}

.footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
}

.toast {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 5px 20px var(--shadow);
  margin-bottom: 10px;
  transform: translateX(120%);
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  border-left: 4px solid #4caf50;
}

.toast-error {
  border-left: 4px solid #f44336;
}

.toast-info {
  border-left: 4px solid #2196f3;
}

.notice-popup {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(255, 107, 157, 0.4);
  z-index: 9998;
  max-width: 500px;
  text-align: center;
}

.notice-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  color: white;
  font-size: 18px;
  padding: 5px;
}

.notice-popup.hidden {
  display: none;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px;
}

.loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .header {
    padding: 0 15px;
  }

  .header-nav {
    gap: 10px;
  }

  .nav-link {
    font-size: 13px;
    padding: 5px 8px;
  }

  .page-avatar {
    width: 120px;
    height: 120px;
  }

  .info-nickname {
    font-size: 22px;
  }

  .info-row {
    flex-direction: column;
    gap: 5px;
  }

  .btn-section {
    flex-direction: column;
    align-items: center;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}
