/* ============================================
   GAY - Shared Base Styles
   Common to: index.html, about.html, disclaimer.html
   ============================================ */

:root {
  --primary: #c42b1c;
  --primary-dark: #8b1a10;
  --primary-light: #fef3f2;
  --accent: #d63900;
  --text: #1a1a2e;
  --text-secondary: #57606a;
  --text-muted: #8a919b;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --border: #e3e6ea;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 8px;
  --max-w: 1100px;
}

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

body {
  font-family: -apple-system, "Noto Sans SC", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* === Top Bar (shared across all pages) === */
.top-bar {
  background: var(--primary);
  color: white;
  padding: 0 40px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: white;
  text-decoration: none;
}
.logo span { opacity: 0.75; font-weight: 400; margin-left: 4px; }

.top-nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-size: 13.5px;
  padding: 6px 14px;
  border-radius: 4px;
  transition: background 0.15s;
}
.top-nav a:hover { background: rgba(255,255,255,0.15); }

/* === Footer (shared across all pages) === */
footer {
  background: #1a1a2e; color: rgba(255,255,255,0.7);
  padding: 40px; margin-top: 60px;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; }
footer h4 { color: white; font-size: 15px; margin-bottom: 12px; }
footer p, footer a { font-size: 13.5px; color: rgba(255,255,255,0.6); text-decoration: none; line-height: 1.8; }
footer a:hover { color: white; }
.footer-bottom { max-width: var(--max-w, 760px); margin: 24px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 13px; }
.footer-desc { max-width: 320px; }

/* Active nav link */
.top-nav a.nav-active { background:rgba(255,255,255,0.15);color:white; }

/* Utility classes */
.footer-desc { max-width: 320px; }
.list-unstyled { list-style:none;padding:0; }
.custom-list-item { padding-left:16px;position:relative;margin-bottom:8px; }

/* === Category Bar (index.html only) === */
.cat-bar {
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  background: white;
  overflow-x: auto;
}

.cat-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 0;
}
.cat-bar a {
  display: inline-block;
  padding: 12px 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.cat-bar a:hover, .cat-bar a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* === Hero Banner (index.html) === */
.hero-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 60%, #c42b1c 100%);
  padding: 72px 40px;
  text-align: center;
  color: white;
}
.hero-banner h1 { font-size: 38px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 16px; }
.hero-banner p { font-size: 17px; opacity: 0.85; max-width: 640px; margin: 0 auto; line-height: 1.8; }

/* === Hero About (about.html) === */
.hero-about { background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 60%, #c42b1c 100%); padding: 72px 40px; text-align: center; color: white; }
.hero-about h1 { font-size: 38px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 16px; }
.hero-about p { font-size: 17px; opacity: 0.85; max-width: 640px; margin: 0 auto; line-height: 1.8; }

/* === Page Title (disclaimer.html) === */
.page-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.page-subtitle {
  font-size: 14.5px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* === Section Title (index & about) === */
.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 32px;
}
.section-title h2 { font-size: 24px; font-weight: 700; color: var(--text); }

/* === Disclaimer Section (disclaimer) === */
.disclaimer-section {
  margin-bottom: 36px;
}
.disclaimer-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}
.disclaimer-section p, .disclaimer-section li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.85;
}
.disclaimer-section ul { list-style: none; padding: 0; }
.disclaimer-section ul li { position: relative; padding-left: 20px; margin-bottom: 6px; }
.disclaimer-section ul li::before { content: "·"; position: absolute; left: 4px; color: var(--primary); font-weight: 700; }

/* === Highlight Box (disclaimer) === */
.highlight-box {
  background: #fff7f0;
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  margin-bottom: 36px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.highlight-box p { font-size: 15px; color: var(--text); line-height: 1.8; }

/* === About Page Text (about) === */
.about-text {
  font-size: 15.5px;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 36px;
}
.about-text p { margin-bottom: 20px; }

/* === Feature Cards (about) === */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}
.feature-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.15s;
}
.feature-card:hover { box-shadow: var(--shadow-md); }
.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* === Tech Stack (about) === */
.tech-stack {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 36px;
}
.tech-stack h3 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.tech-stack ul { list-style: none; padding: 0; }
.tech-stack li { font-size: 14.5px; color: var(--text-secondary); line-height: 2; padding-left: 16px; position: relative; }
.tech-stack li::before { content: "→"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

/* === Article List (index) === */
.article-list { display: flex; flex-direction: column; gap: 0; }
.article-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  align-items: start;
}
.article-item:first-child { padding-top: 8px; }

.article-date-col { font-size: 13px; color: var(--text-muted); line-height: 1.6; text-align: right; flex-shrink: 0; }
.article-date-col .day { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.1; }
.article-date-col .month-year { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.article-body h3 {
  font-size: 19px; font-weight: 600; line-height: 1.45; margin-bottom: 8px;
  color: var(--text); transition: color 0.15s;
}
.article-item:hover h3 { color: var(--primary); }
.article-body p { font-size: 14.5px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 8px; }

/* Tags */
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 4px; background: var(--bg-alt); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.tag.tag-aigc { background: #fff7f0; color: var(--accent); border-color: #fed3b5; }

.article-arrow { font-size: 20px; color: #d1d4d8; padding-top: 6px; transition: all 0.15s; }
.article-item:hover .article-arrow { color: var(--primary); transform: translateX(3px); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn.disabled { opacity: 0.4; cursor: default; pointer-events: none; }

/* === Container variants === */
.container { max-width: var(--max-w, 1100px); margin: 0 auto; padding: 48px 24px 80px; }
.container-wide { max-width: 820px; margin: 0 auto; padding: 48px 24px 60px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 48px 24px 60px; }

/* === Responsive (shared) === */
@media (max-width: 768px) {
  .top-bar { padding: 0 16px; height: 48px; }
  .logo { font-size: 18px; }
  .cat-bar { padding: 0 16px; }

  /* Hero responsive */
  .hero-banner, .hero-about { padding: 48px 20px; }
  .hero-banner h1, .hero-about h1 { font-size: 28px; }

  /* Article list responsive */
  .article-item { grid-template-columns: 80px 1fr auto; gap: 16px; }
  .article-date-col .day { font-size: 22px; }

  /* Footer responsive */
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }

  /* Disclaimer page responsive */
  .page-title { font-size: 26px; }
}
