/* Font + Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Inter', sans-serif;
  background-color: #fff;
  color: #111;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
  position: relative;
  z-index: 1;
}

/* Video nền */
#background-video {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 100%;
  min-height: 100%;
  z-index: -1;
  object-fit: cover;
}

/* Lớp phủ mờ lên video */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

/* Đảm bảo nội dung đè lên video */
body, .content, .sidebar, .hero, .section-box {
  position: relative;
  z-index: 1;
}

/* Dark mode override */
body.dark {
  background-color: #1e1e1e;
  color: #e0e0e0;
}
body.dark .hero {
  background: #2b2b2b;
}
body.dark .hero p {
  color: #ddd;
}
body.dark .hero span {
  color: #aaa;
}
body.dark .section-box {
  background: #2c2c2c;
}
body.dark .section-box.alt {
  background: #222;
}
body.dark .section-box h3,
body.dark .section-box ul li {
  color: #e0e0e0;
}
body.dark .sidebar {
  background-color: #111;
}
body.dark .sidebar nav a {
  color: #ccc;
}
body.dark .sidebar nav a:hover {
  color: #38bdf8;
}
body.dark .menu-toggle {
  color: #eee;
}
body.dark .btn {
  background-color: #444;
}
body.dark .btn:hover {
  background-color: #222;
}
body.dark footer {
  color: #aaa;
}

/* Sidebar trái */
.sidebar {
  position: fixed;
  top: 0;
  left: -240px;
  width: 240px;
  height: 100vh;
  background-color: #000;
  padding: 20px;
  transition: left 0.3s ease;
  z-index: 1000;
}
.sidebar.active {
  left: 0;
}
.sidebar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}
.sidebar .logo img {
  width: 40px;
  height: 40px;
}
.sidebar .logo h1 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eee;
  padding: 10px 0;
  font-size: 16px;
  transition: color 0.3s;
  text-decoration: none;
}
.sidebar nav a:hover {
  color: #38bdf8;
}

/* Nút menu 3 gạch */
.menu-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 26px;
  background: none;
  border: none;
  color: #000;
  cursor: pointer;
  z-index: 1100;
}

/* Nội dung chính */
.content {
  margin-left: 0;
  padding: 40px 24px;
  width: 100%;
  transition: margin-left 0.3s ease;
}
.sidebar.active ~ .content {
  margin-left: 240px;
}

/* Hero đầu trang */
.hero {
  text-align: center;
  padding: 60px 20px;
  background: #f8fafc;
  border-radius: 16px;
  margin-bottom: 40px;
}
.hero h2 {
  font-size: 28px;
  margin-bottom: 10px;
}
.hero span {
  color: #4b5563;
}
.hero p {
  font-size: 16px;
  color: #333;
}

/* Nút */
.btn {
  background-color: #555;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  margin-top: 20px;
  font-weight: 600;
  display: inline-block;
  transition: background 0.3s;
  text-decoration: none;
}
.btn:hover {
  background-color: #333;
}

/* Các box nội dung */
.section-box {
  margin-bottom: 60px;
  background: #f1f5f9;
  padding: 30px 24px;
  border-radius: 16px;
  line-height: 1.6;
}
.section-box.alt {
  background: #e2e8f0;
}
.section-box h3 {
  font-size: 22px;
  color: #333;
  margin-bottom: 15px;
}
.section-box ul {
  list-style: none;
  padding-left: 0;
}
.section-box ul li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 16px;
  color: #333;
}
/* CODE BLOCK */
pre {
  background: #272822;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
}

code {
  font-family: Consolas, monospace;
}
	
	
/* Footer */
footer {
  text-align: center;
  font-size: 14px;
  color: #888;
  margin-top: 40px;
}

/* Responsive mobile */
@media screen and (max-width: 768px) {
  .sidebar {
    width: 200px;
  }
  .sidebar .logo h1 {
    font-size: 18px;
  }
  .content {
    padding: 32px 16px;
  }
  .hero h2 {
    font-size: 24px;
  }
  .section-box h3 {
    font-size: 20px;
  }
  .btn {
    font-size: 15px;
    padding: 10px 20px;
  }
}
/* Mục mở rộng trong sidebar - nhóm API */
.sidebar details {
  padding-left: 4px;
}

.sidebar summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 16px;
  color: #eee;
  list-style: none;
  transition: color 0.3s;
}

.sidebar summary:hover {
  color: #38bdf8;
}

.sidebar details[open] > summary {
  color: #38bdf8;
}

/* Link con bên trong details */
.sidebar details a {
  display: block;
  padding: 6px 0 6px 32px;
  font-size: 15px;
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.sidebar details a:hover {
  color: #38bdf8;
}

/* Dark mode tương thích */
body.dark .sidebar summary {
  color: #ccc;
}
body.dark .sidebar summary:hover {
  color: #38bdf8;
}
body.dark .sidebar details a {
  color: #bbb;
}
body.dark .sidebar details a:hover {
  color: #38bdf8;
}
#chat-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  background-color: #007bff;
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
#chat-bubble svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.4;
}

/* Chat box */
#chat-box {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 320px;
  max-height: 460px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9998;
}

.chat-header {
  background: #007bff;
  color: white;
  padding: 12px 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-header span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-header i {
  cursor: pointer;
}

#chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  font-size: 14px;
  background-color: #f8f9fa;
  max-height: 280px;
}

.chat-input-area {
  display: flex;
  padding: 10px;
  background: #fff;
  border-top: 1px solid #ddd;
}
#chat-input {
  flex: 1;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.chat-input-area button {
  margin-left: 6px;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
}

.user-msg, .bot-msg {
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  line-height: 1.4;
  word-wrap: break-word;
}
.user-msg {
  background: #d1e7ff;
  text-align: right;
}
.bot-msg {
  background: #e9ecef;
  text-align: left;
}
.credit {
  color: #000; /* Màu đen */
}