/* 艺术摄影 - 术语表风格样式 */

/* CSS 变量 */
:root {
  --accent-color: #795548;
  --accent-light: #8d6e63;
  --accent-dark: #5d4037;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #fafafa;
  --bg-tertiary: #f5f5f5;
  --border-color: #e0e0e0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

/* 重置样式 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
}

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

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

ul {
  list-style: none;
}

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

/* 容器 */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.logo span {
  color: var(--text-primary);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-color);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  width: 200px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.search-box button {
  padding: 8px 16px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
}

.search-box button:hover {
  background: var(--accent-dark);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  padding: 60px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* A-Z Navigation */
.az-nav {
  background: var(--bg-primary);
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.az-nav .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.az-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  transition: all 0.2s;
}

.az-nav a:hover,
.az-nav a.active {
  background: var(--accent-color);
  color: #fff;
}

/* Section Title */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

/* Definition Item */
.definition-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

.definition-item:hover {
  box-shadow: var(--shadow-md);
}

.definition-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.definition-item h3 a {
  color: inherit;
}

.definition-item .category {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.definition-item p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Article Card */
.article-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.article-card:hover {
  box-shadow: var(--shadow-md);
}

.article-card .image {
  width: 100%;
  height: 180px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.article-card .content {
  padding: 16px;
}

.article-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.article-card h4 a {
  color: var(--text-primary);
}

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

.article-card .meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Article List */
.article-list li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-color);
}

.article-list li:last-child {
  border-bottom: none;
}

.article-list a {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-list a::before {
  content: "•";
  color: var(--accent-color);
}

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

/* Grid Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

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

/* Section */
.section {
  padding: 48px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

/* Term Detail */
.term-detail {
  max-width: 800px;
  margin: 0 auto;
}

.term-header {
  text-align: center;
  padding: 48px 0;
}

.term-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.term-header .meta {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.term-content {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.term-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.term-content h2:first-child {
  margin-top: 0;
}

.term-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.term-content ul {
  list-style: disc;
  padding-left: 24px;
  color: var(--text-secondary);
}

.term-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

/* Related Terms */
.related-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.related-terms a {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.related-terms a:hover {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

/* Breadcrumb */
.breadcrumb {
  background: var(--bg-secondary);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
}

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

.breadcrumb .sep {
  color: var(--text-muted);
}

.breadcrumb .current {
  color: var(--text-primary);
}

/* Sidebar Layout */
.with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
}

.sidebar .widget {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.sidebar .widget h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

/* 404 Page */
.error-page {
  min-height: calc(100vh - var(--header-height) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.error-content h1 {
  font-size: 8rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 16px;
}

.error-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.error-content p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent-color);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--accent-dark);
  color: #fff;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 24px;
}

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

.footer-brand h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-links h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 20px;
    gap: 12px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 20px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
  }

  .search-box {
    order: 2;
  }

  .search-box input {
    width: 140px;
  }

  .hero {
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .az-nav .container {
    gap: 6px;
  }

  .az-nav a {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .term-content {
    padding: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .error-content h1 {
    font-size: 5rem;
  }
}

@media (max-width: 480px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 32px 0;
  }
}
