/* ========================================
   每日大赛设计海报赛 - 主样式表
   视觉风格：纯白+柠檬黄赛事视觉
   ======================================== */

:root {
  --primary: #FACC15;
  --secondary: #111827;
  --bg: #FFFFFF;
  --card: #F9FAFB;
  --accent: #EC4899;
  --text: #111111;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  --font-heading: 'SF Pro Display', 'PingFang SC', 'Noto Sans SC', sans-serif;
  --font-body: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--secondary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.mono {
  font-family: var(--font-mono);
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.section-title p {
  color: #6B7280;
  margin-top: 1rem;
  font-size: 1.1rem;
}

/* Grid System */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

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

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

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #E5E7EB;
  padding: 1rem 0;
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--secondary);
}

.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.main-nav a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--secondary);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, #FFFBEB 0%, #FFFFFF 50%, #FEF3C7 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(250, 204, 21, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 204, 21, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridFadeIn 2s ease-in-out;
}

@keyframes gridFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--secondary) 0%, #374151 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text .subtitle {
  font-size: 1.2rem;
  color: #4B5563;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-poster {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-poster img {
  width: 100%;
  border-radius: var(--radius);
}

.hero-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--primary);
  color: var(--secondary);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

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

.btn-primary:hover {
  background: #EAB308;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(250, 204, 21, 0.4);
}

.btn-secondary {
  background: var(--secondary);
  color: #FFFFFF;
}

.btn-secondary:hover {
  background: #1F2937;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
}

.btn-outline:hover {
  background: var(--secondary);
  color: #FFFFFF;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid #E5E7EB;
}

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

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.card-desc {
  color: #6B7280;
  font-size: 0.9rem;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #E5E7EB;
  font-size: 0.85rem;
  color: #9CA3AF;
}

/* Poster Gallery */
.poster-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.poster-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  perspective: 1000px;
}

.poster-card-inner {
  position: relative;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.poster-card:hover .poster-card-inner {
  transform: rotateY(180deg);
}

.poster-front, .poster-back {
  backface-visibility: hidden;
  border-radius: var(--radius);
}

.poster-front {
  position: relative;
}

.poster-front img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius);
}

.poster-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--secondary);
  color: #FFFFFF;
  transform: rotateY(180deg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.poster-back h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.poster-back p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #D1D5DB;
}

/* Color Palette */
.palette-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
}

.palette-card {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  background: #FFFFFF;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #E5E7EB;
  margin-bottom: 1.5rem;
}

.palette-colors {
  display: flex;
  flex-direction: column;
  width: 80px;
  min-height: 120px;
}

.palette-colors .color-block {
  flex: 1;
  transition: var(--transition);
}

.palette-colors .color-block:hover {
  flex: 2;
}

.palette-info {
  padding: 1rem;
  flex: 1;
}

.palette-info h4 {
  margin-bottom: 0.5rem;
}

.palette-info .color-values {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.color-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: #F3F4F6;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  color: #6B7280;
}

/* Comparison Slider */
.comparison-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: col-resize;
}

.comparison-slider img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comparison-slider .slider-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.comparison-slider .slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transform: translateX(-50%);
  z-index: 10;
}

.comparison-slider .slider-handle::after {
  content: '⟷';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--secondary);
}

/* Score Bar */
.score-bar {
  margin-bottom: 1rem;
}

.score-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.score-bar-track {
  height: 8px;
  background: #E5E7EB;
  border-radius: 4px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1s ease-out;
}

/* Design Description Card */
.design-desc-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.design-desc-card h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--secondary);
}

.design-desc-card h4 .icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.9rem;
  color: #6B7280;
}

.breadcrumb a {
  color: #6B7280;
}

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

.breadcrumb span {
  margin: 0 0.5rem;
  color: #D1D5DB;
}

/* FAQ Section */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid #E5E7EB;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  padding: 1.2rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  transition: var(--transition);
}

.faq-question:hover {
  background: #F3F4F6;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
  transition: var(--transition);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-item.active .faq-answer {
  padding: 1rem 1.5rem 1.5rem;
  max-height: 500px;
}

/* Footer */
.site-footer {
  background: var(--secondary);
  color: #D1D5DB;
  padding: 4rem 0 2rem;
}

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

.footer-brand h3 {
  color: #FFFFFF;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #9CA3AF;
}

.footer-links h4 {
  color: #FFFFFF;
  font-size: 1rem;
  margin-bottom: 1rem;
}

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

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #9CA3AF;
  font-size: 0.9rem;
}

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

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #6B7280;
}

/* Search Page */
.search-box {
  max-width: 600px;
  margin: 0 auto 3rem;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 1rem 1.5rem;
  padding-right: 3.5rem;
  border: 2px solid #E5E7EB;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.2);
}

.search-box button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-result-item {
  padding: 1.5rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid #E5E7EB;
  transition: var(--transition);
}

.search-result-item:hover {
  border-color: var(--primary);
}

.search-result-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.search-result-item p {
  font-size: 0.9rem;
  color: #6B7280;
  margin-bottom: 0.5rem;
}

.search-result-item .result-path {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #9CA3AF;
}

.search-result-item .result-tag {
  display: inline-block;
  background: var(--primary);
  color: var(--secondary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* 404 Page */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

.error-page h1 {
  font-size: 8rem;
  color: var(--primary);
  line-height: 1;
}

.error-page h2 {
  margin: 1rem 0;
}

.error-page p {
  color: #6B7280;
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }

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

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-actions {
    justify-content: center;
  }

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

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

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: var(--shadow);
  }

  .main-nav.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .poster-gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .palette-card {
    flex-direction: column;
  }

  .palette-colors {
    width: 100%;
    min-height: 60px;
    flex-direction: row;
  }

  .comparison-slider {
    aspect-ratio: 4/3;
  }

  .section {
    padding: 2.5rem 0;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 3rem 0 2rem;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }

  .btn {
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
  }

  .poster-gallery {
    grid-template-columns: 1fr;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Page specific */
.page-header {
  background: linear-gradient(135deg, #FFFBEB 0%, #FFFFFF 100%);
  padding: 3rem 0;
  border-bottom: 1px solid #E5E7EB;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header p {
  color: #6B7280;
  font-size: 1.1rem;
}

.content-section {
  padding: 3rem 0;
}

.related-links {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 3rem;
}

.related-links h3 {
  margin-bottom: 1rem;
}

.related-links ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.related-links li a {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.related-links li a:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--secondary);
}

/* Brief Card */
.brief-card {
  background: linear-gradient(135deg, var(--secondary) 0%, #1F2937 100%);
  color: #FFFFFF;
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.brief-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.brief-card p {
  color: #D1D5DB;
}

.brief-card .brief-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.brief-card .spec-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 8px;
}

.brief-card .spec-item .label {
  font-size: 0.8rem;
  color: #9CA3AF;
  margin-bottom: 0.3rem;
}

.brief-card .spec-item .value {
  font-family: var(--font-mono);
  color: var(--primary);
  font-weight: 600;
}

/* Vote Button */
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 2px solid var(--primary);
  border-radius: 20px;
  color: var(--secondary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.vote-btn:hover {
  background: var(--primary);
}

.vote-btn.voted {
  background: var(--primary);
  pointer-events: none;
}

/* Upload Section */
.upload-area {
  border: 2px dashed #D1D5DB;
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.upload-area:hover {
  border-color: var(--primary);
  background: #FFFBEB;
}

.upload-area .upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Legal Pages */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 0;
}

.legal-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}

.legal-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

.legal-content ul, .legal-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
