/* __V3D_TEMPLATE__ - template-based file; delete this line to prevent this file from being updated */

body {
    margin: 0px;
    overflow: hidden;
}
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');
/* Terminal Box */
    .terminal-box {
      position: absolute;
      top: 20px;
      right: 20px;
      background-color: #2d2d2d;
      border: 2px solid #555;
      border-radius: 12px;
      width: 480px;
      max-width: 95%;
      box-shadow: 0 0 10px rgba(0,0,0,0.5);
      overflow: hidden;
      z-index: 999999;
	  display: none; /* Ẩn khi khởi động */
    }

    .title-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 12px;
      border-bottom: 1px solid #666;
      cursor: move;
      user-select: none;
    }

    .buttons {
      display: flex;
      gap: 8px;
    }

    .circle {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      color: #111;
      cursor: pointer;
    }

    .red    { background-color: #ff5f56; }
    .yellow { background-color: #ffbd2e; }
    .green  { background-color: #27c93f; }

    .filename {
      color: #ccc;
      font-size: 14px;
    }

    .content-area {
      transition: all 0.3s ease;
	   max-height: 60vh;     /* chiều cao tối đa */
  overflow-y: auto;     /* bật scroll dọc */
  padding-right: 6px;   /* tránh che chữ bởi scrollbar */
    }

    .content {
      padding: 20px;
      font-size: 16px;
      line-height: 1.6;
      word-wrap: break-word;
      color: white;
	  display: none; /* Ẩn khi khởi động */
    }
.content a {
    color: white;
    text-decoration: none;
    font-weight: 400;
}
.content strong {
  color: #4da3ff  !important;
}
.content p{
  text-align: justify;
  text-justify: inter-word;
}
    .hashtags {
      padding: 0 20px 20px;
      color: #aaa;
      font-size: 14px;
    }
	
/* Vùng text cuộn */
.text-scroll {
  max-height: 220px;          /* chỉnh theo panel của bạn */
  overflow-y: auto;
  padding-right: 6px;
  line-height: 1.6;
}

/* Scrollbar gọn */
.text-scroll::-webkit-scrollbar {
  width: 6px;
}
.text-scroll::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

/* Link video nổi, dễ nhìn trên nền tối */
.video-link {
  display: inline-block;
  margin-top: 10px;
  color: #ff4d4d;
  font-weight: 600;
  text-decoration: none;
}
/* ===== IMAGE BASE ===== */
/* ===== IMAGE RESPONSIVE TRONG CONTENT ===== */

.content img.responsive-img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-top: 12px;
  display: block;
}

/* nếu muốn giữ tỷ lệ giống video (16:9) */

.image-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  margin-top: 12px;
}

.image-frame img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain; /* hoặc cover nếu muốn full khung */
  left: 0;
  top: 0;
}
.video-link:hover {
  text-decoration: underline;
  color: #ff8080;
}
/* ===== RESEARCH BANNER PROFESSIONAL ===== */
.research-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;

  display: flex;
  align-items: stretch;
  gap: 18px;

  padding: 18px 22px;
  max-width: 520px;

  background: linear-gradient(
    135deg,
    rgba(18,18,18,0.85),
    rgba(28,28,28,0.75)
  );

  backdrop-filter: blur(12px);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.45);

  font-family: 'Montserrat', sans-serif;
  color: #ffffff;

  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: all 0.35s ease;
}

/* Hiển thị */
.research-banner.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Bên trái */
.rb-left {
  flex: 1;
}

.rb-label {
  font-size: 11px;
  letter-spacing: 1.6px;
  font-weight: 700;
  color: #f2c94c;
  margin-bottom: 6px;
  text-align: center;
}

.rb-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

/* Vạch phân cách */
.rb-divider {
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255,255,255,0.25),
    transparent
  );
}

/* Bên phải */
.rb-right {
  min-width: 180px;
}

.rb-author-label {
  font-size: 11px;
  letter-spacing: 1.4px;
  color: #bbbbbb;
  margin-bottom: 6px;
}

.rb-authors span {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}
/* NÚT ĐÓNG BANNER */
.rb-close {
  position: absolute;
  top: 10px;
  right: 12px;

  width: 28px;
  height: 28px;

  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);

  color: #ffffff;
  font-size: 18px;
  line-height: 1;

  cursor: pointer;
  transition: all 0.2s ease;
}

.rb-close:hover {
  background: rgba(255,255,255,0.25);
}

.rb-close:active {
  transform: scale(0.9);
}

/* Mobile */
@media (max-width: 768px) {
  .research-banner {
    flex-direction: column;
    max-width: 90%;
    left: 5%;
    gap: 12px;
  }

  .rb-divider {
    height: 1px;
    width: 100%;
  }
}

	/* ====== VIDEO ZONE ====== */
#videoZone {
    width: 100%;
    background: #111;
    margin-top: 10px;
    display: none;
}

/* VIDEO RESPONSIVE 16:9 */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}


/* ====== TERMINAL + VIDEO RESPONSIVE ====== */
@media (max-width: 768px) {

   #terminalBox {
    z-index: 200000 !important;  /* đảm bảo nằm trên menu */
    position: fixed !important;
    top: 60px !important;        /* đẩy xuống dưới menu */
}
    #videoZone {
        max-height: 240px !important; /* phù hợp mobile */
    }

    .video-wrapper {
        padding-bottom: 56.25%; /* vẫn giữ 16:9 */
    }
}

.v3d-container {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
}

.fullscreen-button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    background-size: 100% 100%;
    display: none;
    z-index: 1;
}

.fullscreen-open {
    background-image: url('media/fullscreen_open.svg');
}

.fullscreen-close {
    background-image: url('media/fullscreen_close.svg');
}

/* removes tap blinking on ios devices */
* { -webkit-tap-highlight-color:rgba(0,0,0,0); }
 @media (max-width: 768px) {
      .oled-container {
        width: 95%;
        left: 2.5%;
        top: 20px;
		z-index: 2;
      }

      .terminal-box {
        width: 90%;
        right: 5%;
        top: 10px;
        z-index: 999999 !important;   /* Giữ nguyên mức cao nhất */
        position: fixed !important;
  }
    }
