/* 运动相机 - 日历归档风格样式表 */

/* CSS 变量 */
:root {
  --accent-color: #ff6b35;
  --primary-color: #1a1a2e;
  --secondary-color: #16213e;
  --text-color: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg-color: #f8f9fa;
  --bg-white: #fff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-sm: 4px;
  --max-width: 1200px;
  --gap: 24px;
  --gap-sm: 16px;
}

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

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

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

a:hover {
  text-decoration: underline;
}

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

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

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

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

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

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

.nav {
  display: flex;
  gap: var(--gap);
}

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

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-color);
  border-radius: var(--radius);
  padding: 6px 12px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 160px;
  font-size: 13px;
}

.search-box button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
}

/* 面包屑 */
.breadcrumb {
  padding: var(--gap-sm) 0;
  font-size: 13px;
  color: var(--text-light);
}

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

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

/* 主内容区 */
.main {
  padding: var(--gap) 0;
}

/* Hero区域 */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #fff;
  padding: 48px 0;
  text-align: center;
  margin-bottom: var(--gap);
}

.hero h1 {
  font-size: 32px;
  margin-bottom: 12px;
}

.hero p {
  font-size: 16px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* 日历组件 */
.calendar-section {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: var(--gap);
  margin-bottom: var(--gap);
  box-shadow: var(--shadow);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.calendar-header h2 {
  font-size: 20px;
  min-width: 180px;
  text-align: center;
}

.calendar-header button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.calendar-header button:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.calendar {
  width: 100%;
  border-collapse: collapse;
}

.calendar th {
  padding: 12px 8px;
  font-weight: 600;
  color: var(--text-light);
  font-size: 13px;
  text-transform: uppercase;
}

.calendar td {
  width: 14.28%;
  height: 80px;
  border: 1px solid var(--border-color);
  vertical-align: top;
  padding: 8px;
  position: relative;
}

.calendar td.other-month {
  background: var(--bg-color);
  color: var(--text-muted);
}

.calendar td.today {
  background: rgba(255, 107, 53, 0.08);
}

.calendar td.today .date-num {
  background: var(--accent-color);
  color: #fff;
}

.calendar .date-num {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
}

.calendar .event-dots {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.calendar .event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-color);
}

.calendar .event-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 11px;
  color: var(--accent-color);
  font-weight: 600;
}

/* 文章列表 */
.section-title {
  font-size: 18px;
  margin-bottom: var(--gap-sm);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}

.post-list {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: var(--gap);
  margin-bottom: var(--gap);
  box-shadow: var(--shadow);
}

.post-item {
  display: flex;
  gap: var(--gap-sm);
  padding: var(--gap-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

.post-item:last-child {
  border-bottom: none;
}

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

.post-content {
  flex: 1;
}

.post-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--primary-color);
  line-height: 1.4;
}

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

.post-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

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

/* 三栏布局 */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.col-section {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: var(--gap);
  box-shadow: var(--shadow);
}

.col-section h3 {
  font-size: 15px;
  margin-bottom: var(--gap-sm);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

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

.col-section li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}

.col-section li:last-child {
  border-bottom: none;
}

.col-section a {
  color: var(--text-color);
  font-size: 13px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* 分类页样式 */
.archive-header {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: var(--gap);
  margin-bottom: var(--gap);
  box-shadow: var(--shadow);
  text-align: center;
}

.archive-header h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.archive-header p {
  color: var(--text-light);
}

.posts-by-day {
  margin-top: var(--gap);
}

.day-group {
  margin-bottom: var(--gap);
}

.day-group h3 {
  font-size: 15px;
  color: var(--accent-color);
  margin-bottom: var(--gap-sm);
  padding-left: 12px;
  border-left: 3px solid var(--accent-color);
}

/* 文章页样式 */
.article-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--gap);
}

.article-main {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: var(--gap);
  box-shadow: var(--shadow);
}

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

.article-header h1 {
  font-size: 26px;
  line-height: 1.4;
  margin-bottom: var(--gap-sm);
}

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

.article-cover {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--gap);
  background: var(--bg-color);
}

.article-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-color);
}

.article-body p {
  margin-bottom: var(--gap);
}

.article-body h2 {
  font-size: 20px;
  margin: var(--gap) 0 var(--gap-sm);
  color: var(--primary-color);
}

.article-body h3 {
  font-size: 17px;
  margin: var(--gap) 0 var(--gap-sm);
  color: var(--primary-color);
}

.article-body img {
  border-radius: var(--radius);
  margin: var(--gap) 0;
}

.article-body ul,
.article-body ol {
  margin-bottom: var(--gap);
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

/* 侧边栏 */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.sidebar-section {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: var(--gap);
  box-shadow: var(--shadow);
}

.sidebar-section h3 {
  font-size: 15px;
  margin-bottom: var(--gap-sm);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-color);
}

.sidebar-section ul {
  list-style: none;
}

.sidebar-section li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
}

.sidebar-section li:last-child {
  border-bottom: none;
}

.sidebar-section a {
  color: var(--text-color);
  font-size: 13px;
  display: block;
}

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

/* 相关文章 */
.related-posts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-sm);
  margin-top: var(--gap);
}

.related-post {
  display: flex;
  gap: 12px;
}

.related-post img {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-color);
}

.related-post h4 {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

/* 404页面 */
.error-page {
  text-align: center;
  padding: 80px var(--gap);
}

.error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: var(--gap);
}

.error-title {
  font-size: 24px;
  margin-bottom: var(--gap-sm);
}

.error-desc {
  color: var(--text-light);
  margin-bottom: var(--gap);
}

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

.btn:hover {
  background: #e55a2b;
  text-decoration: none;
}

/* 页脚 */
.footer {
  background: var(--primary-color);
  color: #fff;
  padding: var(--gap) 0;
  margin-top: var(--gap);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--gap);
  padding-bottom: var(--gap);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.footer-brand h3 span {
  color: var(--accent-color);
}

.footer-brand p {
  font-size: 13px;
  opacity: 0.8;
  line-height: 1.6;
}

.footer-section h4 {
  font-size: 14px;
  margin-bottom: var(--gap-sm);
}

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

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

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

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

.footer-bottom {
  padding-top: var(--gap-sm);
  text-align: center;
  font-size: 13px;
  opacity: 0.6;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .article-container {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
    gap: var(--gap-sm);
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: var(--gap-sm);
  }

  .hero h1 {
    font-size: 24px;
  }

  .calendar td {
    height: 60px;
    padding: 4px;
  }

  .calendar .date-num {
    width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: 12px;
  }

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

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

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

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

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .calendar th {
    font-size: 11px;
    padding: 8px 4px;
  }

  .calendar td {
    height: 48px;
  }

  .event-dots {
    display: none;
  }

  .article-header h1 {
    font-size: 20px;
  }

  .article-cover {
    height: 200px;
  }
}
