:root {
  --bg-primary: #09090b;
  --bg-secondary: #18181b;
  --bg-glass: rgba(24, 24, 27, 0.7);
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --accent-color: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.5);
  --border-color: #27272a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-inter), sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-color); }
ul { list-style: none; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; width: 100%; }

/* Header */
.header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1.5rem 0;
}
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--accent-color); letter-spacing: -1px; }
.nav { display: flex; gap: 1.5rem; }
.nav-link { color: var(--text-secondary); font-weight: 500; transition: color 0.2s ease; }
.nav-link:hover { color: var(--text-primary); }

/* Hero */
.hero { text-align: center; margin-bottom: 4rem; padding: 6rem 0 2rem; }
.hero-title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #60a5fa, #34d399);
  -webkit-background-clip: text;
  color: transparent;
  line-height: 1.1;
  letter-spacing: -1px;
}
.hero-subtitle { font-size: 1.25rem; color: var(--text-secondary); max-width: 42rem; margin: 0 auto; line-height: 1.6; }

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

/* Card */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
  box-shadow: 0 0 30px rgba(59,130,246,0.15);
}
.card-date { font-size: 0.75rem; font-weight: 700; color: var(--accent-color); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; }
.card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.4; transition: color 0.2s; }
.card:hover .card-title { color: var(--accent-color); }
.card-excerpt { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; margin-bottom: 1.5rem; }
.card-footer { margin-top: auto; font-weight: 500; color: var(--accent-color); display: flex; align-items: center; }

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  padding: 3rem 0;
  text-align: center;
  color: var(--text-secondary);
}

/* Admin Layout */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 250px; background: var(--bg-secondary); border-right: 1px solid var(--border-color); padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.admin-sidebar h2 { color: var(--text-primary); margin-bottom: 2rem; font-size: 1.25rem; }
.admin-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.admin-nav-link { padding: 0.75rem 1rem; border-radius: 6px; transition: background 0.2s; color: var(--text-secondary); font-weight: 500; }
.admin-nav-link:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.admin-main { flex: 1; padding: 3rem; overflow-y: auto; }
.admin-panel { max-width: 900px; margin: 0 auto; background: var(--bg-glass); backdrop-filter: blur(16px); border: 1px solid var(--border-color); border-radius: 16px; padding: 2.5rem; }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.stat-card { text-align: center; }
.stat-title { color: var(--text-secondary); font-size: 1.125rem; margin-bottom: 0.5rem; font-weight: 500; }
.stat-value { color: var(--accent-color); font-size: 3rem; font-weight: 800; }
.quick-actions { display: flex; gap: 1rem; }

/* Forms & Tables */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 700; color: var(--text-secondary); margin-bottom: 0.5rem; font-size: 0.875rem; }
.input-field { width: 100%; padding: 0.875rem 1rem; background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-primary); transition: border-color 0.2s; }
.input-field:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 2px var(--accent-glow); }
.flex-form { display: flex; gap: 1rem; margin-bottom: 2rem; }
.flex-form .input-field { flex: 1; }

.table-wrapper { overflow-x: auto; }
.table { width: 100%; text-align: left; border-collapse: collapse; }
.table th { padding: 1rem; border-bottom: 1px solid var(--border-color); color: var(--text-secondary); font-weight: 500; font-size: 0.875rem; }
.table td { padding: 1rem; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.table tr:hover { background: rgba(255,255,255,0.02); }

/* Badges */
.badge { padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; display: inline-block; }
.badge-success { background: rgba(20, 83, 45, 0.4); color: #4ade80; }
.badge-warning { background: rgba(113, 63, 18, 0.4); color: #facc15; }

/* Article Page */
.article-header { text-align: center; margin-bottom: 3rem; padding-top: 2rem; }
.article-title { font-size: 3.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.5rem; letter-spacing: -1px; }
.ad-slot { margin: 2rem 0; background: rgba(255,255,255,0.02); border: 1px dashed var(--border-color); padding: 1rem; text-align: center; border-radius: 8px; color: var(--text-secondary); font-size: 0.875rem; min-height: 120px; display: flex; align-items: center; justify-content: center; }
.article-content { max-width: 800px; margin: 0 auto; }
.article-footer { border-top: 1px solid var(--border-color); padding-top: 3rem; margin-top: 4rem; text-align: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.875rem 1.5rem; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-primary { background: var(--accent-color); color: white; border: none; box-shadow: 0 0 15px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 25px var(--accent-glow); }
.btn-danger { color: #ef4444; background: transparent; border: none; font-weight: 700; padding: 0.5rem 1rem; cursor: pointer; }
.btn-danger:hover { color: #f87171; text-decoration: underline; }
.btn-block { width: 100%; }

/* Prose */
.prose { line-height: 1.8; font-size: 1.125rem; color: #d4d4d8; }
.prose p { margin-bottom: 1.5rem; }
.prose h1, .prose h2, .prose h3 { margin-top: 3rem; margin-bottom: 1.25rem; color: var(--text-primary); line-height: 1.3; font-weight: 700; }
.prose h2 { font-size: 1.875rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.prose h3 { font-size: 1.5rem; }
.prose a { color: var(--accent-color); text-decoration: underline; text-underline-offset: 4px; }
.prose a:hover { color: #60a5fa; }
.prose img { max-width: 100%; border-radius: 12px; margin: 2.5rem 0; border: 1px solid var(--border-color); }
.prose ul, .prose ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }

/* Utils */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2.5rem; }
.mb-5 { margin-bottom: 4rem; }
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.animate-fade-in { animation: fadeIn 0.6s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
