/* The Outer Graph - Premium Data Visualization Theme */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #ec4899;
  --accent: #f59e0b;
  --dark: #0f172a;
  --dark-card: #1e293b;
  --light: #f8fafc;
  --text: #334155;
  --text-light: #64748b;
  --border: #334155;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --gradient-1: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  --gradient-2: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  --gradient-3: linear-gradient(135deg, #667eea 0%, #764ba2 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(--dark);
  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(15, 23, 42, 0.95);
  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: 8px;
  align-items: center;
}

.nav-links a {
  color: #94a3b8;
  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(99,102,241,0.2);
}

.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: #94a3b8;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

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

.hero p {
  font-size: 1.2rem;
  color: #94a3b8;
  max-width: 600px;
  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: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: 0 4px 15px rgba(99,102,241,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.5);
}

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

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

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

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

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

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

.section-header p {
  color: #94a3b8;
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

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

.tool-card {
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 28px 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(99,102,241,0.2);
}

.tool-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
  display: block;
}

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

.tool-card p {
  color: #64748b;
  font-size: 0.85rem;
}

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

.article-card {
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,0.06);
  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(99,102,241,0.15);
}

.article-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

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

.article-card h3 {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-card p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.6;
}

.article-card .meta {
  color: #64748b;
  font-size: 0.8rem;
  margin-top: 10px;
}

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

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

.page-header p { color: #94a3b8; font-size: 1rem; }

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

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

.article-header .meta {
  color: #94a3b8;
  font-size: 0.95rem;
}

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

.article-body {
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-body h2 {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.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;
}

.breadcrumb {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.breadcrumb a { color: #94a3b8); }
.breadcrumb a:hover { color: var(--primary); }

/* Footer */
.footer {
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px 0;
  text-align: center;
}

.footer p { color: #64748b; font-size: 0.9rem; }

.footer a { color: #94a3b8; transition: color 0.2s; }
.footer a:hover { color: var(--primary); }

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

.tool-canvas {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
  min-height: 400px;
}

.tool-controls {
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.tool-controls h3 {
  color: white;
  font-size: 1rem;
  margin-bottom: 16px;
}

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

.input-group label {
  display: block;
  color: #94a3b8;
  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 rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: white;
  font-size: 0.9rem;
  font-family: inherit;
}

.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(99,102,241,0.2);
}

.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;
}

.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: #cbd5e1; font-size: 0.9rem; }

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

.stat-card {
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,0.06);
  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: #94a3b8; font-size: 0.9rem; margin-top: 4px; }

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

.feature-card {
  background: var(--dark-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 28px;
}

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

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

.feature-card p { color: #94a3b8; font-size: 0.9rem; line-height: 1.6; }

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

.data-table th {
  background: rgba(99,102,241,0.15);
  color: white;
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

.data-table td {
  padding: 12px 16px;
  color: #cbd5e1;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 0.9rem;
}

.data-table tr:hover td { background: rgba(255,255,255,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; }
}

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

/* Charts preview */
.chart-preview {
  background: white;
  border-radius: 12px;
  padding: 20px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.badge-new { background: rgba(16,185,129,0.2); color: #10b981; }
.badge-popular { background: rgba(245,158,11,0.2); color: #f59e0b; }
.badge-free { background: rgba(99,102,241,0.2); color: #6366f1; }

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

.tab-btn {
  padding: 10px 18px;
  background: none;
  border: none;
  color: #64748b;
  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: #94a3b8; }
.tab-btn.active { color: white; border-bottom-color: var(--primary); }

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

/* Result display */
.result-display {
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-top: 16px;
}

.result-display .value {
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.result-display .label {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 4px;
}
