:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2128;
  --bg-input: #21262d;
  --border: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #f39c12;
  --accent-hover: #e67e22;
  --success: #2ecc71;
  --warning: #f1c40f;
  --danger: #e74c3c;
  --info: #3498db;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

/* Header & Navigation */
.site-header {
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--accent);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 6px;
}

.nav-menu a {
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text-primary);
  background: var(--bg-input);
  text-decoration: none;
}

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

/* Main Layout */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 720px;
  margin: 0 auto;
}

/* Hero */
.hero {
  text-align: center;
  padding: 80px 24px;
  background: linear-gradient(135deg, rgba(243, 156, 18, 0.08) 0%, rgba(13, 17, 23, 0) 50%);
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.2rem;
  max-width: 760px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #0d1117;
}

.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-input);
  text-decoration: none;
}

.btn-danger {
  background: rgba(231, 76, 60, 0.15);
  color: var(--danger);
  border-color: rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
  background: rgba(231, 76, 60, 0.25);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

/* Tool Layout */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.tool-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.tool-result {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: 88px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group small {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 4px;
}

input[type="text"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border);
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Score Display */
.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  border: 6px solid var(--border);
  transition: border-color 0.4s;
}

.score-circle .score-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.score-circle .score-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.score-low { border-color: var(--success); color: var(--success); }
.score-medium { border-color: var(--warning); color: var(--warning); }
.score-high { border-color: var(--danger); color: var(--danger); }

.result-title {
  text-align: center;
  margin-bottom: 20px;
}

.result-title h3 {
  font-size: 1.4rem;
}

.result-title .tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 8px;
}

.tag-low { background: rgba(46, 204, 113, 0.15); color: var(--success); }
.tag-medium { background: rgba(241, 196, 15, 0.15); color: var(--warning); }
.tag-high { background: rgba(231, 76, 60, 0.15); color: var(--danger); }

.result-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-list li {
  padding: 12px 16px;
  background: var(--bg-input);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.result-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
}

.result-placeholder .icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* Reading List */
.reading-list-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: var(--bg-input);
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.reading-list-item .item-title {
  font-weight: 600;
}

.reading-list-item .item-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 4px;
}

.badge-high { background: rgba(231, 76, 60, 0.15); color: var(--danger); }
.badge-medium { background: rgba(241, 196, 15, 0.15); color: var(--warning); }
.badge-low { background: rgba(46, 204, 113, 0.15); color: var(--success); }
.badge-verified { background: rgba(52, 152, 219, 0.15); color: var(--info); }
.badge-later { background: rgba(142, 68, 173, 0.15); color: #9b59b6; }

/* Summary Template */
.template-output {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  white-space: pre-wrap;
  margin-bottom: 16px;
}

/* Content Page */
.content-page h1 {
  font-size: 2.2rem;
  margin-bottom: 24px;
}

.content-page h2 {
  font-size: 1.5rem;
  margin: 32px 0 12px;
  color: var(--accent);
}

.content-page p,
.content-page li {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.content-page ul {
  margin-left: 24px;
  margin-bottom: 16px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 40px 24px;
  margin-top: 60px;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.footer-section h4 {
  margin-bottom: 12px;
  color: var(--text-primary);
}

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

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  color: var(--text-secondary);
}

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

.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Utilities */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 24px;
}

.mb-4 {
  margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 900px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }

  .tool-result {
    position: static;
  }

  .reading-list-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }

  .nav-menu.open {
    display: flex;
  }

  .hero {
    padding: 48px 24px;
  }

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

  .section-header h1 {
    font-size: 1.8rem;
  }

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

@media (max-width: 480px) {
  .btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }
}
