/* 极限户外运动 - 活动日历风格样式 */

/* CSS 变量 */
:root {
  --accent-color: #9c27b0;
  --accent-light: #ba68c8;
  --accent-dark: #7b1fa2;
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #0f3460;
  --text-primary: #eaeaea;
  --text-secondary: #a0a0a0;
  --border-color: #2d3748;
  --success: #48bb78;
  --warning: #ed8936;
  --danger: #f56565;
  --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --radius: 8px;
  --radius-lg: 12px;
}

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

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

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

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

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

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

/* 头部 */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo::before {
  content: '⛰️';
}

.nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav a {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  width: 150px;
}

.search-box input::placeholder {
  color: var(--text-secondary);
}

.search-box button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
}

/* 面包屑 */
.breadcrumb {
  background: var(--bg-secondary);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

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

.breadcrumb span {
  margin: 0 0.5rem;
}

/* Hero 区域 */
.hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  padding: 3rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* 日历组件 */
.calendar-section {
  padding: 2rem 0;
}

.month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.month-nav button {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.2s;
}

.month-nav button:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.month-nav h2 {
  font-size: 1.5rem;
  min-width: 200px;
  text-align: center;
}

.calendar-widget {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-card);
  padding: 1rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-color);
}

.calendar-day {
  background: var(--bg-secondary);
  min-height: 80px;
  padding: 0.5rem;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.calendar-day:hover {
  background: var(--bg-card);
}

.calendar-day.other-month {
  color: var(--text-secondary);
  background: rgba(22, 33, 62, 0.5);
}

.calendar-day.today {
  background: rgba(156, 39, 176, 0.1);
}

.calendar-day.today .day-number {
  background: var(--accent-color);
  color: white;
}

.calendar-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--accent-color);
  border-radius: 50%;
}

.day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 500;
}

.event-markers {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 4px;
}

.event-marker {
  font-size: 0.625rem;
  padding: 1px 4px;
  background: var(--accent-dark);
  border-radius: 3px;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 文章列表 */
.posts-section {
  padding: 2rem 0;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--accent-color);
  border-radius: 2px;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-item {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.post-item:hover {
  border-color: var(--accent-color);
  transform: translateX(4px);
}

.post-thumb {
  width: 120px;
  height: 80px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
}

.post-content {
  flex: 1;
}

.post-title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.post-title:hover {
  color: var(--accent-color);
}

.post-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-date-group {
  margin-bottom: 2rem;
}

.post-date-header {
  font-size: 1.125rem;
  color: var(--accent-light);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

/* 三栏布局 */
.three-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
}

.column h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--accent-light);
}

.column-list {
  list-style: none;
}

.column-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.column-list a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  display: block;
  transition: all 0.2s;
}

.column-list a:hover {
  color: var(--accent-color);
  padding-left: 0.5rem;
}

/* 文章详情页 */
.article-section {
  padding: 2rem 0;
}

.article-header {
  text-align: center;
  margin-bottom: 2rem;
}

.article-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.article-featured-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--accent-light);
}

.article-content h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}

.article-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.article-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* 相关文章 */
.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.related-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.related-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-4px);
}

.related-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.related-card h4 {
  padding: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

/* 404 页面 */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 0;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

.error-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.error-desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-color);
  color: white;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

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

/* 页脚 */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-color);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

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

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

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

/* 响应式设计 */
@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav {
    gap: 1rem;
    font-size: 0.875rem;
  }

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

  .calendar-day {
    min-height: 50px;
    padding: 0.25rem;
  }

  .day-number {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  .event-marker {
    display: none;
  }

  .post-item {
    flex-direction: column;
  }

  .post-thumb {
    width: 100%;
    height: 160px;
  }

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

  .article-title {
    font-size: 1.5rem;
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

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

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .error-code {
    font-size: 5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .calendar-header {
    padding: 0.5rem;
    font-size: 0.75rem;
  }

  .month-nav h2 {
    font-size: 1.125rem;
    min-width: 150px;
  }
}
