/* ============================================
   Studio Desk — 创作工作室风格
   拼贴式布局 × 手工质感 × 多样卡片 × 亲和力
   ============================================ */

/* ===== 全局重置 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* ===== Body — 木质桌面背景 ===== */
body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: linear-gradient(135deg, #d4a574 0%, #c4956a 50%, #b8860b 100%);
  background-attachment: fixed;
  color: #2c1810;
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* 木纹纹理 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(139, 90, 43, 0.05) 2px,
      rgba(139, 90, 43, 0.05) 4px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 50px,
      rgba(139, 90, 43, 0.03) 50px,
      rgba(139, 90, 43, 0.03) 52px
    );
  pointer-events: none;
  z-index: 0;
}

/* ===== 导航栏 — 便签板风格 ===== */
.sd-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 220, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid #8b4513;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0;
}

.sd-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  gap: 24px;
}

/* Logo — 手写风格 */
.sd-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #2c1810;
  font-family: 'Courier New', monospace;
  font-size: 24px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.sd-logo:hover {
  transform: rotate(-2deg) scale(1.05);
}

.sd-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
  color: white;
  border-radius: 50%;
  font-size: 28px;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 3px solid white;
}

.sd-logo-text {
  font-family: 'Georgia', serif;
  font-style: italic;
}

/* 导航链接 */
.sd-nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.sd-nav-links li a {
  display: block;
  padding: 10px 20px;
  background: #fff8dc;
  color: #2c1810;
  text-decoration: none;
  border-radius: 4px;
  font-family: 'Georgia', serif;
  font-size: 15px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #d4a574;
}

.sd-nav-links li a:hover {
  background: #ffe4b5;
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.15);
}

/* 右侧按钮 */
.sd-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sd-search-btn,
.sd-mobile-menu-btn {
  width: 44px;
  height: 44px;
  background: #fffacd;
  border: 2px solid #d4a574;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.sd-search-btn:hover,
.sd-mobile-menu-btn:hover {
  background: #ffe4b5;
  transform: rotate(5deg);
}

.sd-search-btn svg {
  width: 20px;
  height: 20px;
  stroke: #2c1810;
}

.sd-mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.sd-mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #2c1810;
  transition: all 0.3s ease;
}

/* ===== 搜索覆盖层 ===== */
.sd-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(139, 90, 43, 0.95);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sd-search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sd-search-overlay-inner {
  width: 90%;
  max-width: 600px;
  position: relative;
}

.sd-search-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 40px;
  height: 40px;
  background: #fff8dc;
  border: none;
  border-radius: 50%;
  font-size: 32px;
  cursor: pointer;
  color: #2c1810;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.sd-search-close:hover {
  background: #ffe4b5;
  transform: rotate(90deg);
}

.sd-search-box {
  display: flex;
  align-items: center;
  background: #fffacd;
  border-radius: 8px;
  padding: 16px 24px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
  border: 2px solid #d4a574;
}

.sd-search-box svg {
  width: 24px;
  height: 24px;
  stroke: #8b4513;
  margin-right: 16px;
  flex-shrink: 0;
}

.sd-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 18px;
  font-family: 'Georgia', serif;
  color: #2c1810;
  outline: none;
}

.sd-search-input::placeholder {
  color: #8b7355;
}

.sd-search-results {
  margin-top: 24px;
  max-height: 400px;
  overflow-y: auto;
}

/* ===== 主要内容区域 ===== */
.sd-main {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ===== 英雄区域 — 大照片卡片 ===== */
.sd-hero {
  margin-bottom: 60px;
  position: relative;
}

.sd-hero-label {
  display: inline-block;
  background: #ff6b6b;
  color: white;
  padding: 8px 20px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
  transform: rotate(-2deg);
  position: absolute;
  top: -10px;
  left: 20px;
  z-index: 2;
}

.sd-hero-card {
  display: block;
  background: #fff8dc;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: #2c1810;
  transition: all 0.4s ease;
  border: 3px solid #d4a574;
  position: relative;
}

.sd-hero-card::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 3;
}

