/* ===== tose.sh Design System ===== */
/* Primary: #1E293B | Secondary: #334155 | CTA: #22C55E | Background: #0F172A | Text: #F8FAFC */

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0F172A;
  color: #F8FAFC;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== Navbar ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  padding: 0 24px; height: 72px;
  display: flex; align-items: center; justify-content: space-between;
}
.navbar-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 700; color: #F8FAFC;
}
.navbar-logo span { font-size: 28px; }
.navbar-links { display: flex; gap: 8px; }
.navbar-links a {
  padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500;
  color: #94A3B8; transition: all 0.2s;
}
.navbar-links a:hover, .navbar-links a.active {
  background: rgba(34, 197, 94, 0.15); color: #22C55E;
}
.navbar-time {
  font-size: 13px; color: #64748B;
  font-family: 'Space Grotesk', monospace;
}

/* ===== Hero ===== */
.hero {
  margin-top: 72px;
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #312E81 100%);
  padding: 80px 24px 64px; text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(34, 197, 94, 0.15) 0%, transparent 50%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 48px; font-weight: 700; margin-bottom: 16px;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #F8FAFC 0%, #22C55E 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 18px; color: #94A3B8;
  max-width: 600px; margin: 0 auto 32px;
}
.hero-stats {
  display: flex; justify-content: center; gap: 48px;
}
.hero-stat {
  text-align: center;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 16px;
  padding: 24px 32px;
  backdrop-filter: blur(10px);
}
.hero-stat .num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px; font-weight: 700;
  color: #22C55E;
}
.hero-stat .label {
  font-size: 14px; color: #94A3B8;
  margin-top: 4px; text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== Container ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== Section ===== */
.section { padding: 56px 0; }
.section-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 32px;
}
.section-icon { font-size: 32px; }
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px; font-weight: 700; color: #F8FAFC;
}
.section-badge {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
  font-family: 'Space Grotesk', monospace;
  font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(51, 65, 85, 0.5), transparent);
  margin: 0 0 56px;
}

/* ===== Card Grid ===== */
.card-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

/* ===== News Card (AI日报) ===== */
.news-card {
  background: #1E293B; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.5);
  transition: transform 0.3s, border-color 0.3s;
  display: flex; flex-direction: column;
}
.news-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 197, 94, 0.5);
}
.news-card-img {
  width: 100%; height: 200px; object-fit: cover;
  background: #334155;
}
.news-card-body {
  padding: 20px 24px 24px;
  flex: 1; display: flex; flex-direction: column;
}
.news-card-tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 4px 12px; border-radius: 6px; margin-bottom: 12px;
  width: fit-content;
  font-family: 'Space Grotesk', monospace;
}
.tag-ai { background: rgba(34, 197, 94, 0.2); color: #22C55E; }
.tag-ecommerce { background: rgba(59, 130, 246, 0.2); color: #3B82F6; }
.tag-startup { background: rgba(251, 191, 36, 0.2); color: #FBBF24; }
.tag-web3 { background: rgba(168, 85, 247, 0.2); color: #A855F7; }
.tag-newenergy { background: rgba(236, 72, 153, 0.2); color: #EC4899; }
.news-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 600; line-height: 1.4;
  margin-bottom: 10px; color: #F8FAFC;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-summary {
  font-size: 14px; color: #94A3B8; line-height: 1.7; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(51, 65, 85, 0.5);
  font-size: 12px; color: #64748B;
}
.news-card-source {
  display: flex; align-items: center; gap: 6px;
  font-family: 'Space Grotesk', monospace;
}

/* ===== Image Card (搞笑图片 / 美女福利) ===== */
.image-card {
  background: #1E293B; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.5);
  transition: transform 0.3s, border-color 0.3s;
}
.image-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 197, 94, 0.5);
}
.image-card img {
  width: 100%; height: 280px; object-fit: cover;
  background: #334155;
}
.image-card-body { padding: 18px 20px 20px; }
.image-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px; font-weight: 600;
  margin-bottom: 8px; color: #F8FAFC;
}
.image-card-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px;
  font-size: 13px; color: #64748B;
}
.like-btn {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  background: none; border: none; color: #64748B;
  font-family: 'Space Grotesk', monospace;
  font-size: 13px; padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}
.like-btn:hover {
  color: #22C55E;
  background: rgba(34, 197, 94, 0.1);
}

/* ===== Joke Card (内涵段子) ===== */
.joke-card {
  background: #1E293B; border-radius: 16px; padding: 24px 28px;
  border: 1px solid rgba(51, 65, 85, 0.5);
  transition: transform 0.3s, border-color 0.3s;
}
.joke-card:hover {
  transform: translateX(6px);
  border-color: rgba(34, 197, 94, 0.5);
}
.joke-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.joke-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 600; color: #F8FAFC;
}
.joke-card-content {
  font-size: 15px; color: #CBD5E1; line-height: 1.8;
  padding: 18px 20px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  border-left: 4px solid #22C55E;
}
.joke-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; font-size: 13px; color: #64748B;
}

/* ===== Qiushi Card (糗事百科) ===== */
.qiushi-card {
  background: #1E293B; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.5);
  transition: transform 0.3s, border-color 0.3s;
  display: flex; flex-direction: column;
}
.qiushi-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 197, 94, 0.5);
}
.qiushi-card img {
  width: 100%; height: 200px; object-fit: cover;
  background: #334155;
}
.qiushi-card-body {
  padding: 20px 24px 24px;
  flex: 1; display: flex; flex-direction: column;
}
.qiushi-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px; font-weight: 600;
  margin-bottom: 10px; color: #F8FAFC;
}
.qiushi-card-content {
  font-size: 14px; color: #94A3B8; line-height: 1.7; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.qiushi-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(51, 65, 85, 0.5);
  font-size: 13px; color: #64748B;
}

