/* deck.css - Phong cách chuẩn Workshop diemdanhsv.com kết hợp nhận diện thương hiệu ThS. Đinh Quốc Tuấn */
:root {
  --luc: #0F6B55;        /* Lục Bồ Đề - chủ đạo */
  --luc-non: #46A385;
  --ngoc: #8FE0BD;
  --lam: #1F4E79;        /* Lam Hộ Vệ */
  --lam-suong: #2F6DB0;
  --muc: #10212B;        /* Mực Lam - chữ chính */
  --giay: #F6F7F3;       /* Nền giấy ngà */
  --bac: #D5DCE1;        /* Đường viền */
  --son: #D2492A;        /* Nhấn cam son */
  --tho: #D6A130;        /* Vàng đất */
  --tim: #6B4A9E;
  --mute: #556575;
  --line: #D5DCE1;
  --card: #FFFFFF;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --sec: var(--luc);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #E5E9E4;
  color: var(--muc);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* Sân khấu 1600 x 900 tỷ lệ 16:9 co giãn */
#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: #E5E9E4;
}

#scaler {
  width: 1600px;
  height: 900px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center center;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.slide {
  position: absolute;
  inset: 0;
  background: var(--giay);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(16, 33, 43, 0.22);
  display: flex;
  flex-direction: column;
  font-size: 25px;
  line-height: 1.48;
  padding: 50px 75px 0;
}

.slide.enter {
  animation: sIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes sIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.s-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.s-kicker {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sec);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.s-kicker::before {
  content: "";
  width: 34px;
  height: 4px;
  border-radius: 2px;
  background: var(--sec);
}

.s-title {
  font: 700 52px/1.15 var(--serif);
  margin: 0 0 10px;
  color: var(--muc);
  letter-spacing: -0.01em;
}

.s-sub {
  font-size: 26px;
  color: var(--mute);
  margin: 0 0 22px;
}

.s-foot {
  height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  margin: 0 -75px;
  padding: 0 75px;
  font-size: 17px;
  color: var(--mute);
}
.s-foot img.hcmus { height: 34px; width: auto; }
.s-foot .sen { width: 32px; height: 32px; }
.s-foot .grow { flex: 1; }
.s-foot .num { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muc); }

/* Bìa slide */
.cover-wrap {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 50px;
  align-items: center;
  flex: 1;
}
.logos { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; }
.logos img.hcmus { height: 80px; }
.logos .sep { width: 1px; height: 60px; background: var(--line); }
.logos .sen { width: 72px; height: 72px; background: #fff; border-radius: 20%; padding: 6px; box-shadow: 0 2px 10px rgba(16,33,43,.08); }
.cover-h1 { font: 700 68px/1.12 var(--serif); margin: 0 0 16px; color: var(--muc); }
.cover-sub { font-size: 28px; color: var(--mute); margin: 0 0 30px; }
.people { display: flex; gap: 18px; }
.person { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 20px 12px 14px; }
.person .av { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 22px var(--serif); flex: none; }
.person b { display: block; font: 700 23px var(--serif); }
.person span { font-size: 16px; color: var(--mute); }
.cover-when { margin-top: 24px; font-size: 19px; color: var(--mute); }

/* Thẻ menu / QR / Box tham gia */
.join-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(16,33,43,.06);
}
.join-box .qr { width: 180px; height: 180px; }
.join-box b { font-size: 22px; color: var(--muc); }
.join-box code { font: 600 18px var(--sans); color: var(--luc); }

/* Bố cục thẻ cards & lưới */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 26px;
  box-shadow: 0 4px 15px rgba(16,33,43,.03);
}
.card h3 { font: 700 28px/1.2 var(--serif); margin: 0 0 10px; color: var(--sec); }
.card .tag {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--sec) 12%, white);
  color: var(--sec);
  margin-bottom: 12px;
}

/* Danh sách gạch đầu dòng chuẩn */
ul.clean { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
ul.clean li { padding-left: 30px; position: relative; font-size: 23px; }
ul.clean li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.58em;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--sec);
}
ul.clean li.bold { font-weight: 700; color: var(--sec); }

/* Bố cục hình ảnh + gạch đầu dòng */
.fig-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  align-items: center;
  flex: 1;
  min-height: 0;
}
.fig-split.reverse {
  grid-template-columns: 1fr 1.15fr;
}
.fig-img-box {
  width: 100%;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.fig-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Bảng so sánh */
table.styled-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 21px;
  margin-top: 8px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
table.styled-tbl th {
  background: var(--lam);
  color: #fff;
  padding: 14px 18px;
  font-family: var(--serif);
  font-weight: 700;
  text-align: left;
}
table.styled-tbl td {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: var(--muc);
}
table.styled-tbl tr:nth-child(even) td { background: var(--giay); }

/* Công thức */
.eq-box {
  background: #fff;
  border: 1px dashed var(--bac);
  border-radius: 14px;
  padding: 16px 24px;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--lam);
  text-align: center;
  margin-bottom: 16px;
}

/* Số liệu thống kê lớn */
.stat-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}
.stat-box .num {
  font: 700 64px/1 var(--serif);
  color: var(--sec);
  margin-bottom: 8px;
}
.stat-box .lbl {
  font-size: 20px;
  color: var(--mute);
}