.sd-hero-card::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: #c0c0c0;
  border-radius: 50%;
  border: 2px solid #808080;
  z-index: 4;
}

.sd-hero-card:hover {
  transform: translateY(-8px) rotate(-1deg);
  box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.2);
}

.sd-hero-card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.sd-hero-card-img {
  position: relative;
  overflow: hidden;
  height: 400px;
}

.sd-hero-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.sd-hero-card:hover .sd-hero-card-img img {
  transform: scale(1.05);
}

.sd-hero-card-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fffacd;
}

.sd-hero-card-tag {
  display: inline-block;
  background: #4ecdc4;
  color: white;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 20px;
  margin-bottom: 16px;
  align-self: flex-start;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.sd-hero-card-title {
  font-size: 32px;
  font-weight: bold;
  line-height: 1.3;
  margin-bottom: 16px;
  font-family: 'Georgia', serif;
}

.sd-hero-card-excerpt {
  font-size: 16px;
  line-height: 1.7;
  color: #5a4a3a;
  margin-bottom: 24px;
}

.sd-hero-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #8b4513;
  font-weight: bold;
}

.sd-hero-card-meta svg {
  width: 18px;
  height: 18px;
  stroke: #8b4513;
}

/* ===== 分隔线 — 胶带效果 ===== */
.sd-divider {
  margin: 60px 0;
  position: relative;
  height: 20px;
}

.sd-divider-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 20px,
    #d4a574 20px,
    #d4a574 22px
  );
}

.sd-divider::before,
.sd-divider::after {
  content: '';
  position: absolute;
  top: 0;
  width: 120px;
  height: 30px;
  background: rgba(255, 215, 0, 0.6);
  transform: rotate(-2deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sd-divider::before {
  left: 10%;
}

.sd-divider::after {
  right: 15%;
  transform: rotate(3deg);
  background: rgba(255, 182, 193, 0.6);
}

/* ===== 区块 — 便签板区域 ===== */
.sd-section {
  margin-bottom: 60px;
  position: relative;
}

.sd-section-header {
  margin-bottom: 32px;
  position: relative;
  display: inline-block;
}

.sd-section-label {
  display: inline-block;
  background: #ffd700;
  color: #2c1810;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.15);
  margin-bottom: 8px;
  transform: rotate(-1deg);
}

.sd-section-title {
  font-size: 36px;
  font-weight: bold;
  font-family: 'Georgia', serif;
  color: #2c1810;
  position: relative;
}

.sd-section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60%;
  height: 4px;
  background: #d4a574;
  border-radius: 2px;
}

/* ===== 拼贴式卡片网格 ===== */
.sd-collage {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  position: relative;
}

/* 卡片基础样式 */
.sd-card {
  display: block;
  background: #fff8dc;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.12);
  text-decoration: none;
  color: #2c1810;
  transition: all 0.4s ease;
  border: 2px solid #d4a574;
  position: relative;
}

/* 不同角度的卡片 */
.sd-card:nth-child(3n+1) {
  transform: rotate(-1deg);
}

.sd-card:nth-child(3n+2) {
  transform: rotate(0.5deg);
}

.sd-card:nth-child(3n+3) {
  transform: rotate(1deg);
}

/* 图钉效果 */
.sd-card::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: radial-gradient(circle at 30% 30%, #ff6b6b, #cc0000);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.sd-card:hover {
  transform: translateY(-8px) rotate(0deg) !important;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.18);
  z-index: 10;
}

.sd-card-img {
  position: relative;
  overflow: hidden;
  height: 180px;
}

.sd-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.sd-card:hover .sd-card-img img {
  transform: scale(1.08);
}

.sd-card-body {
  padding: 20px;
  background: #fffacd;
}

.sd-card-tag {
  display: inline-block;
  background: #4ecdc4;
  color: white;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 12px;
  margin-bottom: 12px;
}

.sd-card-title {
  font-size: 18px;
  font-weight: bold;
  line-height: 1.4;
  margin-bottom: 12px;
  font-family: 'Georgia', serif;
}

.sd-card-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: #5a4a3a;
}

