/* ============================================================
   我的小破站 - 主样式表（深墨绿 + 金色高端风）
   ============================================================ */

:root {
  --bg: #0d2b1a;
  --bg-alt: #0f2e1c;
  --card: #143828;
  --card-hover: #1a422e;
  --border: rgba(201, 169, 97, 0.18);
  --text: #f0ede5;
  --text-muted: #8fa88a;
  --primary: #c9a961;
  --primary-light: #d4b978;
  --accent: #e8d5a3;
  --gradient: linear-gradient(135deg, #b8934a, #c9a961, #e8d5a3);
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --transition: all 0.3s ease;
  --nav-height: 68px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: "Inter", "Noto Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* ---------- 渐变文字（金色） ---------- */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================
   导航栏
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar.scrolled {
  background: #0b2416;
  border-bottom-color: rgba(201, 169, 97, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: var(--primary);
}

.brand-logo-img {
  display: inline-block;
  height: 40px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
}

.brand-name {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-radius: 8px;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(201, 169, 97, 0.1);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(201, 169, 97, 0.12);
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   Hero 区域（深墨绿纯色 + 金色大标题 + 底部插画）
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(var(--nav-height) + 40px) 0 0;
  background: var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg .orb,
.hero-bg .grid-overlay {
  display: none;
}

.hero-inner {
  text-align: center;
  position: relative;
  z-index: 1;
  padding-bottom: 20px;
}

.hero-tag {
  display: inline-block;
  padding: 6px 18px;
  border: 1px solid rgba(201, 169, 97, 0.35);
  border-radius: 999px;
  background: rgba(201, 169, 97, 0.08);
  color: var(--primary-light);
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 22px;
  color: var(--text);
}

.hero-title .gradient-text {
  font-weight: 900;
}

.cursor {
  display: inline-block;
  color: var(--primary);
  font-weight: 400;
  animation: blink 0.9s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 36px;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.btn {
  display: inline-block;
  padding: 13px 36px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient);
  color: var(--bg);
  box-shadow: 0 10px 30px rgba(201, 169, 97, 0.25);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(201, 169, 97, 0.4);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

/* 底部房屋插画 */
.hero-house {
  width: 100%;
  max-width: 720px;
  margin: 10px auto 0;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

.hero-house img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* 滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.8;
}

.mouse {
  display: block;
  width: 26px;
  height: 42px;
  border: 2px solid var(--text-muted);
  border-radius: 16px;
  position: relative;
}

.wheel {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 3px;
  background: var(--text-muted);
  animation: scroll 1.8s ease-in-out infinite;
}

@keyframes scroll {
  0% { opacity: 1; transform: translate(-50%, 0); }
  70% { opacity: 0; transform: translate(-50%, 12px); }
  100% { opacity: 0; }
}

/* ============================================================
   通用区块
   ============================================================ */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  text-align: center;
  margin-bottom: 60px;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  color: var(--text);
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* ============================================================
   关于我
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: var(--transition);
}

.about-card:hover {
  transform: translateY(-8px);
  background: var(--card-hover);
  border-color: rgba(201, 169, 97, 0.4);
  box-shadow: var(--shadow);
}

.about-icon {
  font-size: 2.6rem;
  margin-bottom: 16px;
}

.about-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--text);
}

.about-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================================
   开发项目
   ============================================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(201, 169, 97, 0.4);
  box-shadow: var(--shadow);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.project-icon {
  font-size: 2.2rem;
}

.project-status {
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(201, 169, 97, 0.12);
  color: var(--primary);
  border: 1px solid rgba(201, 169, 97, 0.3);
}

.project-status:last-child {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}

.project-card h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
  color: var(--text);
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.93rem;
  flex: 1;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.project-tags span {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(201, 169, 97, 0.1);
  color: var(--primary-light);
  border: 1px solid rgba(201, 169, 97, 0.2);
}

.project-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
}

.project-link:hover {
  letter-spacing: 0.5px;
}

/* ============================================================
   API 接口
   ============================================================ */
.api-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.api-item {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 24px;
  transition: var(--transition);
}

.api-item:hover {
  border-color: rgba(201, 169, 97, 0.4);
  transform: translateX(6px);
}

.api-method {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 7px;
  background: rgba(201, 169, 97, 0.15);
  color: var(--primary);
  letter-spacing: 0.5px;
}

.api-method.get { background: rgba(52, 211, 153, 0.12); color: #34d399; }
.api-method.post { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }

.api-info {
  flex: 1;
  min-width: 0;
}

.api-info code {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(201, 169, 97, 0.1);
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-block;
  word-break: break-all;
}

.api-info p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 6px;
}

.api-badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.api-footer {
  text-align: center;
  margin-top: 30px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================================
   云服务
   ============================================================ */
.cloud-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.cloud-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: var(--transition);
}

.cloud-card:hover {
  transform: translateY(-6px);
  background: var(--card-hover);
  border-color: rgba(201, 169, 97, 0.35);
  box-shadow: var(--shadow);
}

.cloud-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
}

