:root {
  --bg-color: #080d14;
  --card-bg: rgba(8, 13, 20, 0.45);
  --card-border: rgba(255, 255, 255, 0.07);
  --text-color: #ffffff;
  --hint-color: #8b9bb4;
  --brand-primary: #5e6ad2;
  --brand-accent: #00f2fe;
  --brand2: #a5b4fc;
  --gold: #ffd700;
  --red: #ff6b6b;
  --green: #10b981;
  --radius-lg: 24px;
  --radius-md: 14px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --content-width: 1000px; /* Centered Bento container max-width */
}

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

body {
  font-family: var(--font-family);
  background: #080d14;
  color: var(--text-color);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 12px;
  position: relative;
  overflow-x: hidden;
}

/* ── BG SLIDESHOW ────────────────────────────── */
.bg-slideshow {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -2;
  overflow: hidden;
  background: #080d14;
}

.bg-slideshow::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(8, 13, 20, 0.5) 0%, rgba(8, 13, 20, 0.65) 100%);
  z-index: 1;
}

.slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
  filter: blur(8px) saturate(1.2);
  z-index: 0;
}

.slide.active {
  opacity: 0.45;
}

/* ── CONTAINER ────────────────────────────────── */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 40px 24px;
}

@media (max-width: 768px) {
  .container {
    padding: 24px 16px;
  }
}

/* ── BENTO GRID LAYOUT ────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: stretch;
}

.bento-col-12 { grid-column: span 12; }
.bento-col-8  { grid-column: span 8; }
.bento-col-7  { grid-column: span 7; }
.bento-col-6  { grid-column: span 6; }
.bento-col-5  { grid-column: span 5; }
.bento-col-4  { grid-column: span 4; }
.bento-col-3  { grid-column: span 3; }

@media (max-width: 800px) {
  .bento-grid {
    gap: 16px;
  }
  .bento-col-12,
  .bento-col-8,
  .bento-col-7,
  .bento-col-6,
  .bento-col-5,
  .bento-col-4,
  .bento-col-3 {
    grid-column: span 12;
  }
}

/* Custom bento-card header styling inside grid */
.bento-grid .card {
  margin-bottom: 0; /* Bento cards use grid gap instead of margins */
  height: 100%;
}

/* ── HEADER ────────────────────────────────── */
.main-header {
  width: 100%;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
}

.header-glow {
  position: absolute;
  top: -50px;
  left: -50px;
  width: 250px;
  height: 250px;
  background: var(--brand-primary);
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
  animation: pulseGlow 5s infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 0.25; }
  100% { transform: scale(1.15); opacity: 0.35; }
}

.header-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.header-logo-left {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.header-logo-left a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.header-logo-left a:hover {
  opacity: 0.9;
}

.header-logo-left .accent {
  color: var(--brand-accent);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-right .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--hint-color);
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-right .back-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 8px rgba(0, 242, 254, 0.08);
  transform: translateY(-1px);
}

/* ── LANG TOGGLE ────────────────────────────── */
.lang-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--hint-color);
  font-weight: 700;
  font-size: 11px;
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.lang-btn.active {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(94, 106, 210, 0.3);
}

/* Responsive Header Styles */
@media (max-width: 600px) {
  .header-content {
    flex-direction: column;
    gap: 12px;
    padding: 15px 16px;
    text-align: center;
  }
  .header-right {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }
}

/* ── CONTENT LANG TOGGLE ─────────────────────── */
.lang-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.lang-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── TYPOGRAPHY ────────────────────────────── */
h1 {
  font-size: 32px;
  font-weight: 850;
  margin-bottom: 20px;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, #ffffff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

@media (max-width: 768px) {
  h1 {
    font-size: 26px;
  }
}

.lead {
  font-size: 17px;
  color: var(--hint-color);
  margin-bottom: 30px;
  font-weight: 400;
}

@media (max-width: 768px) {
  .lead {
    font-size: 15px;
  }
}

h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 40px 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

@media (max-width: 768px) {
  h2 {
    font-size: 18px;
  }
}

h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 14px;
  color: var(--brand2);
}

h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: #fff;
}

p {
  margin-bottom: 16px;
  color: #cbd5e1;
}

ul, ol {
  margin-bottom: 20px;
  padding-left: 24px;
  color: #cbd5e1;
}

li {
  margin-bottom: 8px;
}

strong {
  color: #fff;
}

/* ── CARDS & BOXES ──────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 242, 254, 0.15);
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  padding: 1px; /* border thickness */
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.25), rgba(94, 106, 210, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

@media (max-width: 768px) {
  .card {
    padding: 24px 20px;
  }
}

/* ── MONOSPACE CODE BLOCK ────────────────────── */
.prompt-code {
  font-family: 'Fira Code', 'JetBrains Mono', 'Courier New', Courier, monospace;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--brand-accent);
  font-size: 13.5px;
  word-break: break-all;
  margin: 10px 0;
  display: block;
}

/* ── ICON WRAPPERS ──────────────────────────── */
.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(94, 106, 210, 0.15);
  border-radius: 8px;
  color: var(--brand-accent);
  flex-shrink: 0;
}

.section-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

/* ── ALERTS (TIP/INFO) ───────────────────────── */
.alert-box {
  background: rgba(94, 106, 210, 0.07);
  border-left: 3px solid var(--brand-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
}

.alert-box.tip {
  background: rgba(16, 185, 129, 0.06);
  border-left-color: var(--green);
  color: #cbd5e1;
}

.alert-box strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

/* ── TABLE STYLING ──────────────────────────── */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.2);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

th, td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--card-border);
  vertical-align: middle;
}

th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--hint-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.8px;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.model-name {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.token-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid rgba(255, 215, 0, 0.2);
  color: var(--gold);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}

/* ── STEP BADGES ────────────────────────────── */
.step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.step-number {
  font-size: 12px;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand2);
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.step-desc {
  padding-left: 36px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .step-desc {
    padding-left: 0;
  }
}

/* ── DIVIDER ────────────────────────────────── */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  margin: 30px 0;
}

/* ── SIDEBAR MOBILE REORDERING ───────────────── */
@media (max-width: 1023px) {
  .sidebar-first-mobile {
    display: flex;
    flex-direction: column;
  }
  .sidebar-first-mobile .layout-main {
    order: 2;
  }
  .sidebar-first-mobile .layout-sidebar {
    order: 1;
  }
}

/* ── INSTRUCTION FOOTER ───────────────────────── */
.instruction-footer {
  margin-top: 35px;
  padding: 20px 0 10px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── CTA BOT LOGO ────────────────────────────── */
.cta-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 242, 254, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-color);
}

/* ── TOKEN ICON STYLE ────────────────────────── */
.token-icon {
  width: 1.2em;
  height: 1.2em;
  display: inline-block;
  vertical-align: -0.2em; /* Выравнивание по центру строки текста */
  margin: 0 0.2em; /* Небольшие отступы по бокам */
}


