/* ===== 天龙小蜜技术汇 - 主样式表 ===== */
:root {
  --primary: #1a2a4a;
  --primary-light: #2c4270;
  --accent: #d4a843;
  --accent-light: #e8c96a;
  --text: #2c3e50;
  --text-light: #6b7c93;
  --bg: #f5f7fa;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 2px 12px rgba(26, 42, 74, 0.08);
  --shadow-hover: 0 6px 24px rgba(26, 42, 74, 0.14);
  --radius: 10px;
  --transition: all 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
}

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

img { max-width: 100%; display: block; }

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

/* ===== 顶部导航 ===== */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-menu a {
  display: block;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  color: var(--text);
}

.nav-menu a:hover,
.nav-menu a.active {
  background: var(--primary);
  color: var(--white);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--primary);
}

/* ===== Hero 区域 ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  color: var(--primary);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

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

/* ===== 通用区块 ===== */
.section {
  padding: 70px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-light);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.section-title-bar {
  width: 50px;
  height: 4px;
  background: var(--accent);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* ===== 特色板块 ===== */
.features {
  background: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  text-align: center;
  padding: 36px 24px;
  border-radius: var(--radius);
  background: var(--bg);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  background: var(--white);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.feature-card h3 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
}

/* ===== 文章列表 ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.article-thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 48px;
  position: relative;
}

.article-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(212, 168, 67, 0.1) 100%);
}

.article-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.article-tag {
  background: rgba(212, 168, 67, 0.15);
  color: #a07c20;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.article-card h3 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.article-card h3 a { color: inherit; }
.article-card h3 a:hover { color: var(--accent); }

.article-excerpt {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 16px;
}

.article-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.article-more:hover { color: var(--accent); }

/* ===== 数据统计 ===== */
.stats {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item h3 {
  font-size: 42px;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-item p {
  font-size: 15px;
  opacity: 0.85;
}

/* ===== 教程列表 ===== */
.tutorial-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tutorial-item {
  display: flex;
  gap: 24px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  align-items: flex-start;
}

.tutorial-item:hover {
  box-shadow: var(--shadow-hover);
  transform: translateX(4px);
}

.tutorial-num {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.tutorial-content { flex: 1; }

.tutorial-content h3 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 8px;
}

.tutorial-content p {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 10px;
}

.tutorial-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-light);
}

.tutorial-meta span { display: flex; align-items: center; gap: 4px; }

/* ===== 关于页面 ===== */
.about-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.about-hero h1 { font-size: 36px; margin-bottom: 16px; }
.about-hero p { font-size: 17px; opacity: 0.9; max-width: 700px; margin: 0 auto; }

.about-content {
  background: var(--white);
  padding: 60px 0;
}

.about-text {
  max-width: 800px;
  margin: 0 auto;
}

.about-text h2 {
  color: var(--primary);
  font-size: 26px;
  margin: 32px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
}

.about-text h2:first-child { margin-top: 0; }

.about-text p {
  margin-bottom: 16px;
  color: var(--text);
  line-height: 1.9;
}

.about-text ul {
  margin: 16px 0;
  padding-left: 24px;
}

.about-text li {
  margin-bottom: 10px;
  line-height: 1.8;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0;
}

.value-card {
  text-align: center;
  padding: 30px 20px;
  background: var(--bg);
  border-radius: var(--radius);
}

.value-card .icon {
  font-size: 36px;
  margin-bottom: 14px;
}

.value-card h4 {
  color: var(--primary);
  font-size: 17px;
  margin-bottom: 8px;
}

.value-card p {
  color: var(--text-light);
  font-size: 14px;
  margin: 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 40px 0;
}

.team-card {
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 30px 20px;
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 28px;
  font-weight: 700;
}

.team-card h4 {
  color: var(--primary);
  font-size: 18px;
  margin-bottom: 4px;
}

.team-card .role {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.team-card p {
  color: var(--text-light);
  font-size: 13px;
  margin: 0;
  line-height: 1.7;
}

/* ===== 文章详情页 ===== */
.article-detail {
  background: var(--white);
  padding: 50px 0;
}

.article-wrapper {
  max-width: 820px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: 30px;
  color: var(--primary);
  line-height: 1.4;
  margin-bottom: 18px;
}

.article-header .meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-light);
}

.article-body-content h2 {
  color: var(--primary);
  font-size: 23px;
  margin: 36px 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}

.article-body-content h3 {
  color: var(--primary);
  font-size: 19px;
  margin: 28px 0 12px;
}

.article-body-content p {
  margin-bottom: 16px;
  line-height: 1.9;
  color: var(--text);
}

.article-body-content ul,
.article-body-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-body-content li {
  margin-bottom: 10px;
  line-height: 1.8;
}

.article-body-content code {
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
  color: #c0392b;
  font-family: "Consolas", "Monaco", monospace;
}

.article-body-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.7;
}

.article-body-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.article-body-content blockquote {
  border-left: 4px solid var(--accent);
  background: rgba(212, 168, 67, 0.08);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
  color: var(--text);
}

.article-body-content blockquote p { margin: 0; }

.article-tags {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.article-tags .tag {
  background: var(--bg);
  color: var(--text-light);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 20px;
}

.article-nav a {
  flex: 1;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 14px;
  transition: var(--transition);
}

.article-nav a:hover {
  background: var(--primary);
  color: var(--white);
}

.article-nav .nav-label {
  display: block;
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 4px;
}

/* ===== 联系页面 ===== */
.contact-section {
  padding: 60px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.contact-info {
  background: var(--white);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-info h3 {
  color: var(--primary);
  font-size: 22px;
  margin-bottom: 24px;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.contact-item:last-child { margin-bottom: 0; }

.contact-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.contact-item h4 {
  color: var(--primary);
  font-size: 15px;
  margin-bottom: 4px;
}

.contact-item p {
  color: var(--text-light);
  font-size: 14px;
  margin: 0;
}

.contact-form {
  background: var(--white);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-form h3 {
  color: var(--primary);
  font-size: 22px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  background: var(--bg);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== 页脚 ===== */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 50px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand h3 {
  color: var(--white);
  font-size: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
}

.footer-bottom p {
  margin-bottom: 6px;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.7);
}

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

.icp-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.icp-info .sep { opacity: 0.4; }

.police-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ===== 公告条 ===== */
.notice-bar {
  background: linear-gradient(90deg, rgba(212, 168, 67, 0.12), rgba(212, 168, 67, 0.05));
  border-bottom: 1px solid rgba(212, 168, 67, 0.2);
  padding: 10px 0;
  font-size: 14px;
}

.notice-bar .container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notice-label {
  background: var(--accent);
  color: var(--primary);
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.notice-text {
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  transition: var(--transition);
}

.pagination a:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.pagination .current {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow);
    gap: 4px;
  }
  .nav-menu.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 50px 0; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  .section { padding: 45px 0; }
  .section-header h2 { font-size: 24px; }
  .features-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .stat-item h3 { font-size: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .form-row { grid-template-columns: 1fr; }
  .tutorial-item { flex-direction: column; }
  .article-header h1 { font-size: 24px; }
  .article-nav { flex-direction: column; }
}
