/* ===== 每日大赛AI创作提示词赛 - 全局样式 ===== */
:root {
  --primary: #0F172A;
  --secondary: #00FF88;
  --bg: #020617;
  --card: #111827;
  --accent: #38BDF8;
  --text: #E2E8F0;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.12);
  --font-heading: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --max-width: 1280px;
  --transition: all 0.3s ease;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.5em;
}

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

p {
  margin-bottom: 1em;
}

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.site-logo svg {
  width: 28px;
  height: 28px;
}

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

.nav-main a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: var(--transition);
}

.nav-main a:hover,
.nav-main a.active {
  color: var(--secondary);
  background: rgba(0, 255, 136, 0.08);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== Hero Section ===== */
.hero-lab {
  position: relative;
  padding: 4rem 0 3rem;
  overflow: hidden;
}

.hero-lab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(0, 255, 136, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(56, 189, 248, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.hero-prompt-area {
  background: var(--card);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
}

.prompt-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.prompt-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.prompt-dot.red { background: #FF5F56; }
.prompt-dot.yellow { background: #FFBD2E; }
.prompt-dot.green { background: #27C93F; }

.prompt-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.6);
  margin-left: 0.5rem;
}

.prompt-content {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--secondary);
  white-space: pre-wrap;
  word-break: break-all;
}

.prompt-content .keyword {
  color: var(--accent);
}

.prompt-content .comment {
  color: rgba(226, 232, 240, 0.4);
}

.hero-result-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.result-card {
  background: var(--card);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.result-card:hover {
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 136, 0.1);
}

.result-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.result-card-info {
  padding: 0.8rem;
}

.result-card-info span {
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.6);
}

/* ===== Today Challenge ===== */
.today-challenge {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.03), rgba(56, 189, 248, 0.03));
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}

.challenge-badge {
  display: inline-block;
  background: rgba(0, 255, 136, 0.1);
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.challenge-title {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.challenge-desc {
  color: rgba(226, 232, 240, 0.7);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.challenge-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.challenge-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.6);
}

.challenge-meta-item strong {
  color: var(--accent);
}

/* ===== Section Common ===== */
.section {
  padding: 3rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  border-radius: 2px;
}

.section-header p {
  color: rgba(226, 232, 240, 0.6);
  margin-top: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Cards Grid ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(0, 255, 136, 0.2);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(0, 255, 136, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--secondary);
  font-size: 1.4rem;
}

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

.card p {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.7);
}

/* ===== Parameter Card ===== */
.param-card {
  background: var(--card);
  border: 1px solid rgba(56, 189, 248, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.param-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.param-row:last-child {
  border-bottom: none;
}

.param-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.5);
}

.param-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

/* ===== Score / Rating ===== */
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.score-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
}

.score-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.3rem;
}

.score-label {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.6);
}

.score-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  margin-top: 0.8rem;
  overflow: hidden;
}

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

/* ===== Comparison Grid ===== */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.comparison-item {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
}

.comparison-item:hover {
  border-color: var(--secondary);
}

.comparison-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.comparison-info {
  padding: 1rem;
}

.comparison-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.comparison-info p {
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.5);
}

.comparison-tag {
  display: inline-block;
  font-size: 0.7rem;
  background: rgba(0, 255, 136, 0.1);
  color: var(--secondary);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

/* ===== Ethics Banner ===== */
.ethics-banner {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.05), rgba(0, 255, 136, 0.05));
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.ethics-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.ethics-content h3 {
  margin-bottom: 0.5rem;
}

.ethics-content p {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.7);
}

/* ===== APP CTA ===== */
.app-cta {
  background: var(--card);
  border: 1px solid rgba(0, 255, 136, 0.15);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
}

.app-cta h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: #00E67A;
  text-decoration: none;
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background: rgba(56, 189, 248, 0.1);
  text-decoration: none;
}

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

.faq-item {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
}

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

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

.faq-answer {
  padding: 0 1.5rem 1.2rem;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.7);
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.5);
}

.breadcrumb a {
  color: rgba(226, 232, 240, 0.6);
}

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

.breadcrumb span {
  margin: 0 0.4rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--primary);
  border-top: 1px solid rgba(0, 255, 136, 0.1);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

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

.footer-brand h3 {
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.5);
}

.footer-links h4 {
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  color: var(--text);
}

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

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

.footer-links a {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.5);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.4);
}

/* ===== Page Content ===== */
.page-hero {
  padding: 3rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  margin-bottom: 2rem;
}

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

.page-hero p {
  color: rgba(226, 232, 240, 0.6);
  max-width: 700px;
  margin: 0 auto;
}

.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

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

.page-content li {
  margin-bottom: 0.5rem;
  color: rgba(226, 232, 240, 0.8);
}

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

.search-box input {
  width: 100%;
  padding: 1rem 1.5rem;
  padding-right: 3rem;
  background: var(--card);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

.search-box button {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--secondary);
  font-size: 1.2rem;
  cursor: pointer;
}

.search-results {
  max-width: 800px;
  margin: 0 auto;
}

.search-result-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
}

.search-result-item:hover {
  border-color: rgba(0, 255, 136, 0.2);
}

.search-result-item h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.search-result-item p {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.6);
  margin-bottom: 0.3rem;
}

.search-result-item .path {
  font-size: 0.75rem;
  color: var(--secondary);
  font-family: var(--font-mono);
}

.search-tag {
  display: inline-block;
  font-size: 0.7rem;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.3rem;
}

/* ===== 404 Page ===== */
.error-page {
  text-align: center;
  padding: 5rem 1.5rem;
}

.error-code {
  font-size: 8rem;
  font-weight: 800;
  color: var(--secondary);
  opacity: 0.3;
  line-height: 1;
}

/* ===== Matrix Background Animation ===== */
.matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.03;
}

/* ===== Cursor Blink Animation ===== */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.cursor-blink::after {
  content: '|';
  animation: blink 1s infinite;
  color: var(--secondary);
}

/* ===== Skeleton Loading ===== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, rgba(255,255,255,0.05) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ===== Tag Highlight ===== */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin: 0.2rem;
  background: rgba(0, 255, 136, 0.08);
  color: var(--secondary);
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.tag-accent {
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent);
  border-color: rgba(56, 189, 248, 0.2);
}

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

  .nav-main {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
  }

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

  .nav-toggle {
    display: block;
  }

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

  .hero-result-area {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .ethics-banner {
    flex-direction: column;
  }

  .challenge-meta {
    flex-direction: column;
    gap: 0.8rem;
  }

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

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

@media (max-width: 480px) {
  .hero-result-area {
    grid-template-columns: 1fr;
  }

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

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

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

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.text-muted { color: rgba(226, 232, 240, 0.5); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }
