/* =========================================
   KUBERNETES HANDWRITTEN NOTES - styles.css
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Kalam:wght@300;400;700&family=Patrick+Hand&display=swap');

/* ---- CSS Variables ---- */
:root {
  --paper-bg: #fdfaf3;
  --paper-lines: #e8e0cc;
  --spiral-color: #c0a882;
  --ink-dark: #1a1a2e;
  --ink-medium: #2d2d44;
  --blue: #2563eb;
  --blue-light: #dbeafe;
  --red: #dc2626;
  --red-light: #fee2e2;
  --green: #16a34a;
  --green-light: #dcfce7;
  --yellow: #d97706;
  --yellow-light: #fef3c7;
  --purple: #7c3aed;
  --purple-light: #ede9fe;
  --pink-light: #fce7f3;
  --shadow-notebook: 0 10px 40px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.15);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Kalam', cursive;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f2040 50%, #1a2a4a 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* ---- Top Bar ---- */
.topbar {
  width: 100%;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.k8s-logo {
  font-size: 28px;
  color: #326ce5;
  filter: drop-shadow(0 0 8px #326ce5aa);
  animation: logoGlow 2.5s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  from { filter: drop-shadow(0 0 4px #326ce5aa); }
  to   { filter: drop-shadow(0 0 16px #326ce5ff); }
}

.topbar-title {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-pill {
  font-family: 'Patrick Hand', cursive;
  font-size: 13px;
  font-weight: normal;
  background: rgba(50, 108, 229, 0.35);
  color: #bfdbfe;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(147, 197, 253, 0.4);
}

.topbar-center .page-indicator {
  font-family: 'Patrick Hand', cursive;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

.topbar-right {
  display: flex;
  gap: 10px;
}

.nav-btn {
  font-family: 'Caveat', cursive;
  font-size: 15px;
  font-weight: 700;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 6px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-1px);
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.home-link-btn {
  font-family: 'Caveat', cursive;
  font-size: 16px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 5px 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.home-link-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  transform: translateY(-1px);
}

.drawer-toggle-btn {
  background: linear-gradient(135deg, rgba(50, 108, 229, 0.3), rgba(30, 64, 175, 0.3));
  border-color: rgba(96, 165, 250, 0.45);
  color: #dbeafe;
}

.drawer-toggle-btn:hover {
  background: linear-gradient(135deg, rgba(50, 108, 229, 0.45), rgba(30, 64, 175, 0.45));
  border-color: #60a5fa;
}

/* =========================================
   TOPIC SIDENAV DRAWER (SLIDE-OVER)
   ========================================= */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 360px;
  max-width: 88vw;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(2, 6, 23, 0.98) 100%);
  border-right: 1px solid rgba(50, 108, 229, 0.3);
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  color: #f8fafc;
  overflow: hidden;
}

.sidebar-drawer.open {
  transform: translateX(0);
}

.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-home-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #f8fafc;
  font-family: 'Caveat', cursive;
  font-size: 22px;
  font-weight: 700;
  transition: all 0.2s ease;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-home-link:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #38bdf8;
  transform: translateY(-1px);
}

.sidebar-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 22px;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.sidebar-section {
  padding: 14px 18px 6px;
}

.section-label {
  font-family: 'Patrick Hand', cursive;
  font-size: 12px;
  letter-spacing: 1px;
  color: #94a3b8;
  margin-bottom: 8px;
  font-weight: 600;
}

/* Notebook Switcher Grid */
.notebook-switcher-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.switcher-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  text-decoration: none;
  color: #e2e8f0;
  transition: all 0.2s ease;
}

.switcher-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.switcher-card.active {
  background: linear-gradient(135deg, rgba(50, 108, 229, 0.35), rgba(30, 64, 175, 0.35));
  border-color: #60a5fa;
  color: #fff;
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.25);
}

.switcher-icon {
  font-size: 20px;
}

.switcher-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.switcher-title {
  font-family: 'Caveat', cursive;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.switcher-pages {
  font-family: 'Patrick Hand', cursive;
  font-size: 11px;
  color: #94a3b8;
}

/* Search Box */
.sidebar-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.sidebar-search-box .search-icon {
  position: absolute;
  left: 10px;
  font-size: 14px;
  pointer-events: none;
  opacity: 0.6;
}

.sidebar-search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 32px 8px 32px;
  font-family: 'Kalam', cursive;
  font-size: 14px;
  color: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
}

.sidebar-search-box input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.clear-search-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}

/* Topics List */
.sidebar-topics-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-topic-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: #f1f5f9;
}

.sidebar-topic-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateX(4px);
}

