/* ===== Knowledge Hub – pages.css (iframe pages shared) ===== */

:root{
  /* Light */
  --bg:#f3f5f9;
  --surface:#ffffff;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:rgba(0,0,0,0.08);
  --shadow: 0 18px 40px rgba(0,0,0,0.10);

  --accent:#2563eb;
  --accent2:#7c3aed;

  /* message boxes */
  --note-bg:#fff7ed;
  --note-bd:rgba(245,158,11,0.35);
  --note-tx:#92400e;

  --good-bg:#ecfdf5;
  --good-bd:rgba(16,185,129,0.25);
  --good-tx:#065f46;

  /* code */
  --code-bg:#0f172a;
  --code-tx:#e5e7eb;
  --code-bd:rgba(255,255,255,0.10);
}

body.theme-dark{
  --bg:#0b1020;
  --surface: rgba(17,26,51,0.92);
  --card: rgba(17,26,51,0.92);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
  --border: rgba(255,255,255,0.10);
  --shadow: 0 18px 40px rgba(0,0,0,0.45);

  --accent:#6ee7ff;
  --accent2:#a78bfa;

  --note-bg: rgba(245,158,11,0.10);
  --note-bd: rgba(253,224,71,0.18);
  --note-tx: rgba(253,224,71,0.92);

  --good-bg: rgba(16,185,129,0.10);
  --good-bd: rgba(110,231,255,0.14);
  --good-tx: rgba(110,231,255,0.92);

  --code-bg:#0b1226;
  --code-tx:#e5e7eb;
  --code-bd:rgba(110,231,255,0.14);
}

*{ box-sizing:border-box; }

body{
  font-family:"Pyidaungsu","Myanmar3",sans-serif;
  margin:0;
  padding: 18px 14px 34px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
}

.container{ max-width: 980px; margin: 0 auto; }

/* Common wrappers */
.article,
.wrap,
.container > .inner,
.container{
  /* (keep per-page layouts; no forced display changes) */
}

/* Surface card (article-like) */
.article,
.wrap,
.container.bg-card,
.page-card,
.main-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.article{ padding: 18px; }
.wrap{ padding: 18px 18px 40px; }
.inner{ padding: 18px; }

/* Headings */
h1{
  margin: 6px 0 10px;
  font-size: 20px;
  font-weight: 1000;
  letter-spacing:.2px;
  line-height: 1.35;
}
h2{
  margin: 22px 0 10px;
  font-size: 16px;
  font-weight: 1000;
  padding-left: 10px;
  border-left: 4px solid rgba(37,99,235,0.40);
}
body.theme-dark h2{ border-left-color: rgba(110,231,255,0.35); }
h3{
  margin: 16px 0 8px;
  font-size: 14px;
  font-weight: 1000;
  opacity: .95;
}

a{ color: var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

hr{
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

ul, ol{ margin: 8px 0 0; padding-left: 20px; }
li{ margin: 6px 0; }

/* Top action row (back + pill) */
.top-actions,
.topbar,
.title-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.back-btn,
.back{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.02);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  cursor:pointer;
  font-weight: 900;
  text-decoration:none;
  user-select:none;
  transition: transform .18s ease, background .18s ease;
  box-shadow: var(--shadow);
}
body.theme-dark .back-btn,
body.theme-dark .back{ background: rgba(255,255,255,0.04); }
.back-btn:hover,
.back:hover{ transform: translateY(-1px); }

.tag-pill,
.chip,
.page-title{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(124,58,237,.10));
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 900;
  color: var(--text);
  white-space: nowrap;
}
.tag-pill i,
.chip i,
.page-title i{ color: var(--accent); }
body.theme-dark .tag-pill,
body.theme-dark .chip,
body.theme-dark .page-title{
  background: linear-gradient(135deg, rgba(110,231,255,.12), rgba(167,139,250,.10));
  border-color: rgba(110,231,255,0.16);
}

/* Note / success blocks */
.note{
  background: var(--note-bg);
  border: 1px solid var(--note-bd);
  border-left: 5px solid rgba(245,158,11,0.75);
  color: var(--note-tx);
  padding: 12px 14px;
  border-radius: 14px;
  margin: 12px 0;
}
body.theme-dark .note{ border-left-color: rgba(253,224,71,0.85); }

.success{
  background: var(--good-bg);
  border: 1px solid var(--good-bd);
  border-left: 5px solid rgba(16,185,129,0.75);
  color: var(--good-tx);
  padding: 12px 14px;
  border-radius: 14px;
  margin: 12px 0;
}

/* Code blocks + copy button (for article pages) */
pre{
  margin: 12px 0;
  padding: 14px;
  padding-top: 44px;
  border-radius: 14px;
  overflow-x:auto;
  background: var(--code-bg);
  color: var(--code-tx);
  border: 1px solid var(--code-bd);
  position: relative;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre;
}
.copy-btn{
  position:absolute;
  top: 10px;
  right: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(110,231,255,0.16);
  color: rgba(255,255,255,0.92);
  padding: 6px 10px;
  border-radius: 10px;
  cursor:pointer;
  font-size: 12px;
  font-weight: 900;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  transition: transform .18s ease, opacity .18s ease;
  opacity: 0.95;
  user-select:none;
}
.copy-btn:hover{ transform: translateY(-1px); opacity: 1; }

code{
  background: rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: .95em;
}
body.theme-dark code{ background: rgba(255,255,255,0.06); }

/* Images in articles */
img{
  max-width:100%;
  height:auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0,0,0,0.10);
  margin: 12px 0;
  display:block;
}
.small-img{
  max-width: 360px !important;
  margin: 16px auto !important;
}

