:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --secondary: #e8710a;
  --accent: #9334e6;
  --dark: #0d1117;
  --dark-card: #161b22;
  --light: #f6f8fa;
  --text: #24292f;
  --text-light: #57606a;
  --border: #d0d7de;
  --success: #1a7f37;
  --danger: #cf222e;
  --gradient-1: linear-gradient(135deg, #1a73e8 0%, #9334e6 100%);
  --gradient-2: linear-gradient(135deg, #0d1117 0%, #1a365d 100%);
  --gradient-3: linear-gradient(135deg, #e8710a 0%, #f59e0b 100%);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Navbar */
.navbar {
  background: rgba(13, 17, 23, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 20px;
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
}

.logo-icon {
  font-size: 1.5rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav-links a {
  color: #8b949e;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  color: white;
  background: rgba(26,115,232,0.25);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

.mobile-nav {
  display: none;
  background: var(--dark-card);
  padding: 10px 20px;
}

.mobile-nav a {
  display: block;
  color: #8b949e;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Hero */
.hero {
  background: var(--gradient-2);
  padding: 90px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(26,115,232,0.15) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(147,52,230,0.1) 0%, transparent 40%);
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
  position: relative;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 1.15rem;
  color: #8b949e;
  max-width: 620px;
  margin: 0 auto 30px;
  position: relative;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  position: relative;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: 0 4px 15px rgba(26,115,232,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,115,232,0.45);
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.12);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-2px);
}

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

/* Section */
.section { padding: 70px 0; }

.section-alt { background: white; }

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

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.tool-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 20px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26,115,232,0.12);
}

.tool-icon {
  font-size: 2.8rem;
  margin-bottom: 14px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.tool-card h3 {
  color: var(--dark);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.tool-card p {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* Article Cards */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
}

.article-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
  text-decoration: none;
  display: block;
}

.article-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.article-card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.article-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.article-card-body { padding: 20px; }

.article-card h3 {
  color: var(--dark);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.6;
}

.article-card .meta {
  color: #57606a;
  font-size: 0.8rem;
  margin-top: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Page Header */
.page-header {
  background: var(--gradient-2);
  padding: 50px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(26,115,232,0.15) 0%, transparent 60%);
}

.page-header h1 {
  color: white;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
}

.page-header p { color: #8b949e; font-size: 1rem; position: relative; }

/* Article Content */
.article-header {
  padding: 60px 0;
  text-align: center;
}

.article-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
  line-height: 1.3;
}

.article-header .meta {
  color: #8b949e;
  font-size: 0.95rem;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.article-body {
  color: #24292f;
  font-size: 1.05rem;
  line-height: 1.85;
  background: white;
  padding: 40px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.article-body h2 {
  color: var(--dark);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.article-body p { margin-bottom: 1.2rem; }
.article-body a { color: var(--primary); }
.article-body a:hover { text-decoration: underline; }
.article-body img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.breadcrumb {
  color: #57606a;
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: #57606a; }

/* Footer */
.footer {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 45px 0;
  text-align: center;
}

.footer p { color: #57606a; font-size: 0.9rem; }
.footer a { color: #8b949e; transition: color 0.2s; }
.footer a:hover { color: white; }

/* Tool Page */
.tool-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.tool-canvas {
  background: white;
  border-radius: 14px;
  padding: 30px;
  margin-bottom: 20px;
  min-height: 400px;
  border: 1px solid var(--border);
}

.tool-controls {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}

.tool-controls h3 {
  color: var(--dark);
  font-size: 1rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-group { margin-bottom: 14px; }

.input-group label {
  display: block;
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 6px;
  font-weight: 500;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--dark);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.color-input {
  display: flex;
  gap: 8px;
  align-items: center;
}

.color-input input[type="color"] {
  width: 44px;
  height: 36px;
  padding: 2px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.checkbox-group input[type="checkbox"] { width: 16px; height: 16px; }
.checkbox-group label { color: var(--text); font-size: 0.9rem; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 50px 0;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.stat-label { color: var(--text-light); font-size: 0.9rem; margin-top: 4px; }

/* Feature */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

.feature-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  color: var(--dark);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p { color: var(--text-light); font-size: 0.9rem; line-height: 1.6; }

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.data-table th {
  background: rgba(26,115,232,0.08);
  color: var(--dark);
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

.data-table td {
  padding: 12px 16px;
  color: var(--text);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.data-table tr:hover td { background: rgba(26,115,232,0.02); }

/* Mobile */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .mobile-nav.active { display: block; }
  .hero h1 { font-size: 2.2rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .articles-grid { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 1.8rem; }
  .article-body { padding: 24px; font-size: 1rem; }
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 1.8rem; }
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-new { background: rgba(26,127,55,0.1); color: var(--success); }
.badge-popular { background: rgba(232,113,10,0.1); color: var(--secondary); }
.badge-free { background: rgba(26,115,232,0.1); color: var(--primary); }

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 10px 18px;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-family: inherit;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Result display */
.result-display {
  background: rgba(26,115,232,0.06);
  border: 1px solid rgba(26,115,232,0.15);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-top: 16px;
}

.result-display .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
}

.result-display .label {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Poll widget */
.poll-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
}

.poll-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.poll-option:last-child { border-bottom: none; }

.poll-radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  transition: all 0.2s;
}

.poll-option:hover .poll-radio { border-color: var(--primary); }

.poll-bar {
  flex: 1;
  height: 8px;
  background: rgba(26,115,232,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.poll-bar-fill {
  height: 100%;
  background: var(--gradient-1);
  border-radius: 4px;
  transition: width 0.3s;
}

/* Survey form */
.survey-question {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
}

.survey-question h4 {
  color: var(--dark);
  font-size: 1rem;
  margin-bottom: 12px;
}

.survey-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.survey-option input[type="radio"],
.survey-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
