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

body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.line {
  width: 100%;
  height: 3px;
  background: #e0e0e0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  margin-top: 1rem;
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  color: #2c3e50;
  letter-spacing: -0.03em;
  margin: 2rem 0 3rem;
  font-weight: 500;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: white;
  padding: 1.8rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-2px);
}

.card h3 {
  color: #2c3e50;
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 0.8rem;
}

.intro {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 3rem;
}

.intro img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
}

.intro-text {
  flex: 1;
}

.intro-text h2 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #2980b9;
}

footer {
  text-align: center;
  padding: 2rem;
  color: #999;
  font-size: 0.9rem;
}

.more {
  background: #3498db;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 1rem;
  transition: background 0.3s;
}

.more:hover {
  background: #2980b9;
}

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
}

.popup.show {
  display: flex;
  opacity: 1;
}

.popup-box {
  background: white;
  margin: auto;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.3s;
}

.popup.show .popup-box {
  transform: translateY(0);
}

.close {
  position: absolute;
  right: 1.5rem;
  top: 1rem;
  font-size: 1.8rem;
  cursor: pointer;
  color: #666;
  transition: color 0.3s;
}

.close:hover {
  color: #333;
}

.link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.link i {
  font-size: 1.3rem;
  width: 1.8rem;
  opacity: 0.9;
  transition: transform 0.3s;
}

.bili {
  color: #00a1d6 !important;
}
.tg {
  color: #0088cc !important;
}
.mail {
  color: #d44638 !important;
}
.gh {
  color: #24292f !important;
}

.link:hover i {
  transform: scale(1.1);
}

.theme {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

.theme button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.theme button:hover {
  transform: scale(1.1);
}

[data-theme="dark"] {
  background: #1a1a1a;
  color: #e0e0e0;
}

[data-theme="dark"] body {
  background: #1a1a1a;
}

[data-theme="dark"] .card,
[data-theme="dark"] .intro,
[data-theme="dark"] .popup-box,
[data-theme="dark"] .theme button {
  background: #2d2d2d;
  color: #e0e0e0;
  border-color: #404040;
}

[data-theme="dark"] h1,
[data-theme="dark"] .card h3,
[data-theme="dark"] .intro-text h2 {
  color: #fff;
  border-bottom-color: #404040;
}

[data-theme="dark"] .gh {
  color: #f0f6fc !important;
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .intro {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .intro img {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .card {
    padding: 1.2rem;
  }
}

.popup-box h3 {
  color: #2c3e50;
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 0.8rem;
}

.popup-box ul {
  padding-left: 1.5rem;
  list-style-type: disc;
}

.popup-box ul ul {
  margin: 0.8rem 0;
  list-style-type: circle;
}

.popup-box li {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.popup-box b {
  color: #3498db;
  font-weight: 600;
}

.popup-box::-webkit-scrollbar {
  width: 8px;
}

.popup-box::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.popup-box::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.popup-box::-webkit-scrollbar-thumb:hover {
  background: #666;
}

[data-theme="dark"] .popup-box {
  background: #2d2d2d;
}

[data-theme="dark"] .popup-box h3 {
  color: #fff;
  border-bottom-color: #404040;
}

[data-theme="dark"] .popup-box b {
  color: #61dafb;
}

[data-theme="dark"] .close {
  color: #e0e0e0;
}

[data-theme="dark"] .close:hover {
  color: #fff;
}

[data-theme="dark"] .popup-box::-webkit-scrollbar-track {
  background: #1a1a1a;
}

[data-theme="dark"] .popup-box::-webkit-scrollbar-thumb {
  background: #505050;
}

[data-theme="dark"] .popup-box::-webkit-scrollbar-thumb:hover {
  background: #606060;
}

.card,
.intro,
.popup-box,
.theme button {
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease,
    border-color 0.3s ease;
}

h1,
.card h3,
.intro-text h2,
.popup-box h3,
.popup-box b,
.close {
  transition: color 0.3s ease, border-color 0.3s ease;
}

.popup-box::-webkit-scrollbar-track,
.popup-box::-webkit-scrollbar-thumb {
  transition: background-color 0.3s ease;
}
