.circle-btn.tiny {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.circle-btn.tiny svg {
  width: 16px;
  height: 16px;
}

:root {
  --primary: #14b8a6;
  --primary-soft: rgba(20, 184, 166, 0.16);
  --bg: #020617;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* để full-screen không bị dôi chiều cao */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER (hiện anh đang comment HTML nên phần này không ảnh hưởng) */

.app-header {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at top left, var(--primary-soft), #020617);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--primary);
  color: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), 0 10px 25px rgba(15, 23, 42, 0.8);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 15px;
  font-weight: 600;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--muted);
}

/* MAIN + VIEWER */

.app-main {
  flex: 1;
  min-height: 0;
}

/* ✅ SỬA Ở ĐÂY: dùng 100vh + padding = 0 để không bị dải đen */
.viewer-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #000;
}

.viewer-wrapper iframe {
  width: 100%;
  height: 100%;
  border-radius: 0;              /* nếu thích bo góc thì đổi lại 14px */
  border: none;
  background: #000;
  display: block;
}

/* ===== MASK CHE UI GỐC ===== */

/* Cột bên phải – che hết icon xanh */
.viewer-mask-right {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 60px; /* đủ rộng để che cả cột icon */
  background: rgba(15, 23, 42, 0.96);
  border-left: 1px solid rgba(148, 163, 184, 0.5);
  z-index: 9000;
}

/* Góc trên trái – che nút (i) info */
.viewer-mask-top-left {
  position: absolute;
  left: 0;
  top: 0;
  width: 90px;
  height: 90px;
  background: rgba(15, 23, 42, 0.96);
  border-bottom-right-radius: 24px;
  border-right: 1px solid rgba(148, 163, 184, 0.4);
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
  z-index: 9000;
}

/* ✅ Custom Info (logo + brand) */
.viewer-brand-info {
  position: absolute;
  top: 16px;
  right: 16px;   /* 👈 chuyển sang góc phải */
  left: auto;    /* 👈 bỏ cố định bên trái */

  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 8px;
  border-radius: 999px;

  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.6);
  backdrop-filter: blur(14px);
  z-index: 9500;
  cursor: pointer;
  transition:
    padding 0.2s ease,
    gap 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}


/* Logo circle (chứa img V5SI) */
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  overflow: hidden; /* bo tròn hình */
  background: var(--primary, #14b8a6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.9),
    0 10px 25px rgba(15, 23, 42, 0.8);
}

/* Hình bên trong logo */
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* hoặc 'contain' nếu logo có khoảng trống */
  display: block;
}

/* Mặc định: thu gọn text, chỉ còn logo */
.brand-text {
  overflow: hidden;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  margin-left: 0;
  transition:
    max-width 0.25s ease,
    opacity 0.2s ease,
    margin-left 0.2s ease;
}

.brand-title {
  font-size: 14px;
  font-weight: 600;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--muted, #9ca3af);
}

/* Khi hover: mở rộng pill + hiện text */
.viewer-brand-info:hover {
  padding: 8px 14px;
  gap: 8px;
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(248, 250, 252, 0.9);
}

.viewer-brand-info:hover .brand-text {
  max-width: 220px; /* tuỳ anh chỉnh dài hơn/ngắn hơn */
  opacity: 1;
  margin-left: 6px;
}

/* ===== NÚT TRÒN TRONG SUỐT (ICON MỚI) ===== */

.circle-btn {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.1s ease;
}

.circle-btn svg {
  width: 24px;
  height: 24px;
  display: block;
  stroke: currentColor;
  color: inherit;
}

.circle-btn.small svg {
  width: 20px;
  height: 20px;
}

.circle-btn.small {
  width: 46px;
  height: 46px;
  font-size: 16px;
}

.circle-btn:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: #ffffff;
  transform: translateY(-1px);
}

/* Play/Pause icon handled by SVG, not ::before */

/* TOUR BAR – GIỮA ĐÁY, CHE TOUR GỐC */

.tour-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  padding: 10px 18px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;

  /* background: rgba(15, 23, 42, 0.85); */
  /* border: 0.5px solid rgba(148, 163, 184, 0.7); */
  /* backdrop-filter: blur(14px); */
  z-index: 9500;
}

.tour-label {
  font-size: 13px;
  color: #ffffff;
  margin-right: 4px;
  justify-content: center;
  align-self: center;
}