/* 不同颜色的便签卡片 */
.sd-card:nth-child(5n+1) {
  background: #fff0f5;
  border-color: #ff69b4;
}

.sd-card:nth-child(5n+1) .sd-card-body {
  background: #ffe4e9;
}

.sd-card:nth-child(5n+2) {
  background: #f0fff0;
  border-color: #32cd32;
}

.sd-card:nth-child(5n+2) .sd-card-body {
  background: #e8f5e8;
}

.sd-card:nth-child(5n+3) {
  background: #fffaf0;
  border-color: #ffa500;
}

.sd-card:nth-child(5n+3) .sd-card-body {
  background: #fff5e6;
}

.sd-card:nth-child(5n+4) {
  background: #f0f8ff;
  border-color: #4169e1;
}

.sd-card:nth-child(5n+4) .sd-card-body {
  background: #e6f0ff;
}

.sd-card:nth-child(5n+5) {
  background: #fff5ee;
  border-color: #ff6347;
}

.sd-card:nth-child(5n+5) .sd-card-body {
  background: #ffe8e0;
}

/* ===== 特色卡片 — 大尺寸 ===== */
.sd-card-large {
  grid-column: span 2;
}

.sd-card-large .sd-card-img {
  height: 280px;
}

.sd-card-large .sd-card-title {
  font-size: 24px;
}

/* ===== 页脚 ===== */
.sd-footer {
  background: rgba(255, 248, 220, 0.95);
  border-top: 4px solid #8b4513;
  padding: 60px 24px 40px;
  margin-top: 80px;
  position: relative;
}

.sd-footer::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 40px;
  background: rgba(255, 215, 0, 0.5);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sd-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.sd-footer-section h3 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 20px;
  font-family: 'Georgia', serif;
  color: #2c1810;
  position: relative;
  display: inline-block;
}

.sd-footer-section h3::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 3px;
  background: #d4a574;
}

.sd-footer-section p {
  font-size: 15px;
  line-height: 1.7;
  color: #5a4a3a;
  margin-bottom: 12px;
}

.sd-footer-links {
  list-style: none;
  padding: 0;
}

.sd-footer-links li {
  margin-bottom: 12px;
}

.sd-footer-links a {
  color: #2c1810;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.3s ease;
  display: inline-block;
}

.sd-footer-links a:hover {
  color: #8b4513;
  transform: translateX(4px);
}

.sd-footer-bottom {
  max-width: 1400px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 2px dashed #d4a574;
  text-align: center;
  font-size: 14px;
  color: #5a4a3a;
}

/* ===== 动画效果 ===== */
.sd-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.sd-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  .sd-hero-card-inner {
    grid-template-columns: 1fr;
  }
  
  .sd-hero-card-img {
    height: 300px;
  }
  
  .sd-card-large {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .sd-nav-inner {
    padding: 12px 16px;
  }
  
  .sd-nav-links {
    display: none;
  }
  
  .sd-mobile-menu-btn {
    display: flex;
  }
  
  .sd-hero-card-title {
    font-size: 24px;
  }
  
  .sd-hero-card-body {
    padding: 24px;
  }
  
  .sd-section-title {
    font-size: 28px;
  }
  
  .sd-collage {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .sd-footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .sd-main {
    padding: 24px 16px;
  }
  
  .sd-logo-text {
    display: none;
  }
  
  .sd-hero-card-img {
    height: 220px;
  }
  
  .sd-hero-card-title {
    font-size: 20px;
  }
  
  .sd-section-title {
    font-size: 24px;
  }
  
  .sd-card-title {
    font-size: 16px;
  }
}

/* ===== 滚动条样式 ===== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #d4a574;
}

::-webkit-scrollbar-thumb {
  background: #8b4513;
  border-radius: 6px;
  border: 2px solid #d4a574;
}

::-webkit-scrollbar-thumb:hover {
  background: #6b3410;
}

/* ===== 打印样式 ===== */
@media print {
  body {
    background: white;
  }
  
  .sd-nav,
  .sd-search-overlay,
  .sd-footer {
    display: none;
  }
  
  .sd-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}