.laser-text {
  position: relative;
  color: #007acc;
  overflow: hidden;
  display: inline-block;
}

.laser-text::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(56, 189, 248, 0.4),
    transparent
  );
  animation: laser-glow 2s linear infinite;
}

@keyframes laser-glow {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}
.spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  animation: explode 700ms ease-out forwards;
  z-index: 9999;
}
@keyframes explode {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 1;
  }
  100% {
    transform: scale(0.2) translate(var(--dx), var(--dy));
    opacity: 0;
  }
}
/* Laser scan effect cho các môn */
.laser-text {
  position: relative;
  display: inline-block;
  color: #38bdf8;
  z-index: 1;
}

.laser-text::after {
  content: "";
  position: absolute;
  left: -100%;
  top: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(56,189,248,0.5), transparent);
  animation: laser-scan 2s infinite linear;
  z-index: 2;
  pointer-events: none;
}

@keyframes laser-scan {
  0% { left: -100%; }
  100% { left: 100%; }
}
.subject-card {
  background: #ffffff; color: #000000;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
  transition: transform 0.2s ease;
}

.subject-card:hover {
  transform: translateY(-3px);
}

.subject-title {
  font-weight: bold;
  font-size: 16px;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.subject-title .icon {
  margin-right: 8px;
}
#loading-screen {
  position: fixed;
  inset: 0;
  background: #ffffff; color: #000000;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  color: #38bdf8;
  font-size: 18px;
}

/* Ghi đè cấu trúc nền loading cũ */
#loading-screen {
    position: fixed;
    inset: 0;
    background: #383a3e; /* Chuyển sang nền tối cho đúng chất Sci-fi */
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.5s ease;
}

:root {
    --main-color: #38bdf8; 
    --accent-color: rgba(56, 189, 248, 0.2);
}

.corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-color);
}
.top-left { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.top-right { top: 20px; right: 20px; border-left: none; border-bottom: none; }
.bottom-left { bottom: 20px; left: 20px; border-right: none; border-top: none; }
.bottom-right { bottom: 20px; right: 20px; border-left: none; border-top: none; }

.loader-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.orbit {
    position: absolute;
    border: 1px dashed var(--accent-color);
    border-radius: 50%;
    animation: rotate var(--speed) linear infinite;
}
.orbit-1 { width: 250px; height: 250px; --speed: 10s; }
.orbit-2 { 
    width: 200px; height: 200px; --speed: 5s; 
    border: 2px solid transparent; 
    border-top: 2px solid var(--main-color); 
}

.main-bar {
    position: relative;
    background: rgba(56, 189, 248, 0.05);
    border-left: 4px solid var(--main-color);
    border-right: 4px solid var(--main-color);
    padding: 10px 40px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(5px);
}

.text {
    font-family: monospace;
    font-size: 1.5rem;
    letter-spacing: 8px;
    font-weight: 800;
    color: var(--main-color);
}

.blink-square {
    width: 12px;
    height: 12px;
    background: var(--main-color);
    margin-left: 15px;
    animation: blink 0.8s infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .corner { width: 20px; height: 20px; }
    .orbit-1 { width: 180px; height: 180px; }
    .orbit-2 { width: 150px; height: 150px; }
    .text { font-size: 1rem; letter-spacing: 4px; }
    .main-bar { padding: 8px 20px; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes typing {
  from { width: 0; }
  to { width: 280px; }
}

@keyframes blink {
  50% { border-color: transparent; }
}
.sidebar {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.sidebar-version {
  margin-top: auto;
  padding: 8px;
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid #334155;
}
#poster {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90vw;
  max-height: 90vh;
  z-index: 999;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.4);
  border-radius: 12px;
}
body.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}
.menu-title::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 119, 182, 0.4),transparent);
  animation: laser-scan 2s infinite Linear;
}
.sidebar-divider {
  margin: 12px 0;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  color: #0077b6;
  background: #e0f7fa;
  border-radius: 6px;
  border-left: 4px solid #0077b6;
}
.doc-button {
  display: block;
  background: #77ccf9;
  color: #fc0202 !important;
  font-weight: 600;
  text-align: center;
  padding: 10px 14px;
  margin: 10px 0;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.doc-button:hover {
  background: #53c6f8;
  transform: translateY(-2px);
}
.doc-button-tonghop {
  display: block;
  background: #77ccf9;
  color: #2b00ff !important;
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  margin: 10px 0;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}
.contact-button {
  display: block;
  background: #8dd3ff;  
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  margin-left: 10px;
  text-decoration: none;
  font-size: 20px;
  height: 40px;
  transition: background 0.3s ease, transform 0.2s ease;
}
/* Desktop (>=769px) */
@media (min-width: 769px) {
  .sidebar, .right-sidebar {
    position: fixed;
    top: 60px;
    bottom: 0;
    width: 220px;
    height: calc(100vh - 60px);
    background: #f1f1f1;
    border: 2px solid #393131;
    overflow-y: auto;
    z-index: 900;
    padding-top: 10px;
    padding: 10px 10px;
  }

  .sidebar { left: 0; }
  .right-sidebar { right: 0; }

  .main-content {
    margin-left: 220px;
    margin-right: 220px;
    padding: 30px 20px;
  }
}

/* Mobile (<=768px): content full width, sidebar overlay */
@media (max-width: 768px) {
  .container {
    display: block;   /* bỏ flex */
    margin-top: 60px;
  }

  .main-content {
    margin: 0 !important;
    width: 100% !important;
    padding: 20px;
    box-sizing: border-box;
  }

  .sidebar, .right-sidebar {
    position: fixed;
    top: 60px;
    bottom: 0;
    width: 220px;
    height: calc(100vh - 60px);
    background: #f1f1f1;
    overflow-y: auto;
    z-index: 2000;
    transition: transform 0.3s ease;
    padding-top: 20px;
    padding: 10px 10px;
    border: 2px solid #393131;  
    border-radius: 6px; 
  }

  .sidebar {
    left: 0;
    transform: translateX(-100%);
    padding-top: 20px;
  }
  .sidebar.show {
    transform: translateX(0);
  }

  .right-sidebar {
    right: 0;
    transform: translateX(100%);
  }
  .right-sidebar.show {
    transform: translateX(0);
  }
}
.doc-button-demophong {
  display: block;
  background: #77ccf9;
  color: #dd00ff !important;
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  margin: 10px 0;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