.sidebar-topic-item.active {
  background: rgba(50, 108, 229, 0.2);
  border-color: #60a5fa;
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.25);
}

.topic-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topic-num-badge {
  font-family: 'Caveat', cursive;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  color: #cbd5e1;
  flex-shrink: 0;
}

.sidebar-topic-item.active .topic-num-badge {
  background: #60a5fa;
  color: #0f172a;
}

.topic-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topic-title {
  font-family: 'Caveat', cursive;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topic-subtitle {
  font-family: 'Patrick Hand', cursive;
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topic-tag-pill {
  font-family: 'Patrick Hand', cursive;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
  margin-left: 8px;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: 'Caveat', cursive;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-action-btn.pdf-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-color: #fcd34d;
}

.sidebar-action-btn.home-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.sidebar-action-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

/* ---- Dot Navigation ---- */
.dot-nav {
  display: flex;
  gap: 10px;
  margin: 14px 0 10px;
  justify-content: center;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
}

.dot.active {
  background: #326ce5;
  transform: scale(1.4);
  box-shadow: 0 0 10px #326ce5cc;
}

.dot:hover:not(.active) {
  background: rgba(255,255,255,0.6);
  transform: scale(1.2);
}

/* ---- Notebook Container ---- */
.notebook-container {
  width: 100%;
  max-width: 820px;
  padding: 8px 16px 40px;
  position: relative;
  scroll-margin-top: 80px;
}

/* ---- Notebook Page ---- */
.notebook-page {
  display: none;
  animation: pageIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notebook-page.active {
  display: block;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notebook-inner {
  background: var(--paper-bg);
  border-radius: 4px 12px 12px 4px;
  box-shadow: var(--shadow-notebook);
  display: flex;
  position: relative;
  overflow: hidden;
  /* Paper texture */
  background-image:
    repeating-linear-gradient(
      transparent,
      transparent 26px,
      var(--paper-lines) 26px,
      var(--paper-lines) 27px
    );
  background-size: 100% 27px;
  background-position: 0 44px;
}

/* Paper subtle tint */
.notebook-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(255,252,235,0.4) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Spiral Holes ---- */
.spiral-holes {
  width: 36px;
  min-width: 36px;
  background: linear-gradient(to bottom, #d4b896, #c9a87a);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 16px 0;
  border-right: 2px solid #b8935a;
  border-radius: 4px 0 0 4px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.hole {
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, #0f2040 60%, #1e3a5f 100%);
  border-radius: 50%;
  border: 2px solid #8b7355;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 1px 2px rgba(255,255,255,0.2);
}

/* ---- Page Content ---- */
.page-content {
  flex: 1;
  padding: 18px 22px 16px 20px;
  position: relative;
  z-index: 1;
  min-height: 700px;
}

/* ---- Page Header / Footer ---- */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.author-tag {
  font-family: 'Patrick Hand', cursive;
  font-size: 11px;
  color: #999;
}

.page-num {
  font-family: 'Patrick Hand', cursive;
  font-size: 12px;
  color: #aaa;
  background: #f0e8d0;
  border-radius: 12px;
  padding: 2px 10px;
  border: 1px solid #d4c49a;
}

.page-footer {
  font-family: 'Patrick Hand', cursive;
  font-size: 11px;
  color: #aaa;
  text-align: center;
  margin-top: 14px;
  border-top: 1px dashed #d4c49a;
  padding-top: 8px;
}

/* ---- Page Title ---- */
.page-title {
  font-family: 'Caveat', cursive;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink-dark);
  text-align: center;
  margin-bottom: 14px;
  position: relative;
  line-height: 1.15;
}

.title-underline {
  display: block;
  height: 3px;
  background: linear-gradient(90deg, transparent 10%, #dc2626 30%, #dc2626 70%, transparent 90%);
  border-radius: 2px;
  margin: 2px auto 0;
  width: 60%;
}

/* ---- Highlight Spans ---- */
.highlight-blue  { color: var(--blue); font-weight: 700; }
.highlight-red   { color: var(--red); font-weight: 700; }
.highlight-green { color: var(--green); font-weight: 700; }
.highlight-yellow{ color: var(--yellow); font-weight: 700; }
.highlight-purple{ color: var(--purple); font-weight: 700; }

/* ---- Section Block ---- */
.section-block {
  margin-bottom: 14px;
  position: relative;
  padding-left: 4px;
}

.section-num-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--ink-dark);
  color: #fff;
  border-radius: 50%;
  font-family: 'Caveat', cursive;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-title {
  font-family: 'Caveat', cursive;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-medium);
  display: inline-block;
  margin-left: 6px;
  margin-bottom: 6px;
}

/* ---- Handwritten List ---- */
.handwritten-list {
  list-style: none;
  padding-left: 8px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-medium);
}

.handwritten-list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 2px;
}

.handwritten-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-size: 18px;
  line-height: 1;
  top: 1px;
}

/* ---- Two Column Layout ---- */
.two-col {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.col-left, .col-right { flex: 1; min-width: 160px; }

/* ---- Diagram Box (Stack) ---- */
.diagram-box {
  background: #f8f4ea;
  border: 1.5px solid #ddd0b0;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.diagram-title {
  font-family: 'Caveat', cursive;
  font-size: 14px;
  font-weight: 700;
  color: #555;
  margin-bottom: 8px;
  border-bottom: 1px dashed #ccc;
  padding-bottom: 4px;
}

.stack-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.stack-layer {
  width: 100%;
  max-width: 180px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1.5px solid;
}

.layer-app   { background: var(--blue-light); border-color: #93c5fd; color: #1e40af; }
.layer-pod   { background: var(--green-light); border-color: #86efac; color: #166534; }
.layer-k8s   { background: var(--yellow-light); border-color: #fcd34d; color: #92400e; }
.layer-infra { background: var(--purple-light); border-color: #c4b5fd; color: #5b21b6; }

.stack-arrow {
  font-size: 16px;
  color: #888;
  line-height: 1;
}

/* ---- Feature Grid ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.feature-card {
  background: #f8f4ea;
  border: 1.5px solid #e0d5b5;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.feature-icon {
  font-size: 22px;
  margin-bottom: 4px;
}

.feature-label {
  font-family: 'Caveat', cursive;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 2px;
}

.feature-desc {
  font-size: 10.5px;
  color: #555;
  line-height: 1.35;
}

/* ---- Remember Box ---- */
.remember-box {
  background: linear-gradient(135deg, #fffde7, #fff9c4);
  border: 1.5px solid #f9d73e;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.remember-title {
  font-family: 'Caveat', cursive;
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 5px;
}

.remember-items { display: flex; flex-direction: column; gap: 3px; }

.remember-item {
  font-size: 12.5px;
  color: #78350f;
  line-height: 1.4;
}

/* ---- Tip Box ---- */
.tip-box {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1.5px solid #86efac;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.tip-title {
  font-family: 'Caveat', cursive;
  font-size: 16px;
  font-weight: 700;
  color: #166534;
  margin-bottom: 5px;
}

.tip-content {
  font-size: 12px;
  color: #14532d;
  line-height: 1.55;
}

.tip-content code {
  background: #16a34a22;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
}

/* ---- Architecture Diagram ---- */
.arch-diagram {
  background: #f8f4ea;
  border: 1.5px solid #ddd0b0;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
}

.arch-cluster { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.arch-control-plane {
  background: linear-gradient(135deg, #fef9c3, #fef08a);
  border: 2px solid #f59e0b;
  border-radius: 8px;
  padding: 8px 14px;
  width: 100%;
  text-align: center;
}

.arch-cp-title {
  font-family: 'Caveat', cursive;
  font-size: 14px;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 6px;
}

.arch-cp-components {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.arch-comp {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1.5px solid;
}

.arch-comp.yellow { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.arch-comp.green  { background: var(--green-light); border-color: #86efac; color: #166534; }
.arch-comp.blue   { background: var(--blue-light); border-color: #93c5fd; color: #1e40af; }
.arch-comp.pink   { background: var(--pink-light); border-color: #f9a8d4; color: #831843; }

.arch-arrow-down {
  font-size: 12px;
  color: #888;
  font-family: 'Patrick Hand', cursive;
}

.arch-workers {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.arch-node {
  flex: 1;
  max-width: 180px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 2px solid #93c5fd;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.arch-node-title {
  font-family: 'Caveat', cursive;
  font-size: 13px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 5px;
}

.arch-node-comp {
  font-size: 10.5px;
  background: rgba(255,255,255,0.6);
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 3px;
  color: #374151;
  border: 1px solid #bfdbfe;
}

.arch-pods-row {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-top: 5px;
}

.mini-pod {
  background: #6366f1;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 5px;
  font-family: 'Patrick Hand', cursive;
}

/* ---- Compare Table ---- */
.compare-table {
  border: 1.5px solid #ddd0b0;
  border-radius: 8px;
  overflow: hidden;
  font-size: 12.5px;
}

.compare-header {
  display: flex;
}

.compare-col-header {
  flex: 1;
  padding: 6px 10px;
  font-family: 'Caveat', cursive;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.compare-blue   { background: #dbeafe; color: #1e40af; }
.compare-green  { background: #dcfce7; color: #166534; }
.compare-yellow { background: #fef3c7; color: #92400e; }

.compare-row {
  display: flex;
  border-top: 1px solid #e5dfc8;
}

.compare-row:nth-child(even) { background: rgba(0,0,0,0.02); }

.compare-cell {
  flex: 1;
  padding: 5px 10px;
  color: var(--ink-medium);
  border-right: 1px solid #e5dfc8;
  line-height: 1.35;
}

.compare-cell:last-child { border-right: none; }

.svc-type {
  font-family: 'Caveat', cursive;
  font-size: 14px;
  font-weight: 700;
  color: var(--purple);
}

/* ---- Pod Diagram ---- */
.pod-diagram {
  text-align: center;
  margin-top: 8px;
}

.pod-box {
  display: inline-block;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 130px;
}

.pod-label {
  font-family: 'Caveat', cursive;
  font-size: 15px;
  font-weight: 700;
  color: #166534;
  margin-bottom: 6px;
}

.pod-inner {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.container-box {
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 5px;
  font-weight: 600;
}

.pod-share {
  font-size: 10px;
  color: #166534;
  margin-top: 5px;
  font-family: 'Patrick Hand', cursive;
}

/* ---- Deployment Diagram ---- */
.deploy-diagram {
  text-align: center;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-radius: 10px;
  padding: 8px;
  margin-top: 8px;
}

.deploy-label {
  font-family: 'Caveat', cursive;
  font-size: 15px;
  font-weight: 700;
  color: #1e40af;
  background: #dbeafe;
  display: inline-block;
  padding: 3px 12px;
  border-radius: 5px;
  border: 1.5px solid #93c5fd;
}

.deploy-arrow {
  font-size: 11px;
  color: #888;
  margin: 3px 0;
  font-family: 'Patrick Hand', cursive;
}

.replicaset-label {
  font-family: 'Caveat', cursive;
  font-size: 13.5px;
  font-weight: 700;
  color: #6d28d9;
  background: #ede9fe;
  display: inline-block;
  padding: 3px 12px;
  border-radius: 5px;
  border: 1.5px solid #c4b5fd;
}

.pods-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 5px;
}

.mini-pod-green {
  background: #16a34a;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
  font-family: 'Patrick Hand', cursive;
}

/* ---- Lifecycle Row ---- */
.lifecycle-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

.lifecycle-step {
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  border: 1.5px solid;
}

.lifecycle-step small { font-size: 9.5px; display: block; font-weight: 400; }

.step-pending   { background: #fef3c7; border-color: #fcd34d; color: #78350f; }
.step-running   { background: #dcfce7; border-color: #86efac; color: #166534; }
.step-succeeded { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }
.step-failed    { background: #fee2e2; border-color: #fca5a5; color: #7f1d1d; }

.lifecycle-arrow { font-size: 18px; color: #888; }
.lifecycle-or    { font-size: 11px; color: #888; font-family: 'Patrick Hand', cursive; }

/* ---- Service Diagram ---- */
.service-diagram {
  text-align: center;
  background: #f8f4ea;
  border: 1.5px solid #ddd0b0;
  border-radius: 8px;
  padding: 8px;
}

.client-box {
  background: #e0e7ff;
  border: 1.5px solid #818cf8;
  border-radius: 6px;
  padding: 4px 14px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #3730a3;
}

.service-box {
  background: #fef3c7;
  border: 1.5px solid #f59e0b;
  border-radius: 6px;
  padding: 5px 12px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #78350f;
  margin: 2px 0;
}

.svc-arrow {
  font-size: 14px;
  color: #888;
  margin: 2px 0;
  font-family: 'Patrick Hand', cursive;
  font-size: 11px;
}

.svc-pods {
  display: flex;
  gap: 5px;
  justify-content: center;
}

/* ---- Code Snippet ---- */
.code-snippet {
  background: #1e1e2e;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  font-family: 'Courier New', monospace;
}

.code-line {
  font-size: 11.5px;
  color: #cdd6f4;
  line-height: 1.7;
}

.code-key {
  color: #89b4fa;
  font-weight: 600;
}

/* ---- Volume Cards ---- */
.volumes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.volume-card {
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  border: 1.5px solid #bae6fd;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  transition: transform 0.2s ease;
}

.volume-card:hover {
  transform: translateY(-3px);
}

.vol-name {
  font-family: 'Caveat', cursive;
  font-size: 14px;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 4px;
}

.vol-desc {
  font-size: 10.5px;
  color: #075985;
  line-height: 1.3;
}

/* ---- Use Case Grid ---- */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.usecase-card {
  background: #f8f4ea;
  border: 1.5px solid #e0d5b5;
  border-radius: 8px;
  padding: 8px 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.usecase-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.uc-title {
  font-family: 'Caveat', cursive;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 4px;
}

.uc-desc {
  font-size: 11px;
  color: #555;
  line-height: 1.35;
}

/* ---- Command Grid ---- */
.cmd-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.cmd-card {
  background: #1e1e2e;
  border-radius: 7px;
  padding: 7px 10px;
  transition: transform 0.2s ease;
}

.cmd-card:hover {
  transform: translateY(-2px);
}

.cmd-code {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: #a6e3a1;
  margin-bottom: 3px;
  word-break: break-all;
}

.cmd-desc {
  font-size: 10.5px;
  color: #cdd6f4;
  font-family: 'Patrick Hand', cursive;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .topbar {
    padding: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: center;
  }

  .topbar-left {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
  }

  .k8s-logo {
    font-size: 24px;
  }

  .topbar-title {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .author-pill {
    display: none;
  }

  .topbar-right {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
  }

  .topbar-center {
    order: 3;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding-top: 6px;
    border-top: 1px solid rgba(50, 108, 229, 0.2);
  }

  .nav-btn {
    font-size: 14px;
    padding: 5px 12px;
    border-radius: 6px;
  }

  .page-indicator {
    font-size: 14px;
    padding: 3px 12px;
  }

  .notebook-container {
    padding: 6px 8px 30px;
  }

  .spiral-holes {
    width: 24px;
    min-width: 24px;
    padding: 12px 0;
  }

  .hole {
    width: 10px;
    height: 10px;
  }

  .hole::before {
    left: -6px;
    width: 14px;
    height: 4px;
  }

  .page-content {
    padding: 14px 10px 18px 12px;
  }

  .page-title {
    font-size: 24px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .volumes-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .usecase-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cmd-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .two-col {
    flex-direction: column;
    gap: 10px;
  }
}

/* ---- Download PDF Button Style ---- */
.pdf-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fcd34d;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}

.pdf-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-color: #fef08a;
  transform: translateY(-1px);
}

/* =========================================
   PRINT / PDF EXPORT STYLES
   ========================================= */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 10mm 10mm 10mm;
  }

  html, body {
    background: #ffffff !important;
    color: #1a1a2e !important;
    font-size: 11pt !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide interactive controls */
  .topbar,
  .dot-nav,
  .nav-btn,
  .page-indicator,
  .sidebar-backdrop,
  .sidebar-drawer {
    display: none !important;
  }

  .app {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .notebook-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Display all notebook pages sequentially */
  .notebook-page {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    margin: 0 0 20px 0 !important;
    box-shadow: none !important;
  }

  .notebook-page:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  .notebook-inner {
    box-shadow: none !important;
    border: 1.5px solid #d4c49a !important;
    border-radius: 8px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    min-height: 265mm !important;
  }

  .page-content {
    min-height: auto !important;
  }

  .feature-card,
  .diagram-box,
  .arch-diagram,
  .compare-table,
  .remember-box,
  .tip-box,
  .code-snippet,
  .volume-card,
  .usecase-card,
  .cmd-card {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-shadow: none !important;
  }
}
