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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
  padding-top: 70px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
}

.logo {
  display: flex;
  align-items: center;
  min-width: 0;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-image {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 auto;
}

.logo-text {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-main {
  font-size: 24px;
  font-weight: bold;
  color: #ff4d4f;
  white-space: nowrap;
}

.logo-sub {
  padding-left: 10px;
  border-left: 1px solid #ddd;
  font-size: 12px;
  color: #666;
  line-height: 1.2;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #ff4d4f;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 126px 0 104px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 77, 79, 0.08) 0, rgba(255, 77, 79, 0) 34%),
    radial-gradient(circle at 82% 18%, rgba(255, 190, 92, 0.14) 0, rgba(255, 190, 92, 0) 28%),
    linear-gradient(180deg, #fffdfb 0%, #fffaf8 46%, #fff6f3 100%);
  color: #1f2329;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(17, 24, 39, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17, 24, 39, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 620px;
  height: 620px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 79, 0.1) 0%, rgba(255, 255, 255, 0) 72%);
  animation: pulse 4s ease-in-out infinite;
  z-index: 1;
}

.neuron {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  background: rgba(255, 77, 79, 0.28);
  box-shadow: 0 0 0 8px rgba(255, 77, 79, 0.05);
  animation: float 6s ease-in-out infinite;
}

.neuron::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  width: 2px;
  height: 100px;
  background: linear-gradient(to right, rgba(255, 77, 79, 0.18), transparent);
  transform: rotate(45deg);
}

.neuron:nth-child(1) {
  width: 10px;
  height: 10px;
  top: 18%;
  left: 10%;
}

.neuron:nth-child(2) {
  width: 8px;
  height: 8px;
  top: 58%;
  left: 82%;
  animation-delay: 1s;
}

.neuron:nth-child(3) {
  width: 12px;
  height: 12px;
  top: 35%;
  left: 90%;
  animation-delay: 2s;
}

.neuron:nth-child(4) {
  width: 6px;
  height: 6px;
  top: 80%;
  left: 18%;
  animation-delay: 3s;
}

.neuron:nth-child(5) {
  width: 10px;
  height: 10px;
  top: 24%;
  left: 70%;
  animation-delay: 4s;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  max-width: 980px;
  margin: 0 auto 20px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.14;
  font-weight: 700;
  color: #1d2129;
  letter-spacing: 0.01em;
  text-shadow: 0 10px 24px rgba(255, 255, 255, 0.65);
}

.hero p {
  max-width: 900px;
  margin: 0 auto;
  color: #5b6472;
  font-size: 18px;
  line-height: 2;
}

.section {
  padding: 44px 0;
}

#top,
#search,
#skills-section {
  scroll-margin-top: 86px;
}

.section-light {
  background: #f5f5f5;
}

.section-white {
  background: #fff;
}

.section-head {
  margin-bottom: 18px;
  text-align: center;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: 34px;
  color: #222;
}

.section-head p {
  max-width: 860px;
  margin: 0 auto;
  color: #666;
  font-size: 16px;
  line-height: 1.75;
}

.toolbar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 16px;
  align-items: stretch;
}

.search-panel,
.status-panel {
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 16px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-box:focus-within {
  border-color: #ff4d4f;
  box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.08);
}

.search-icon {
  color: #999;
  font-size: 18px;
}

.search-input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #333;
  font-size: 15px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f3f3f3;
  color: #555;
  transition: all 0.3s ease;
}

.filter-chip.active,
.filter-chip:hover {
  background: #ff4d4f;
  color: #fff;
}

.status-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.status-block {
  padding: 16px 18px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px solid #eee;
}

.status-label {
  margin-bottom: 8px;
  color: #999;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-value {
  font-size: 28px;
  font-weight: 700;
  color: #222;
}

.status-text {
  color: #666;
  font-size: 14px;
  line-height: 1.8;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  min-height: 248px;
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
}

.skill-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.skill-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-id {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff1f3;
  color: #cf222e;
  font-size: 12px;
  line-height: 1.4;
  font-family: Consolas, "Courier New", monospace;
}

