@font-face {
    /*Font dành cho tiêu đề*/
    font-family: 'Roboto';
    src: url('../assets/font/HCKS-FHCordelia.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    /*Font dành cho title, subtitle, text*/
    font-family: 'Arial';
    src: url('../assets/font/1FTV-Clearface-Gothic-1.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
:root {
    --primary-color: #35424a;
    --element-color: #ffc800;
    --background-color: #000000;
    --text-color: #ffffff;
}   
body {
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #000000;
    /* ✅ Bỏ margin-left khỏi body */
}

header {
    position: relative;
    height: 320px;
    display: flex;
    flex-direction: column; /* Thêm dòng này để xếp dọc */
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-left: 250px;
}

.header-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('../assets/img/congnghiep.jpg') center/cover no-repeat;
    z-index: -1;
}

.header-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 0;
}

.header-content {
    position: relative;
    z-index: 3;
    color: #ffffff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    font-family: 'roboto';
    font-size: 2.5rem;
    margin-bottom: 24px; /* Tăng khoảng cách với menu */
    color: #ffffff;
    z-index: 3;
    text-align: center;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
    z-index: 4;
}

header nav ul li {
    font-family: 'Arial';
    display: inline-block; /* Đảm bảo menu nằm ngang */
    color: #ffffff;
    z-index: 4;
    text-align: center;
}

header nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background 0.2s;
    z-index: 4;
}

header nav a:hover {
    background: rgba(255,255,255,0.18);
}

h1 {
    font-family: 'roboto';
    margin: 0;
    font-size: 3rem;
}

section {
    padding: 20px;
    margin: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

h2 {
    font-family: 'roboto';
    color: var(--element-color);
}

h3 {
    font-family: 'roboto';
    color: var(--element-color);
}

p {
    font-family: 'Arial';
    margin: 10px 0;
    color: #ffffff;
    font-weight: 150;
}

/* Timeline styles */
.timeline {
    position: relative;
    margin: 40px auto;
    padding: 20px 0;
    width: 90%;
    max-width: 600px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ffffff4b;
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    position: relative;
}

.timeline-dot {
    width: 18px;
    height: 18px;
    background: var(--element-color);
    border: 4px solid #000000;
    border-radius: 50%;
    position: relative;
    left: 20px;
    z-index: 1;
    margin-right: 30px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);
}

.timeline-content {
    background: rgba(0, 0, 0, 0.08);
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    color: var(--element-color);
    flex: 1;
}

.timeline-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.5em;
}

.timeline-content p {
    margin: 0;
    color: #fff;
    font-size: 1em;
}
.milestones {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.milestones, .roles, .models {
    list-style-type: none;
    padding: 0;
}

.milestones li, .roles li, .models li {
    background: #e2e2e2;
    margin: 5px 0;
    padding: 10px;
    border-radius: 3px;
}
footer {
    text-align: center;
    padding: 10px 0;
    background: #35424a;
    color: #ffffff;
    position: relative;
    bottom: 0;
    width: 100%;
    margin-left: 250px;
}
#roles {
    position: relative;
    overflow: hidden;
}

.roles-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/img/VAITRO.jpg') center/cover no-repeat;
    z-index: -999;
}
.roles-bg-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: -998;
}
#typing-title {
    font-family: 'roboto';
    font-size: 1.5rem;
    color: #ffffff;
    text-align: center;

    max-width: 1000px;          /* kiểm soát độ rộng */
    margin: 0 auto;

    white-space: normal;       /* ✅ cho phép xuống dòng */
    word-break: break-word;    /* tránh tràn chữ dài */
    line-height: 1.4;

    position: relative;
}

/* Con trỏ gõ chữ */
#typing-title::after {
    content: '|';
    margin-left: 6px;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { border-color: transparent; }
}

#typing-title.typing {
    animation: blink 0.5s step-end infinite;
}
.glass-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin: 40px 0;
}

.glass-box {
    width: 400px;
    height: 300px;

    /* Nền kính */
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.28),
        rgba(255,255,255,0.08)
    );

    border-radius: 20px;

    /* Độ mờ thật hơn */
    backdrop-filter: blur(7px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);

    /* Viền kính có chiều sâu */
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.35),  /* sáng trên */
        inset 0 -1px 1px rgba(255,255,255,0.12), /* tối dưới */
        0 20px 40px rgba(0,0,0,0.35);             /* đổ bóng */

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: #fff;
    position: relative;
    overflow: hidden;
}


.box-title {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.box-content {
    font-size: 1rem;
    text-align: center;
    color: #fff;
}

.arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
}
.models-gallery {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 32px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.model-item {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 16px;
    width: 360px;           /* Tăng kích thước khung chứa ảnh */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.model-item img {
    width: 100%;
    height: auto;           /* Để ảnh giữ đúng tỷ lệ, không bị crop */
    max-width: 600px;       /* Tăng kích thước tối đa */
    max-height: 600px;      /* Tăng chiều cao tối đa */
    object-fit: contain;    /* Không crop, giữ nguyên toàn bộ ảnh */
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.model-caption {
    color: #fff;
    font-size: 1rem;
    text-align: center;
    margin-top: 4px;
}
.img-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.img-lightbox.active {
    display: flex;
}
.img-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.5);
    background: #fff;
    object-fit: contain;
}
.zoomable {
    cursor: zoom-in;
    transition: box-shadow 0.2s;
}
.zoomable:hover {
    box-shadow: 0 0 0 4px var(--element-color, #ffc800);
}
#chatbox-toggle {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 1000;
    cursor: pointer;
    background: rgba(255,255,255,0.85);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    padding: 8px;
    transition: background 0.2s;
    width: 64px;      /* Thêm dòng này */
    height: 64px;     /* Thêm dòng này */
    display: flex;    /* Thêm dòng này */
    align-items: center; /* Thêm dòng này */
    justify-content: center; /* Thêm dòng này */
    overflow: hidden; /* Thêm dòng này */
}
#chatbox-toggle img {
    width: 40px;      /* Đặt icon nhỏ hơn vùng tròn */
    height: 40px;
    object-fit: contain;
    display: block;
}
#chatbox-toggle:hover {
    background: var(--element-color, #ffc800);
}
#chatbox-popup {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 32px;
    width: 340px;
    max-width: 95vw;
    background: #000000;
    color: #fff;
    border-radius: 12px;
    z-index: 1001;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInUp 0.3s;
    border: none;
    padding: 0;
}
@keyframes fadeInUp {
    from { transform: translateY(40px); opacity: 0;}
    to { transform: translateY(0); opacity: 1;}
}
.chatbox-header {
    background: #ffc800;
    color: #000000;
    padding: 12px 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#chatbox-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #000000;
    cursor: pointer;
}
.chatbox-messages {
    height: 400px;
    overflow-y: auto;
    padding: 12px;
    background: #000000;
    font-size: 1rem;
    scrollbar-width: none;      /* Firefox */
    -ms-overflow-style: none; 
    border: none;

}
.chatbox-messages::-webkit-scrollbar {
    display: none;              /* Chrome, Safari */
}
#chatbox-form {
    display: flex;
    background: #000000;
}
#chatbox-input {
    flex: 1;
    padding: 10px;
    border: none;
    outline: none;
    background: #333;
    color: #fff;
    font-size: 1rem;
    border-radius: 20px 0 0 20px; /* Bo tròn bên trái */

}
#chatbox-form button {
    background: #ffc800;
    color: #222;
    border: none;
    padding: 0 18px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 0 0 12px 0;
    transition: background 0.2s;
    border-radius: 0 20px 20px 0; /* Bo tròn bên phải */

}
#chatbox-form button:hover {
    background: #ffea80;
}
.chatbox-message-row {
    display: flex;
    margin-bottom: 10px;
    align-items: flex-end;
}

.chatbox-message-user {
    justify-content: flex-start;
    font-family: 'Arial';
    font-size: 1.5rem;
}

.chatbox-message-ai {
    justify-content: flex-end;
    font-family: 'Arial';
    font-size: 1.5rem;
}

.chatbox-bubble {
    max-width: 70%;
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 1rem;
    line-height: 1.5;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.chatbox-bubble-user {
    background: #fff;
    color: #222;
    border-bottom-left-radius: 4px;
    margin-right: auto;
}

.chatbox-bubble-ai {
    background: #ffc800;
    color: #222;
    border-bottom-right-radius: 4px;
    margin-left: auto;
}
.chatbox-loading {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 10px;
    height: 32px;
}
.chatbox-loading .dot {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background: #000000;
    border-radius: 50%;
    display: inline-block;
    animation: chatbox-bounce 1.2s infinite both;
}
.chatbox-loading .dot:nth-child(2) { animation-delay: 0.2s; }
.chatbox-loading .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatbox-bounce {
    0%, 80%, 100% { transform: scale(0.8);}
    40% { transform: scale(1.2);}
}

#quiz-section{
  max-width: 900px;
  margin: 24px auto;
  padding: 28px 22px;
  border-radius: 16px;

  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 40px rgba(0,0,0,0.30);
}

#quiz-section h2{
  margin: 0 0 14px 0;
  text-align: center;
  font-family: 'roboto', Arial, sans-serif;
  font-size: 1.8rem;
  color: var(--element-color, #ffc800);
  letter-spacing: 0.5px;
}