/* Hoạt động tương tác QUIZ & VOTE trực tiếp */
.quiz-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  justify-content: center;
}
.quiz-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 26px;
  transition: all 0.2s ease;
}
.quiz-q {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--muc);
  display: flex;
  gap: 14px;
}
.quiz-q .q-badge {
  background: var(--tho);
  color: #fff;
  font-family: var(--serif);
  font-size: 20px;
  padding: 2px 14px;
  border-radius: 99px;
  flex: none;
}
.quiz-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.quiz-opt-btn {
  background: var(--giay);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 21px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}
.quiz-opt-btn:hover {
  border-color: var(--luc);
  background: #fff;
}
.quiz-opt-btn.correct {
  border-color: var(--luc);
  background: #E8F4EE;
  color: var(--luc);
  font-weight: 700;
}
.quiz-opt-btn.wrong {
  border-color: var(--son);
  background: #FBEFEC;
  color: var(--son);
}

/* Hoạt động Thảo luận / Think-Pair-Share */
.act-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 8px solid var(--luc-non);
  border-radius: 16px;
  padding: 24px 30px;
  display: flex;
  gap: 28px;
  align-items: center;
}
.act-time {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--luc-non);
  color: #fff;
  display: grid;
  place-items: center;
  font: 700 36px var(--serif);
  flex: none;
  box-shadow: 0 10px 25px rgba(70,163,133,0.3);
}

/* Trích dẫn & Nguồn */
.src {
  font-size: 16px;
  color: var(--mute);
  font-style: italic;
  margin-top: auto;
  padding-top: 12px;
}

/* Thanh điều khiển dưới cùng */
#ctrl {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(16, 33, 43, 0.9);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 7px 12px;
  border-radius: 14px;
  font-size: 15px;
  z-index: 50;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  transition: opacity 0.25s;
}
#ctrl button, #ctrl a, #ctrl select {
  background: transparent;
  border: 0;
  color: #fff;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
#ctrl button:hover, #ctrl a:hover {
  background: rgba(255,255,255,0.16);
}
#ctrl .pos {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  padding: 0 10px;
}

/* Điện thoại / màn hình hẹp: thanh điều khiển gói gọn trong bề rộng màn hình */
@media (max-width: 900px) {
  #ctrl {
    left: 8px; right: 8px; bottom: 8px;
    transform: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 12px;
  }
  #ctrl select { flex: 1 1 100%; max-width: 100%; min-width: 0; }
  #ctrl button, #ctrl a { padding: 6px 10px; font-size: 13px; white-space: nowrap; }
  #ctrl .pos { white-space: nowrap; padding: 0 6px; }
  #ctrl [data-k="full"], #ctrl .print-btn { display: none; }
  #ctrl .back { order: 1; }
  .modal .panel { width: calc(100vw - 16px) !important; max-height: calc(100vh - 16px); overflow: auto; }
}
@media (max-width: 900px) and (orientation: landscape) {
  #ctrl select { flex: 1 1 200px; }
}

/* Thanh tiến trình trên cùng */
#progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 4px;
  background: var(--luc);
  z-index: 51;
  transition: width 0.3s;
}

/* Modal Popup Mục lục */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(16,33,43,0.6);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.on { display: flex; }
.panel {
  background: #fff;
  border-radius: 18px;
  width: min(1000px, 95%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 30px;
  box-shadow: 0 25px 70px rgba(0,0,0,0.3);
}
.panel h2 { font: 700 28px var(--serif); margin: 0 0 16px; color: var(--muc); }
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.overview-btn {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--giay);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.35;
  transition: all 0.2s;
}
.overview-btn:hover { border-color: var(--luc); background: #E8F4EE; }
.overview-btn.cur { border-color: var(--luc); background: #E8F4EE; font-weight: 700; }
.overview-btn small { display: block; color: var(--mute); font-size: 12px; margin-top: 4px; }

/* Logo thương hiệu Đinh Quốc Tuấn */
.dqt-logo {
  display: block;
  flex: none;
  aspect-ratio: 1 / 1;
}

/* Ô trắng bảo vệ logo sen trên nền tối/ảnh */
.dqt-logo-o {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border-radius: 20%;
  padding: 6%;
  box-shadow: 0 2px 10px rgba(16, 33, 43, 0.08);
  flex: none;
}
.dqt-logo-o > img {
  display: block;
  width: 100%;
  height: 100%;
}

/* In PDF: Quy chuẩn thương hiệu TUAN-THUONG-HIEU - ẨN TOÀN BỘ LOGO SEN, CHỈ GIỮ LOGO TRƯỜNG */
@media print {
  @page { size: 1600px 900px; margin: 0; }
  html, body { overflow: visible !important; height: auto !important; background: #fff !important; }
  #stage, #ctrl, #progress, .modal { display: none !important; }
  .dqt-sen, .dqt-logo, .dqt-logo-o { display: none !important; }
  #print-container { display: block !important; }
  #print-container .slide {
    position: relative;
    width: 1600px;
    height: 900px;
    box-shadow: none;
    border-radius: 0;
    break-after: page;
    page-break-after: always;
  }
}
