/* ChatsNet Engineering - Fully Responsive Stylesheet */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --border: #334155;
  --code-bg: #0b1120;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--accent-hover);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 68px;
  position: relative;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.logo span {
  color: var(--accent);
}
.logo svg {
  flex-shrink: 0;
}

nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 0;
  transition: color 0.2s ease;
}
nav a:hover, nav a.active {
  color: #fff;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  padding: 8px 10px;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #cbd5e1;
  border-radius: 2px;
  transition: all 0.25s ease;
}
.menu-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Hero Section */
.hero {
  padding: 64px 0 48px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.hero h1 span {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: clamp(15px, 2.5vw, 18px);
  color: var(--text-secondary);
  max-width: 660px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

.btn-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: #0f172a;
  font-weight: 600;
  font-size: 15px;
  padding: 11px 24px;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}
.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--bg-secondary);
  color: #fff;
}

/* Section Title */
.section-title {
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 700;
  margin: 48px 0 24px;
}

/* Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
  width: 100%;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.card-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  line-height: 1.35;
}
.card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 14px;
  flex-grow: 1;
}
.card-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: auto;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
  width: 100%;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
}
textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

/* Article Layout */
.article-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.article-header h1 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
}
.article-meta {
  color: var(--text-secondary);
  font-size: 13px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.article-body {
  font-size: 16px;
  line-height: 1.8;
  color: #cbd5e1;
  max-width: 820px;
}
.article-body h2 {
  font-size: clamp(19px, 3vw, 24px);
  margin: 32px 0 14px;
  color: #fff;
}
.article-body h3 {
  font-size: 18px;
  margin: 24px 0 10px;
  color: #fff;
}
.article-body p {
  margin-bottom: 18px;
}
.article-body pre {
  background: var(--code-bg);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow-x: auto;
  margin-bottom: 22px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  max-width: 100%;
}
.article-body code {
  background: rgba(51, 65, 85, 0.5);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

/* Footer */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 64px;
  width: 100%;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
  width: 100%;
}
.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 9px;
}
.footer-col ul li a {
  color: var(--text-secondary);
  font-size: 13.5px;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  .menu-toggle {
    display: flex;
  }
  nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    width: 100%;
    background: #0f172a;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 20px;
    gap: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
  }
  nav.open {
    display: flex;
  }
  nav a {
    width: 100%;
    font-size: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  }
  nav a:last-child {
    border-bottom: none;
  }
  .hero {
    padding: 44px 0 36px;
  }
  .btn-group {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
  .btn {
    width: 100%;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-col {
    padding-bottom: 8px;
  }
}