/* Start button */
#start-quiz-btn{
  display: block;

  padding: 12px 22px;
  border-radius: 14px;
  border: none;
  cursor: pointer;

  background: var(--element-color, #ffc800);
  color: #111;

  font-family: 'Arial', sans-serif;
  font-weight: 900;
  font-size: 1rem;

  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;


  margin: 20px auto !important;   /* 👈 căn giữa ngang */
}

#start-quiz-btn:hover{
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(0,0,0,0.40);
}

#start-quiz-btn:active{
  transform: translateY(0);
}

/* Container that JS renders into */
#quiz-container{
  margin-top: 18px;
}

/* Question card */
.quiz-question{
  padding: 16px;
  border-radius: 14px;

  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 22px rgba(0,0,0,0.28);
}

/* Question text */
.quiz-q{
  margin: 0 0 14px 0;
  font-family: 'roboto', Arial, sans-serif;
  font-size: 1.18rem;
  color: #fff;
  line-height: 1.35;
}

/* Options layout */
.quiz-options{
  display: grid;
  gap: 10px;
}

/* Each option becomes a clickable row */
.quiz-options label{
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px 12px;
  border-radius: 12px;

  cursor: pointer;
  user-select: none;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);

  color: rgba(255,255,255,0.92);
  font-family: 'Arial', sans-serif;
  line-height: 1.35;

  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.quiz-options label:hover{
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

/* Modern radio */
.quiz-options input[type="radio"]{
  appearance: none;
  -webkit-appearance: none;

  width: 18px;
  height: 18px;
  border-radius: 999px;

  border: 2px solid rgba(255,255,255,0.45);
  background: transparent;

  position: relative;
  flex: 0 0 18px;
  margin: 0;

  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.25);
}

.quiz-options input[type="radio"]::after{
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: var(--element-color, #ffc800);
  transform: scale(0);
  transition: transform .14s ease;
}

.quiz-options input[type="radio"]:checked{
  border-color: rgba(255,200,0,0.85);
}

.quiz-options input[type="radio"]:checked::after{
  transform: scale(1);
}

/* Highlight the selected option (works on modern browsers) */
.quiz-options label:has(input[type="radio"]:checked){
  background: rgba(255,200,0,0.12);
  border-color: rgba(255,200,0,0.35);
}

/* Answer / Next button rendered by JS */
#next-btn{
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;

  border-radius: 14px;
  border: none;
  cursor: pointer;

  background: var(--element-color, #ffc800);
  color: #111;

  font-family: 'Arial', sans-serif;
  font-weight: 900;
  font-size: 1rem;

  box-shadow: 0 12px 26px rgba(0,0,0,0.35);
  transition: transform .15s ease, filter .15s ease;
}

#next-btn:hover{
  filter: brightness(1.03);
  transform: translateY(-1px);
}

#next-btn:active{
  transform: translateY(0);
}

#next-btn:disabled{
  background: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.55);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Result box */
#quiz-result{
  max-width: 820px;
  margin: 18px auto 0 auto;
  padding: 18px;
  border-radius: 16px;

  background: rgba(255,200,0,0.10);
  border: 1px solid rgba(255,200,0,0.25);

  color: #fff;
  font-family: 'roboto', Arial, sans-serif;
  font-size: 1.25rem;
  text-align: center;
  line-height: 1.4;
}

/* Sidebar */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background-color: #2a2a2a;
    padding: 80px 20px 20px 20px;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.5);
}

#sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#sidebar ul li {
    margin-bottom: 20px;
}

#sidebar ul li a {
    color: #FFD700;
    text-decoration: none;
    font-family: 'Arial', sans-serif;
    font-size: 1rem;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#sidebar ul li a:hover {
    background-color: rgba(255, 215, 0, 0.2);
}

#sidebar ul li a.active {
    background-color: rgba(255, 215, 0, 0.3);
    border-left: 4px solid #FFD700;
}

/* Điều chỉnh body để tránh bị sidebar che */
body {
    margin: 0;
}

/* ✅ Chỉ set margin-left cho header, main, footer */
header {
    margin-left: 250px;
}

main {
    margin-left: 250px;
}

footer {
    margin-left: 250px;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Mobile */
@media (max-width: 720px){
  #quiz-section{
    margin: 16px 12px;
    padding: 18px 14px;
    border-radius: 14px;
  }
  #quiz-section h2{
    font-size: 1.55rem;
  }
  .quiz-q{
    font-size: 1.05rem;
  }
  .quiz-options label{
    padding: 10px 10px;
  }
}