  :root {
    --bg: #0a0c10;
    --surface: #23133a;
    --surface2: #1f1232;
    --surface3: #2a1647;
    --border: #3a1c63;
    --border2: #5e309d;
    --accent: #883CF0;
    --accent2: #af62c8;
    --accent3: #7b5ea7;
    --warn: #e95bf6;
    --danger: #ff4444;
    --success: #00cc66;
    --text: #e8edf7;
    --text2: #c8d6e5;
    --text3: #d6d6d6;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html { scroll-behavior: smooth; }

  .secret-server-training-guide {
    background:#191127;
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    display: flex;
    height:100vh;
    overflow-y: auto;
  }

  /* ── SCANLINE OVERLAY ── */
  .secret-server-training-guide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,212,170,0.015) 2px, rgba(0,212,170,0.015) 4px);
    pointer-events: none;
    z-index: 9999;
  }

  /* ── SIDEBAR NAV ── */
  #sidebar {
    position: sticky;
    left: 0; top: 0; bottom: 0;
    width: 260px;
    background: #180f26;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1;
    overflow-y: auto;
    transition: transform 0.3s ease;
  }

  .sidebar-logo {
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-logo .logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 10px;
  }

  .sidebar-logo h1 {
    font-size: 22px;
    color: var(--text);
    line-height: 1;
  }

  .sidebar-logo p {
    font-size: 10px;
    color: var(--text3);
    margin-top: 4px;
    text-transform: uppercase;
  }

  .nav-section {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-section-title {
    font-size: 9px;
    color: var(--text3);
    text-transform: uppercase;
    padding: 0 20px 8px;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    color: var(--text2);
    font-size: 13px;
    border-left: 3px solid transparent;
  }

  .nav-item:hover {
    background: #23133a9f;
    color: var(--text);
  }

  .nav-item.active {
    border-left-color: var(--accent);
    background: #23133a;
    color: var(--accent);
  }

  .nav-item .nav-num {
    font-size: 10px;
    color: var(--text3);
    min-width: 20px;
  }

  .progress-bar-wrap {
    padding: 16px 20px;
    margin-top: auto;
    border-top: 1px solid var(--border);
  }

  .progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text3);
    margin-bottom: 8px;
  }

  .progress-track {
    height: 3px;
    background: #282035;
    border-radius: 2px;
    overflow: hidden;
  }

  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s ease;
  }

  /* ── MAIN CONTENT ── */
  #main {
    /* margin-left: 260px; */
    min-height: 100vh;
    flex: 1;
  }

  /* ── HERO ── */
  #hero {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 60px 60px 50px;
    position: relative;
    overflow: hidden;
  }

  #hero::before {
    content: 'SECRET SERVER';
    position: absolute;
    right: -10px; top: -20px;
    font-size: 160px;
    color: rgba(162, 0, 212, 0.03);
    pointer-events: none;
    white-space: nowrap;
  }

  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #23133a;
    border: 1px solid #3a1c63;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--accent);
    margin-bottom: 20px;
  }

  .hero-badge::before { content: '●'; font-size: 8px; animation: pulse 2s infinite; }

  @keyframes pulse {
    0%,100% { opacity: 1; }
    50% { opacity: 0.3; }
  }

  #hero h2 {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 16px;
    color: linear-gradient(135deg, var(--text) 40%, var(--text2));
  }

  #hero p {
    color: var(--text2);
    font-size: 15px;
    max-width: 600px;
    line-height: 1.7;
  }

  .hero-meta {
    display: flex;
    gap: 30px;
    margin-top: 28px;
  }

  .meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .meta-item .val {
    font-size: 20px;
    color: var(--accent);
    font-weight: 500;
  }

  .meta-item .lbl {
    font-size: 11px;
    color: var(--text3);
    text-transform: uppercase;
  }

  /* ── SECTION ── */
  .section {
    padding: 50px 60px;
    border-bottom: 1px solid var(--border);
  }

  .section-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 36px;
  }

  .section-num {
    font-size: 64px;
    line-height: 1;
    color: var(--border2);
    min-width: 60px;
    margin-top: -8px;
  }

  .section-title-wrap h2 {
    font-size: 34px;
    color: var(--text);
    line-height: 1;
    margin-bottom: 6px;
  }

  .section-title-wrap p {
    color: var(--text2);
    font-size: 13px;
  }

  .section-tag {
    display: inline-block;
    font-size: 9px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
  }

  .tag-config { background: #23133a; color: var(--accent2); border: 1px solid #5e309d; }
  .tag-security { background: #23133a; color: var(--accent2); border: 1px solid #5e309d; }
  .tag-automation { background: #23133a; color: var(--accent2); border: 1px solid #5e309d; }
  .tag-access { background: #23133a; color: var(--accent2); border: 1px solid #5e309d; }
  .tag-ops { background: #23133a; color: var(--accent2); border: 1px solid #5e309d; }

  /* ── STEPS ── */
  .steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    margin-left: 20px;
  }

  .steps::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--border) 100%);
  }

  .step {
    display: flex;
    gap: 24px;
    padding: 20px 0;
    cursor: pointer;
    position: relative;
  }

  .step-dot {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--surface2);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text3);
    z-index: 1;
    transition: all 0.2s ease;
    position: relative;
  }

  .step:hover .step-dot,
  .step.done .step-dot {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    font-weight: 600;
    box-shadow: 0 0 16px #be52e50f;
  }

  .step.done .step-dot::after {
    content: '✓';
    font-size: 14px;
  }

  .step-body {
    flex: 1;
    padding-top: 8px;
  }

  .step-body h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    transition: color 0.2s;
  }

  .step:hover .step-body h4 { color: var(--accent); }

  .step-body p {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.6;
  }

  .step-detail {
    display: none;
    margin-top: 12px;
  }

  .step.open .step-detail { display: block; }

  /* ── CODE BLOCK ── */
  .code-block {
    background: #060810;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent2);
    border-radius: 6px;
    padding: 16px 20px;
    font-size: 12px;
    line-height: 1.8;
    color: #a8c4e0;
    overflow-x: auto;
    margin: 12px 0;
    position: relative;
  }

  .code-block .comment { color: var(--text3); }
  .code-block .key { color: var(--accent2); }
  .code-block .val { color: var(--accent); }
  .code-block .str { color: #ffb86c; }
  .code-block .kw { color: #ff79c6; }
  .code-block .copy-btn {
    position: absolute;
    top: 8px; right: 8px;
    background: var(--surface3);
    border: 1px solid var(--border);
    color: var(--text3);
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
  }
  .code-block .copy-btn:hover { color: var(--accent); border-color: var(--accent); }
  .code-block .copy-btn.copied { color: var(--success); border-color: var(--success); }

  /* ── GRID CARDS ── */
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 8px;
  }

  .card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
    cursor: default;
  }

  .card:hover {
    border-color: var(--border2);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  }

  .card-icon {
    font-size: 24px;
    margin-bottom: 12px;
    display: block;
  }

  .card h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
  }

  .card p {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.5;
  }

  .card.highlight {
    border-color: #5e309d;
    background: rgba(152, 0, 212, 0.04);
  }

  /* ── PERMISSION TABLE ── */
  .perm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin: 16px 0;
  }

  .perm-table th {
    background: #883cf050;
    padding: 10px 14px;
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text3);
    border-bottom: 2px solid var(--border2);
  }

  .perm-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text2);
  }

  .perm-table tr:hover td { background: var(--surface2); color: var(--text); }

  .perm-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 6px;
  }

  .dot-green { background: var(--success); box-shadow: 0 0 6px rgba(0,204,102,0.5); }
  .dot-yellow { background: var(--warn); box-shadow: 0 0 6px rgba(255,204,0,0.5); }
  .dot-red { background: var(--danger); box-shadow: 0 0 6px rgba(255,68,68,0.5); }
  .dot-blue { background: var(--accent2); box-shadow: 0 0 6px rgba(0,153,255,0.5); }

  /* ── ALERT BOXES ── */
  .alert {
    display: flex;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.6;
  }

  .alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
  .alert-body strong { display: block; font-size: 12px; text-transform: uppercase; margin-bottom: 4px; }

  .alert-warn { background: rgba(255,204,0,0.08); border: 1px solid rgba(255,204,0,0.25); color: #e6c000; }
  .alert-warn .alert-body strong { color: var(--warn); }
  .alert-info { background: #23133a3e; border: 1px solid #3a1c63; color: #e0e8ef; }
  .alert-info .alert-body strong { color: var(--accent2); }
  .alert-success { background: rgba(0,204,102,0.08); border: 1px solid rgba(0,204,102,0.25); color: #66cc99; }
  .alert-success .alert-body strong { color: var(--success); }
  .alert-danger { background: rgba(255,68,68,0.08); border: 1px solid rgba(255,68,68,0.25); color: #ff9999; }
  .alert-danger .alert-body strong { color: var(--danger); }

  /* ── TIMELINE ── */
  .timeline {
    position: relative;
    padding-left: 28px;
    margin: 16px 0;
  }

  .timeline::before {
    content: '';
    position: absolute;
    left: 7px; top: 8px; bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent3), var(--border));
  }

  .tl-item {
    position: relative;
    padding: 0 0 20px 24px;
  }

  .tl-item::before {
    content: '';
    position: absolute;
    left: -21px; top: 6px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent3);
    border: 2px solid var(--bg);
    box-shadow: 0 0 8px rgba(255,107,53,0.5);
  }

  .tl-item h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }

  .tl-item p {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.5;
  }

  /* ── INTERACTIVE QUIZ ── */
  .quiz-wrap {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px;
    margin-top: 20px;
  }

  .quiz-q {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.5;
  }

  .quiz-opts {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .quiz-opt {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text2);
    transition: all 0.15s;
    background: var(--surface);
  }

  .quiz-opt:hover { border-color: var(--accent2); color: var(--text); }
  .quiz-opt.correct { border-color: var(--success); background: rgba(0,204,102,0.1); color: var(--success); }
  .quiz-opt.wrong { border-color: var(--danger); background: rgba(255,68,68,0.1); color: var(--danger); }

  .quiz-feedback {
    display: none;
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
  }

  .quiz-feedback.show { display: block; }
  .quiz-feedback.pass { background: rgba(0,204,102,0.1); border: 1px solid rgba(0,204,102,0.3); color: var(--success); }
  .quiz-feedback.fail { background: rgba(255,68,68,0.1); border: 1px solid rgba(255,68,68,0.3); color: #ff9999; }

  /* ── CHECKLIST ── */
  .checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
  }

  .checklist li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: var(--text2);
    cursor: pointer;
    transition: color 0.15s;
  }

  .checklist li .cb {
    width: 16px; height: 16px;
    min-width: 16px;
    border: 2px solid var(--border2);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    transition: all 0.15s;
    margin-top: 2px;
  }

  .checklist li.checked .cb {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
  }

  .checklist li.checked .cb::after { content: '✓'; }
  .checklist li.checked span { color: var(--text3); text-decoration: line-through; }

  /* ── TOPOLOGY DIAGRAM ── */
  .topo {
    background: #060810;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin: 16px 0;
    font-size: 12px;
    color: var(--text2);
    line-height: 2;
    overflow-x: auto;
  }

  .topo .node-vault { color: var(--accent); }
  .topo .node-folder { color: var(--accent2); }
  .topo .node-secret { color: #ffb86c; }
  .topo .node-dep { color: var(--accent3); }
  .topo .line { color: var(--text3); }

  /* ── DEPENDENCY FLOW ── */
  .dep-flow {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    margin: 16px 0;
    gap: 4px;
  }

  .dep-node {
    background: var(--surface3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 16px;
    text-align: center;
    font-size: 12px;
    transition: all 0.2s;
  }

  .dep-node:hover { border-color: var(--accent3); transform: scale(1.03); }
  .dep-node .dn-type { font-size: 9px; color: var(--text3); text-transform: uppercase; }
  .dep-node .dn-name { font-size: 13px; color: var(--text); font-weight: 500; margin-top: 3px; }

  .dep-arrow {
    color: var(--accent3);
    font-size: 18px;
    padding: 0 4px;
  }

  /* ── COMPLEXITY METER ── */
  .complexity-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
  }

  .complexity-row {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .complexity-label {
    font-size: 12px;
    color: var(--text2);
    min-width: 180px;
  }

  .complexity-track {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
  }

  .complexity-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
  }

  .cf-green { background: linear-gradient(90deg, var(--success), #00aa55); }
  .cf-yellow { background: linear-gradient(90deg, var(--warn), #cc9900); }
  .cf-orange { background: linear-gradient(90deg, var(--accent3), #cc4400); }
  .cf-red { background: linear-gradient(90deg, var(--danger), #cc0000); }

  .complexity-val {
    font-size: 11px;
    color: var(--text3);
    min-width: 30px;
    text-align: right;
  }

  /* ── MOBILE TOGGLE ── */
  #menu-toggle {
    display: none;
    position: sticky;
    height: fit-content;
    top: 0px; left: 0px;
    z-index: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
  }

  @media (max-width: 900px) {
    .secret-server-training-guide{
      flex-direction: column;
    }
    #sidebar { transform: translateX(-100%); position: absolute;}
    #sidebar.open { transform: translateX(0); }
    #main { margin-left: 0; }
    #menu-toggle { display: block; }
    .section { padding: 40px 24px; }
    #hero { padding: 40px 24px 40px; }
    #hero::before { font-size: 80px; }
    #hero h2 { font-size: 36px; }
  }

  /* ── SCROLL INDICATOR ── */
  #scroll-indicator {
    position: sticky;
    top: 0; left: 260px; right: 0;
    height: 2px;
    background: var(--border);
    z-index: 1;
  }

  #scroll-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    width: 0%;
    transition: width 0.1s linear;
  }

  @media (max-width: 900px) {
    #scroll-indicator { left: 0; }
  }

  /* ── SECTION ANIM ── */
  .section { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
  .section.visible { opacity: 1; transform: translateY(0); }
  #hero { opacity: 1; transform: none; }

  /* ── BADGE STATUS ── */
  .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 3px;
    margin: 2px;
  }

  .sb-enabled { background: rgba(0,204,102,0.12); color: var(--success); border: 1px solid rgba(0,204,102,0.25); }
  .sb-disabled { background: rgba(255,68,68,0.12); color: var(--danger); border: 1px solid rgba(255,68,68,0.25); }
  .sb-optional { background: rgba(255,204,0,0.12); color: var(--warn); border: 1px solid rgba(255,204,0,0.25); }

  /* ── KEY-VALUE PAIRS ── */
  .kv-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    margin: 12px 0;
  }

  .kv-row {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 6px 10px;
    background: var(--surface3);
    border-radius: 4px;
    border-left: 2px solid var(--border2);
  }

  .kv-k { color: var(--accent2); min-width: 200px; }
  .kv-sep { color: var(--text3); }
  .kv-v { color: #ffb86c; }

  /* ── SECTION DIVIDER ── */
  .divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
  }

  .divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }

  .divider span {
    font-size: 10px;
    color: var(--text3);
    text-transform: uppercase;
  }


  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: #873cf015; }
  ::-webkit-scrollbar-thumb { background: #873cf015; border-radius: 3px; }