:root {
  --bg: #04050e;
  --bg-alt: #090b17;
  --text: #f5f7ff;
  --muted: #a0a8c3;
  --accent: #7c5dff;
  --accent-2: #1fccb7;
  --accent-3: #ff8f70;
  --glass: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
  --card-bg: rgba(8, 10, 24, 0.85);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --transition: 200ms ease;
  font-size: 16px;
}

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

body {
  font-family: "Inter", "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, rgba(124, 93, 255, 0.25), transparent 45%),
    radial-gradient(circle at 20% 20%, rgba(31, 204, 183, 0.25), transparent 35%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

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

a:hover {
  color: var(--accent-3);
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(4, 5, 14, 0.85);
  border-bottom: 1px solid var(--border);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 1rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--text);
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 10px 30px rgba(124, 93, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.hero {
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  align-items: center;
}

.hero-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.hero .tagline {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.glass-panel {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.glass-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.15), transparent 50%);
  pointer-events: none;
}

.section {
  max-width: 1200px;
  margin: 0 auto 3rem auto;
  padding: 0 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.card {
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: transform var(--transition), border-color var(--transition);
  min-height: 240px;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 93, 255, 0.6);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
}

footer {
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: 4rem;
}

footer .footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

footer a {
  color: var(--text);
  opacity: 0.8;
  font-size: 0.9rem;
}

footer a:hover {
  opacity: 1;
}

.article-content {
  max-width: 840px;
  margin: 0 auto;
  padding: 0;
}

.article-content h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.article-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.prose p {
  margin-bottom: 1rem;
  color: #d5dcff;
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

@media (min-width: 1100px) {
  .article-grid {
    grid-template-columns: minmax(0, 2.5fr) minmax(260px, 1fr);
  }
}

.list {
  padding-left: 1.5rem;
}

.list li {
  margin-bottom: 0.5rem;
}

.tool-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.tool-panel {
  background: var(--glass);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
}

input,
textarea,
select {
  width: 100%;
  background: rgba(5, 7, 18, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.65rem 0.85rem;
  font-family: inherit;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.ad-slot {
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-sticky {
  position: sticky;
  top: 90px;
}

.related-links {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-links a {
  display: inline-flex;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
}

.mega-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: rgba(3, 5, 12, 0.97);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  display: none;
  padding: 2rem 0;
}

.mega-menu.open {
  display: block;
}

.mega-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.mega-column h4 {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.8rem;
  color: var(--muted);
}

.mega-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  color: #64748b;
}

.breadcrumbs a {
  color: #0f172a;
  text-decoration: none;
}

.breadcrumbs span {
  color: #94a3b8;
}

.tag {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
}

.banner-consent {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(7, 9, 20, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: min(520px, calc(100% - 2rem));
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: none;
  z-index: 50;
}

.banner-consent.visible {
  display: block;
}

.banner-consent p {
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button-secondary {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  padding: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.65rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table th {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.search-bar input {
  flex: 1;
}

@media (max-width: 768px) {
  nav ul {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  nav li {
    flex: 1 1 calc(50% - 0.75rem);
  }
}

:root[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-alt: #ffffff;
  --text: #111322;
  --muted: #4c5066;
  --accent: #5d2dff;
  --accent-2: #18a999;
  --accent-3: #ff6b4a;
  --glass: rgba(255, 255, 255, 0.9);
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 10px 25px rgba(15, 18, 33, 0.12);
  --card-bg: #ffffff;
}

[data-theme="light"] body {
  background: radial-gradient(circle at top, rgba(93, 45, 255, 0.15), transparent 45%),
    radial-gradient(circle at 20% 20%, rgba(24, 169, 153, 0.15), transparent 35%),
    var(--bg);
  color: var(--text);
}

[data-theme="light"] header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .mega-menu {
  background: rgba(255, 255, 255, 0.97);
  border-color: var(--border);
}

[data-theme="light"] footer {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
}

[data-theme="light"] .banner-consent {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}