/* Footer */
.footer{
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  text-align:center;
  color: var(--muted);
  font-size: 12px;
}

/* Tech cards grid (tech-posts) */
.card-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}
@media (max-width: 980px){ .card-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px){ .card-grid{ grid-template-columns: 1fr; } }

.blog-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow:hidden;
  text-decoration:none;
  color: inherit;
  cursor:pointer;
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  display:flex;
  flex-direction:column;
  min-height: 168px;
}
.blog-card:hover{
  transform: translateY(-2px);
  border-color: rgba(37,99,235,0.22);
}
body.theme-dark .blog-card:hover{ border-color: rgba(110,231,255,0.18); }

.card-header{
  padding: 14px 14px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}
.icon-pill{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  border: 1px solid var(--border);
  background: rgba(37,99,235,0.08);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
  flex: 0 0 auto;
  font-size: 18px;
  color: var(--accent);
}
body.theme-dark .icon-pill{
  background: rgba(110,231,255,0.10);
  border-color: rgba(110,231,255,0.16);
  box-shadow: 0 18px 35px rgba(0,0,0,0.45);
  color: rgba(110,231,255,0.95);
}
.badge{
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.03);
}
body.theme-dark .badge{ background: rgba(255,255,255,0.04); }

.card-body{
  padding: 0 14px 14px;
  display:flex;
  flex-direction:column;
  gap: 8px;
  flex:1;
}
.card-title{
  margin:0;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
}
.card-desc{
  margin:0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}
.read-more{
  margin-top: auto;
  font-size: 13px;
  font-weight: 900;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  color: var(--accent);
}

/* Key cards (sg-key) */
.key-box-card{
  background: var(--surface);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-left:5px solid rgba(245,158,11,0.75);
  margin-bottom:18px;
}
.server-info{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}
.server-flag{ font-size:24px; }
.server-name{ font-size:18px; font-weight:900; color: var(--text); }
.status-dot{
  width:10px; height:10px;
  background:#2ecc71;
  border-radius:50%;
  display:inline-block;
  margin-left:auto;
  box-shadow:0 0 5px rgba(46,204,113,0.75);
}
.copy-area{ display:flex; gap:10px; }
.key-input{
  flex-grow:1;
  background: rgba(0,0,0,0.03);
  border:1px solid var(--border);
  padding:12px;
  border-radius:8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  color: var(--muted);
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.copy-btn.key{
  position: static;
  background: rgba(245,158,11,0.90);
  color:#fff;
  border:none;
  padding: 0 18px;
  border-radius:8px;
}
@media (max-width:500px){
  .copy-area{ flex-direction:column; }
  .copy-btn.key{ padding:12px; justify-content:center; }
}

/* Desktop polish */
@media (min-width: 900px){
  body{ padding: 22px 18px 40px; }
  .card-grid{ gap: 14px; }
  .card-title{ font-size: 16px; }
}

/* ===== WELCOME page (welcome.html) ===== */
/* welcome.html က .container > .inner structure သုံးလို့ safe */
.container > .inner{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Header row */
.profile-row{
  display:flex;
  align-items:center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.profile-img{
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  flex: 0 0 auto;
  background: rgba(0,0,0,0.08);
}

.title-wrap{
  min-width: 0;
  flex: 1;
}

.title-wrap h1{
  margin: 0;
  font-size: 16px;
  letter-spacing: .2px;
  line-height: 1.45;
  color: var(--text);
}

.subtitle{
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  display:flex;
  align-items:center;
  gap: 8px;
}

/* Content blocks */
.block{
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.55);
}
body.theme-dark .block{
  background: rgba(255,255,255,0.04);
}

.block p{ margin: 0; color: rgba(0,0,0,0.78); }
body.theme-dark .block p{ color: rgba(255,255,255,0.78); }

/* Tags */
.tag{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--border);
  background: rgba(37,99,235,0.08);
  color: var(--text);
  margin: 2px 2px;
  white-space: nowrap;
}
body.theme-dark .tag{
  background: rgba(110,231,255,0.10);
  border-color: rgba(110,231,255,0.16);
}
.tag i{ color: var(--accent); }

/* Wishes */
.wishes{
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(46,204,113,0.22);
  background: linear-gradient(135deg, rgba(46,204,113,0.10), rgba(110,231,255,0.06));
  color: var(--text);
  font-weight: 700;
}
body.theme-dark .wishes{
  border-color: rgba(110,231,255,0.16);
  background: linear-gradient(135deg, rgba(110,231,255,0.10), rgba(167,139,250,0.08));
}

/* Responsive */
@media (min-width: 900px){
  .profile-img{ width: 70px; height: 70px; border-radius: 18px; }
  .title-wrap h1{ font-size: 18px; }
}
@media (max-width: 520px){
  .profile-img{ width: 52px; height: 52px; border-radius: 16px; }
  .title-wrap h1{ font-size: 15px; }
}
/* ✅ VIDEO */
    .video-section{
      margin: 18px 0 8px;
      padding: 14px;
      border: 1px solid var(--video-border);
      border-radius: 14px;
      background: var(--video-bg);
    }
    .video-title{
      margin: 0 0 10px;
      font-size: 15px;
      font-weight: 1000;
      color: var(--video-title);
      display:flex;
      align-items:center;
      gap:10px;
    }
    .video-wrap{
      width: 100%;
      max-width: 900px;
      margin: 0 auto;
    }
    .video-player{
      width: 100%;
      height: auto;
      display:block;
      border-radius: 14px;
      background:#000;
      border: 1px solid var(--video-border);
      box-shadow: 0 10px 22px rgba(0,0,0,0.12);
    }
    .video-hint{
      margin: 10px 0 0;
      font-size: 13px;
      color: var(--video-hint);
    }