.skill-desc {
  position: relative;
  margin: 16px 0 0;
  color: #666;
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.skill-desc.is-expandable {
  cursor: pointer;
}

.skill-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.skill-note {
  color: #888;
  font-size: 13px;
  line-height: 1.8;
}

.skill-note.builtin {
  color: #888;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 6px;
  background: #f0f0f0;
  transition: all 0.3s ease;
}

.builtin-btn:hover {
  background: #e7e7e7;
  color: #666;
  transform: translateY(-2px);
}

.install-btn {
  min-width: 110px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  background: #ff4d4f;
  color: #fff;
  transition: all 0.3s ease;
}

.install-btn:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

.empty {
  padding: 48px 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  text-align: center;
  color: #666;
}

.footer {
  padding: 34px 0 36px;
  background: #fff;
  border-top: 1px solid #eee;
  text-align: center;
}

.footer-title {
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 700;
  color: #ff4d4f;
}

.footer-text {
  color: #666;
  font-size: 14px;
  line-height: 1.9;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal.show {
  display: flex;
}

.modal-panel {
  width: min(100%, 820px);
  padding: 28px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.modal-panel-compact {
  width: min(100%, 760px);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.modal-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 77, 79, 0.12);
  color: #ff4d4f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.modal-title {
  margin: 12px 0 0;
  font-size: 28px;
  line-height: 1.2;
  color: #222;
}

.modal-note {
  margin: 0 0 18px;
  color: #666;
  font-size: 14px;
  line-height: 1.9;
}

.desc-modal-content {
  max-height: min(62vh, 520px);
  padding: 18px 20px;
  border: 1px solid #eee;
  border-radius: 14px;
  background: #fafafa;
  color: #444;
  font-size: 15px;
  line-height: 2;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
}

.prompt-box {
  width: 100%;
  min-height: 220px;
  padding: 18px;
  border: 1px solid #ddd;
  border-radius: 12px;
  resize: none;
  outline: none;
  background: #fafafa;
  color: #333;
  font: 14px/1.9 Consolas, "Courier New", monospace;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.copy-btn,
.close-btn,
.jump-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.copy-btn {
  background: #ff4d4f;
  color: #fff;
}

.close-btn {
  position: relative;
  flex: 0 0 auto;
  min-width: 42px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  background: #f5f5f5;
  color: #666;
  font-size: 0;
  line-height: 0;
}

.close-btn::before,
.close-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.close-btn::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.close-btn::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.jump-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff4d4f;
  color: #fff;
}

.copy-tip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: #666;
  font-size: 13px;
  line-height: 1.8;
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.copy-tip.is-success {
  color: #c5222d;
  background: rgba(255, 77, 79, 0.12);
  box-shadow: 0 10px 24px rgba(255, 77, 79, 0.14);
  animation: copySuccessPulse 0.7s ease;
}

.copy-btn:hover,
.close-btn:hover,
.jump-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.8;
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
}

@keyframes copySuccessPulse {
  0% {
    transform: translateY(0) scale(1);
  }

  35% {
    transform: translateY(-2px) scale(1.03);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }

  25% {
    transform: translateY(-20px) translateX(10px);
  }

  50% {
    transform: translateY(0) translateX(20px);
  }

  75% {
    transform: translateY(16px) translateX(8px);
  }
}

@media (max-width: 980px) {
  .navbar .container,
  .toolbar-grid,
  .skill-bottom,
  .modal-head {
    grid-template-columns: 1fr;
  }

  .navbar .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .toolbar-grid {
    display: grid;
  }

  .skill-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 92px 0 72px;
  }

  .hero p {
    font-size: 16px;
  }

  .nav-links {
    gap: 14px;
  }

  .section {
    padding: 36px 0;
  }

  .modal-panel,
  .search-panel,
  .status-panel,
  .skill-card {
    padding: 20px;
  }

  .copy-btn,
  .close-btn,
  .install-btn {
    width: 100%;
  }

  .close-btn {
    width: 42px;
  }

  .modal-actions {
    align-items: stretch;
  }
}