/* ===== Guide Section ===== */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.guide-card {
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  border-radius: 16px; padding: 28px;
  border: 1px solid rgba(51, 65, 85, 0.5);
  transition: transform 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}
.guide-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.1) 0%, transparent 70%);
  pointer-events: none;
}
.guide-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 197, 94, 0.5);
}
.guide-card-number {
  position: absolute; top: 16px; right: 20px;
  font-family: 'Space Grotesk', monospace;
  font-size: 48px; font-weight: 700;
  color: rgba(34, 197, 94, 0.15);
}
.guide-card-icon { font-size: 40px; margin-bottom: 16px; }
.guide-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 600;
  color: #F8FAFC; margin-bottom: 10px;
}
.guide-card-desc {
  font-size: 14px; color: #94A3B8; line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
  background: linear-gradient(180deg, #0F172A 0%, #020617 100%);
  color: #94A3B8;
  padding: 64px 24px 32px;
  margin-top: 64px;
  border-top: 1px solid rgba(51, 65, 85, 0.3);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
}
.footer-brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 700;
  color: #F8FAFC; margin-bottom: 12px;
}
.footer-brand-desc {
  font-size: 14px; line-height: 1.8; color: #64748B;
}
.footer-col-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px; font-weight: 600;
  color: #F8FAFC; margin-bottom: 16px;
}
.footer-col a {
  display: block; font-size: 14px;
  color: #64748B; padding: 6px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: #22C55E; }
.footer-bottom {
  max-width: 1200px; margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(51, 65, 85, 0.3);
  text-align: center; font-size: 13px; color: #475569;
}
.footer-link {
  color: #22C55E; transition: opacity 0.2s;
}
.footer-link:hover { opacity: 0.8; }

/* ===== GitHub Trending Card ===== */
.github-card {
  background: #1E293B; border-radius: 16px; padding: 20px 24px;
  border: 1px solid rgba(51, 65, 85, 0.5);
  transition: transform 0.3s, border-color 0.3s;
  display: flex; flex-direction: column; gap: 12px;
}
.github-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 197, 94, 0.5);
}
.github-card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.github-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px; font-weight: 600; color: #22C55E;
  word-break: break-all;
}
.github-card-stars {
  display: flex; align-items: center; gap: 4px;
  font-family: 'Space Grotesk', monospace;
  font-size: 14px; font-weight: 600; color: #FBBF24;
  white-space: nowrap;
}
.github-card-desc {
  font-size: 14px; color: #94A3B8; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.github-card-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: #64748B;
}
.github-card-lang {
  display: flex; align-items: center; gap: 6px;
}
.github-card-lang-dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
}
.github-card-topic {
  background: rgba(34, 197, 94, 0.12);
  color: #22C55E;
  padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 500;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; height: 64px; }
  .navbar-links { display: none; }
  .navbar-time { display: none; }
  .hero { margin-top: 64px; padding: 48px 16px 40px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .hero-stat { padding: 16px 24px; }
  .hero-stat .num { font-size: 28px; }
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .section-title { font-size: 22px; }
  .card-grid { grid-template-columns: 1fr; gap: 20px; }
  .guide-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
}

[hidden] { display: none !important; }
.skip { position:absolute; top:-80px; left:8px; z-index:1200; background:white; color:#10231a; padding:10px; }
.skip:focus { top:4px; }
:focus-visible { outline:3px solid #56dca0; outline-offset:3px; }
.navbar { position:sticky; top:0; height:auto; min-height:64px; gap:12px; }
.navbar-links { display:flex; flex-wrap:wrap; }
.hero { margin-top:0; }
.controls, .section-header { display:flex; align-items:center; flex-wrap:wrap; gap:.7rem; }
.controls { padding-block:1.5rem; }
.controls button, dialog button, .controls input { font:inherit; color:inherit; padding:.5em .8em; border:1px solid #53637b; border-radius:.5em; background:#1e293b; }
.controls button[aria-pressed=true] { background:#98f3bd; color:#13251b; }
.source-status, small { color:#b8c5d6; }
.source-status { margin-bottom:1rem; }
.reader { max-width:52rem; padding-block:3rem; overflow-wrap:anywhere; }
.reader h1,.reader p,.reader ul,dialog p { margin-block:1rem; }
.reader ul { list-style:disc; padding-left:1.5rem; }
.reader a,dialog a, footer a { text-decoration:underline; }
.body-text { white-space:pre-line; }
.card-image { width:100%; height:auto; aspect-ratio:8/5; object-fit:cover; background:#243244; }
.zoom { border:0; background:none; display:block; width:100%; cursor:zoom-in; }
dialog { margin:auto; width:min(42rem,92vw); max-height:85vh; overflow:auto; padding:1.5rem; background:#172235; color:#f8fafc; border:1px solid #64748b; border-radius:.9rem; }
dialog::backdrop { background:#000a; }
dialog img { max-height:70vh; margin:auto; object-fit:contain; }
section[id] { scroll-margin-top:6rem; }
@media(max-width:768px) {
  .navbar { position:relative; flex-direction:column; align-items:flex-start; padding:12px 16px; }
  .navbar-links { display:flex; gap:2px; }
  .navbar-links a { padding:5px 8px; }
  .card-grid { grid-template-columns:minmax(0,1fr); }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; } }

.overview { padding-block:1rem; }
.overview a { text-decoration:underline; }

.photo { display:block; }
.photo-fallback { display:grid; place-items:center; aspect-ratio:8/5; background:#243244; color:#d6dfeb; }
