/* Minimal Tutorials styles: only what is needed for the code snippet block */

/* Optional page background to keep site look */
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: linear-gradient(135deg, #0a0f1c 0%, #1a1a2e 100%);
  min-height: 100vh;
}

/* Page layout overrides: remove global sideNav reserved space on this page */
.mainContents {
  margin-left: 0 !important; /* override style.css 20vw */
  width: 100% !important;    /* override style.css 80vw */
}
.nothing {
  margin-left: 0 !important; /* override style.css 20vw */
  width: 100% !important;    /* override style.css 80vw */
}
.homeContent { /* ensure hero text spans full width on this page */
  width: 100% !important;    /* override style.css 80vw */
}

/* Footer in normal flow */
footer#footer {
  position: static;
  clear: both;
}

/* ================= Blog Post Styling (scoped) ================ */
/* We style within .mainContents section containers to avoid touching header/footer */
.mainContents section .container {
  color: #cfd8e3; /* soft light text for dark bg */
}

.mainContents section .title {
  color: #e6edf3;
  font-weight: 700;
  margin: 24px 0 12px;
}

.mainContents section .text {
  color: #c9d1d9;
  font-size: 1rem;
  line-height: 1.8;
}

.mainContents section .text p {
  margin: 0 0 12px;
}

.mainContents section .text ul,
.mainContents section .text ol {
  margin: 8px 0 18px 22px;
}

.mainContents section .text li { margin: 6px 0; }

.mainContents section .text a {
  color: #4fc3f7;
  text-decoration: none;
}
.mainContents section .text a:hover { text-decoration: underline; }

.mainContents section code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.92em;
  color: #ffd9a6;
}

/* Responsive video wrapper spacing/shape */
.mainContents .ratio {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  margin: 10px 0 28px;
}

/* ============ Code Snippet Block ============ */
.code-snippet-section {
  padding: 60px 0;
}

.code-window {
  max-width: 1000px;
  margin: 0 auto;
  background: #0f1420;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.code-window__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-window__title {
  color: #e6edf3;
  font-weight: 600;
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(23, 162, 184, 0.12);
  color: #d1ecf1;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.copy-btn:hover {
  background: rgba(23, 162, 184, 0.22);
  transform: translateY(-1px);
}
.copy-btn:active {
  transform: translateY(0);
}

.code-window__body {
  position: relative;
  background: #0a0f18;
}

.code-block {
  margin: 0;
  padding: 18px 20px;
  color: #c9d1d9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  overflow: auto;
  max-height: 60vh;
  white-space: pre;
}

.copy-toast {
  position: absolute;
  right: 16px;
  bottom: 16px;
  background: rgba(25, 135, 84, 0.16);
  border: 1px solid rgba(25, 135, 84, 0.4);
  color: #a9f0c1;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  display: none;
}

@media (max-width: 768px) {
  .code-block {
    font-size: 0.88rem;
  }
}