.tour-step,
.tour-speed {
  font-size: 13px;
  padding: 4px 12px;
}

.tour-speed {
  cursor: pointer;
  border: none;
  background: transparent;
  color: #ffffff;
  transition: opacity 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
}

.tour-speed:hover {
  opacity: 0.7;
}

.tour-speed option {
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
}

/* PANEL BÊN PHẢI – ICON MỚI ĐẶT LÊN MASK */

.right-toolbar-panel {
  position: absolute;
  right: 10px;
  bottom: 10px;
  /* nền & border đã nằm ở viewer-mask-right, ở đây để trong suốt */
  background: transparent;
  border: none;
  z-index: 9501; /* cao hơn mask để thấy nút mới */
}

.right-toolbar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* override size mặc định cho panel bên phải */
.circle-btn {
  border: 0.5px solid rgba(255, 255, 255, 0.9);
  width: 30px;
  height: 30px;
  font-size: 13px;
}

.button-group {
  display: flex;
  gap: 8px;
  padding-top: 5px;
  padding-bottom: 5px;
  align-items: center;
  background: transparent;
  border-radius: 20px;
  backdrop-filter: blur(3px);
}

.button-control {
  width: 30px;
  height: 30px;
  font-size: 13px;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.1s ease;
}

/* ===== AREA NAV BUTTONS (Prev / Next Area) ===== */

/* Trạng thái mặc định: nút dính mép, chỉ lộ phần đầu tròn với icon */
.area-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;

  height: 40px;
  width: 40px;            /* khi thu gọn: gần như chỉ là "đầu tròn" */
  padding: 0 10px;
  overflow: hidden;

  /* màu đồng bộ icon: nền tối trong suốt + viền trắng */
  background: rgba(0, 0, 0, 0.3);
  border: 0.5px solid rgba(255, 255, 255, 0.9);
  color: #ffffff;

  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;

  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.3),
    0 8px 18px rgba(15, 23, 42, 0.7);

  transition:
    width 0.22s ease,
    padding 0.22s ease,
    gap 0.22s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease;
}

/* Bên trái: dính vào mép trái, bo tròn bên phải */
.area-nav--left {
  left: -5px;
  flex-direction: row;                /* text bên trái, icon bên phải */
  border-radius: 0 999px 999px 0;     /* phẳng bên trái, tròn bên phải */
}

/* Bên phải: dính vào mép phải, bo tròn bên trái */
.area-nav--right {
  right: -5px;
  flex-direction: row-reverse;        /* icon sát mép phải */
  border-radius: 999px 0 0 999px;     /* tròn bên trái, phẳng bên phải */
}

/* Icon luôn hiển thị */
.area-nav__icon svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* Label: mặc định ẩn hoàn toàn (chỉ còn phần bo tròn có icon) */
.area-nav__label {
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  transition:
    max-width 0.22s ease,
    opacity 0.16s ease,
    margin 0.2s ease;
}

/* Khi hover: kéo pill vào trong, hiện chữ, vẫn dính mép */
.area-nav:hover {
  width: 150px;                        /* độ dài pill khi hover */
  padding: 0 16px;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.6),
    0 12px 24px rgba(15, 23, 42, 0.9);
}

.area-nav:hover .area-nav__label {
  max-width: 110px;                    /* đủ cho "Prev Area"/"Next Area" */
  opacity: 1;
  margin: 0 4px;
}

.area-nav:active {
  transform: translateY(-50%) scale(0.96);
}

/* ===== STATE CHO ICON TOOLBAR BÊN PHẢI ===== */

/* MẶC ĐỊNH: ĐẬM (ON) */
.right-toolbar .circle-btn.tiny {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.6);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.8),
    0 8px 20px rgba(15, 23, 42, 0.9);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease;
}

.right-toolbar .circle-btn.tiny svg {
  stroke: currentColor;
}

/* OFF: NHẠT (khi có class .is-inactive) */
.right-toolbar .circle-btn.tiny.is-inactive {
  color: rgba(255, 255, 255, 0.45);
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.18);
  box-shadow: none;
}

/* Hover: cả ON/OFF đều sáng hơn một tí */
.right-toolbar .circle-btn.tiny:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: #ffffff;
  transform: translateY(-1px);
}