.cloud-logo.aliyun { background: linear-gradient(135deg, #ff6a00, #ff9a44); }
.cloud-logo.tencent { background: linear-gradient(135deg, #0085ff, #00c6ff); }
.cloud-logo.baidu { background: linear-gradient(135deg, #2932e1, #4e6ef2); }
.cloud-logo.github { background: linear-gradient(135deg, #24292f, #57606a); }

.cloud-info {
  flex: 1;
  min-width: 0;
}

.cloud-info h3 {
  font-size: 1rem;
  margin-bottom: 2px;
  color: var(--text);
}

.cloud-info p {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cloud-arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition);
}

.cloud-card:hover .cloud-arrow {
  color: var(--primary);
  transform: translate(3px, -3px);
}

/* ============================================================
   联系方式
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}

.contact-card {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 20px;
  transition: var(--transition);
}

.contact-card:hover {
  transform: translateY(-8px);
  border-color: rgba(201, 169, 97, 0.4);
  box-shadow: var(--shadow);
}

/* 微信卡片 */
.wechat-card {
  cursor: default;
}

.wechat-card:hover {
  transform: translateY(-8px);
}

.wechat-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.wechat-qr {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 6px;
  transition: transform 0.3s ease;
  display: block;
  margin: 0 auto;
}

.wechat-card:hover .wechat-qr {
  transform: scale(1.06);
}

.contact-icon {
  display: inline-block;
  font-size: 2rem;
  margin-bottom: 12px;
}

.contact-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--text);
}

.contact-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================================
   页脚
   ============================================================ */
.footer {
  background: #0b2416;
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.footer-brand h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 300px;
}

.footer-links h4 {
  font-size: 0.95rem;
  margin-bottom: 14px;
  color: var(--text);
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 8px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.icp-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  white-space: nowrap;
}

.icp-link {
  color: var(--text-muted);
  transition: var(--transition);
}

.icp-link:hover {
  color: var(--primary);
}

.icp-sep {
  margin: 0 6px;
  color: var(--text-muted);
  opacity: 0.6;
}

.mps-link {
  /* display: inline-flex; */
  display: flex;
  align-items: center;
  vertical-align: middle;
  line-height: 1;
}

.mps-logo {
  width: 16px;
  height: 17.2875px;
  object-fit: contain;
  opacity: 0.75;
  transition: var(--transition);
}

.mps-link:hover .mps-logo {
  opacity: 1;
}

/* ============================================================
   回到顶部
   ============================================================ */
.back-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: var(--transition);
  z-index: 90;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  background: var(--gradient);
  color: var(--bg);
  border-color: transparent;
}

/* ============================================================
   滚动入场动画
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 992px) {
  .about-grid,
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cloud-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(13, 43, 26, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 10px 6vw 20px;
    transform: translateY(-120%);
    transition: transform 0.35s ease;
    visibility: hidden;
  }

  .nav-links.open {
    transform: translateY(0);
    visibility: visible;
  }

  .nav-link {
    padding: 13px 16px;
    font-size: 1rem;
  }

  .section {
    padding: 72px 0;
  }

  .about-grid,
  .project-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 30px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .api-item {
    flex-wrap: wrap;
  }

  .hero-house {
    max-width: 90vw;
  }
}

@media (max-width: 480px) {
  .cloud-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

/* ---------- 减少动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .wheel {
    animation: none;
  }
}
