/* css/style.css */
:root {
  --bg-color: #121212;
  --surface-color: #1e1e1e;
  --primary-text: #e0e0e0;
  --secondary-text: #a0a0a0;
  --brand-color-main: #00a9ff; /* Default brand color, will be overridden by JS */
  --accent-color: var(--brand-color-main);
  --accent-hover: var(--brand-color-hover); /* This will be set by JS */
  --error-color: #ff5252;
  --border-color: #333333;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  color: var(--primary-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


canvas{
  overflow:hidden;
}
html,
body {
  height: 100%;
  overflow: auto;
}

body.viewer-active {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* ================================================== */
/* === AUTH & SHARED COMPONENT STYLES ============= */
/* ================================================== */

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 20px;
}
.auth-card {
  background-color: var(--surface-color);
  padding: 40px;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display:flex;
  flex-direction: column;
  align-items: center;
}
.logo-title {
 width:100px;
 height: 50px;
 background-image: url("https://www.vuro.co.uk/assets/SVG/SVG/vuro-logo-colour.svg");
 background-position: center;
 background-repeat: no-repeat;
 background-size: contain;
}
.auth-form{
  width:100%;
}
.auth-form h2 {
  text-align: center;
  margin-bottom: 25px;
  font-weight: 500;
}
.input-group {
  margin-bottom: 20px;
}
.input-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--secondary-text);
  margin-bottom: 8px;
}
.input-group input,
.inspector-input,
select.inspector-input,
textarea.inspector-input,
input[type="color"].inspector-input {
  width: 100%;
  padding: 10px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--primary-text);
  font-size: 1rem;
  font-family: "Inter", sans-serif;
}
input[type="color"].inspector-input {
  padding: 5px; /* Adjust padding for color input */
  height: 40px; /* Consistent height */
}
.input-group input:focus,
.inspector-input:focus {
  outline: none;
  border-color: var(--accent-color);
}
.btn {
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s, transform 0.1s;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background-color: var(--accent-color);
  color: #ffffff;
  width: auto;
  text-decoration: none;
}
.btn-primary:hover {
  background-color: var(--accent-hover);
}
.btn-primary:disabled {
  background-color: #555;
  cursor: not-allowed;
}
.btn-secondary {
  background-color: var(--surface-color);
  color: var(--primary-text);
  border: 1px solid var(--border-color);
  text-decoration: none;
  display:flex;
  justify-content: center;
  align-items: center;
}
.btn-secondary:hover {
  background-color: #333;
}
.form-toggle-text {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
}
.form-toggle-text a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}
.error-message {
  color: var(--error-color);
  font-size: 0.9rem;
  text-align: center;
  min-height: 20px;
  margin-bottom: 10px;
}
.export-button{
  background-color:rgb(144, 71, 240);
  color:white;
}

/* ================================================== */
/* === DASHBOARD STYLES =========================== */
/* ================================================== */

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.dashboard-header .logo-title {
  margin-bottom: 0;
}
.user-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}
#user-email {
  color: var(--secondary-text);
}
.dashboard-main {
  max-width: 1200px;
  height:auto;
  margin: 40px auto;
  padding: 0 40px;
  overflow-y: auto;
}
.dashboard-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.tours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}
.tour-card {
  position: relative;
  background-color: var(--surface-color);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.tour-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}
.delete-tour-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 20px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 2;
}
.tour-card:hover .delete-tour-btn {
  opacity: 1;
}
.delete-tour-btn:hover {
  background-color: var(--error-color);
  transform: scale(1.1);
}
.tour-card-thumbnail {
  height: 160px;
  background-color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--secondary-text);
  font-style: italic;
  background-size: cover;
  background-position: center;
}
.tour-card-info {
  padding: 20px;
}
.tour-card-info h3 {
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tour-card-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--secondary-text);
}
.status-badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
}
.status-badge.published {
  background-color: rgba(0, 169, 255, 0.1);
  color: var(--accent-color);
}
.status-badge.draft {
  background-color: rgba(160, 160, 160, 0.1);
  color: var(--secondary-text);
}
.empty-state-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px;
  color: var(--secondary-text);
  background-color: var(--surface-color);
  border: 2px dashed var(--border-color);
  border-radius: 12px;
}
.tour-card.locked {
  filter: grayscale(80%);
  opacity: 0.6;
}
.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    backdrop-filter: blur(2px);
}
.lock-overlay .lock-icon {
    margin-right: 8px;
    font-size: 1.1rem;
}
.limit-banner {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background-color: var(--surface-color);
    padding: 20px 25px;
    border-radius: 12px;
    border: 1px solid var(--accent-color);
    margin-top: 20px;
}
.limit-banner p {
    color: var(--primary-text);
    font-weight: 500;
}

/* ================================================== */
/* === EDITOR STYLES ============================== */
/* ================================================== */

.editor-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  height: 60px;
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.back-link {
  color: var(--secondary-text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.back-link:hover {
  color: var(--primary-text);
}
#tour-name-header {
  font-size: 1.2rem;
  font-weight: 500;
}
.status-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #444;
  transition: 0.4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
}
input:checked + .slider {
  background-color: var(--accent-color);
}
input:checked + .slider:before {
  transform: translateX(18px);
}
.slider.round {
  border-radius: 34px;
}
.slider.round:before {
  border-radius: 50%;
}
.editor-workspace {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
}
.editor-panel {
  width: 280px;
  background-color: var(--surface-color);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.panel-left {
  border-right: 1px solid var(--border-color);
}
.panel-right {
  border-left: 1px solid var(--border-color);
}
.panel-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  cursor: pointer;
}
.panel-header:hover {
  background-color: #2a2a2a;
}
.panel-header h3 {
  font-weight: 500;
  font-size: 1.1rem;
}
.panel-footer {
  padding: 15px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}
.full-width {
  width: 100%;
}
.scene-list {
  padding: 10px;
  flex-grow: 1;
  overflow-y: auto;
}
.scene-item {
  padding: 12px 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.scene-item:hover {
  background-color: #2a2a2a;
}
.scene-item.active {
  background-color: var(--accent-color);
  color: white;
}
.list-empty-message {
  padding: 20px;
  text-align: center;
  color: var(--secondary-text);
  font-size: 0.9rem;
}
.viewer-container {
  flex-grow: 1;
  background-color: #000;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.viewer-placeholder {
  color: var(--secondary-text);
  text-align: center;
}
.inspector-content {
  padding: 20px;
  flex-grow: 1;
  overflow-y: auto;
}
.inspector-placeholder {
  color: var(--secondary-text);
  font-size: 0.9rem;
}
.inspector-group {
  margin-bottom: 25px;
}
.inspector-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--secondary-text);
  margin-bottom: 8px;
  font-weight: 500;
}
.inspector-subtext {
  font-size: 0.9rem;
  color: var(--secondary-text);
  font-style: italic;
  margin-top: 8px;
}
.panorama-preview {
  width: 100%;
  height: 120px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  margin-bottom: 10px;
}
textarea.inspector-input {
  min-height: 100px;
  resize: vertical;
}
.inspector-group button.delete-btn {
  background-color: var(--error-color);
  color: white;
border-radius:100px;
font-size:12px;
}
.inspector-group button.delete-btn:hover {
  background-color: #d32f2f;
}
.keyframe-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-color); /* Corrected from --background-color-light */
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 5px;
  font-size: 0.85rem;
}
.btn-icon {
  background: none;
  border: none;
  color: #999;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 5px;
}
.btn-icon:hover {
  color: #fff;
}
.editor-hotspot {
  position: absolute;
  width: 40px;
  height: 40px;
  z-index: 1;
  cursor: pointer;
}
.editor-hotspot-ring {
  width: 100%;
  height: 100%;
  border: 2px solid white;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
  animation: editor-pulse 2s infinite;
  display: flex;
  justify-content: center;
  align-items: center;
}
.editor-hotspot.content .editor-hotspot-ring {
  border-color: #ffcc04;
  animation-name: editor-pulse-info;
}
.editor-hotspot.active .editor-hotspot-ring {
  transform: scale(1.2);
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  animation: none;
}
.editor-hotspot.content.active .editor-hotspot-ring {
  background-color: #ffcc04;
  border-color: #ffcc04;
}

@keyframes editor-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
@keyframes editor-pulse-info {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 204, 4, 0.5); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(255, 204, 4, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 204, 4, 0); }
}
.panel-header.tour-header {
    cursor: pointer;
    transition: background-color 0.2s;
}
.panel-header.tour-header.active {
    background-color: var(--accent-color);
    color: white;
}
.panel-header.tour-header.active:hover {
    background-color: var(--accent-hover);
}
.panel-header.tour-header:hover {
    background-color: #2a2a2a;
}

/* ================================================== */
/* === MODAL STYLES (SHARED) ====================== */
/* ================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-overlay .modal-content {
  position: relative;
  background-color: var(--surface-color);
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal-overlay .modal-title {
  text-align: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.modal-overlay .modal-body {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.modal-overlay .modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}
.modal-overlay .modal-close-btn:hover {
  color: white;
}
.modal-options {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}
.modal-option-btn {
  flex: 1;
  padding: 20px;
  background-color: #2a2a2a;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}
.modal-option-btn:hover {
  background-color: #333;
  border-color: var(--accent-color);
  transform: translateY(-5px);
}
.modal-icon {
  font-size: 2rem;
  color: var(--accent-color);
  display: block;
  margin-bottom: 10px;
  font-style: italic;
  font-weight: bold;
}
.modal-option-btn h4 {
  color: var(--primary-text);
  margin-bottom: 5px;
}
.modal-option-btn p {
  color: var(--secondary-text);
  font-size: 0.9rem;
  line-height: 1.4;
}
.modal-video-player,
.modal-image-viewer {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: cover;
  background-color: #000;
  border-radius: 6px;
  aspect-ratio: 16 / 9;
}
.modal-text-image-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  height: 100%;
  align-items: center;
}
.modal-text-image-layout .modal-image-viewer {
  width: 100%;
  aspect-ratio: auto;
}
.modal-text-image-layout .modal-description {
  width: 100%;
  line-height: 1.6;
  height:250px;
  overflow-y: scroll;
  padding:40px;
}
#compression-overlay .export-status {
    color: white;
    text-align: center;
}
@media (min-width: 768px) {
  #video-modal .modal-content,
  #image-modal .modal-content {
    width: 60%;
  }
  .modal-text-image-layout {
    flex-direction: row;
    align-items: flex-start;
  }
  .modal-text-image-layout .modal-image-viewer,
  .modal-text-image-layout .modal-description {
    width: 50%;
    flex: 1;
  }
}

/* ================================================== */
/* === PROFILE & UPGRADE PAGES ==================== */
/* ================================================== */

.page-container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 40px;
}
.page-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
}
.profile-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px 40px;
  max-width: 800px;
  margin: 0 auto;
}
.profile-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.1rem;
}
.profile-info-item:last-child {
  border-bottom: none;
}
.profile-info-item .label {
  color: var(--secondary-text);
}
.profile-info-item .value {
  font-weight: 500;
}
.tier-badge {
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: capitalize;
  color: #fff;
}
.tier-badge.tier-free { background-color: #555; }
.tier-badge.tier-pro { background-color: #3f51b5; }
.tier-badge.tier-business { background-color: #8e24aa; }

.profile-actions {
  margin-top: 30px;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}
.upgrade-page-header {
  text-align: center;
  margin-bottom: 50px;
}
.upgrade-page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.upgrade-page-header p {
  font-size: 1.1rem;
  color: var(--secondary-text);
  max-width: 600px;
  margin: 0 auto;
}
.pricing-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  text-align: left;
}
.pricing-card {
  background-color: var(--surface-color);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}
.pricing-card.current {
  border-color: var(--accent-color);
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0, 169, 255, 0.2);
}
.pricing-card h3 {
  font-size: 1.5rem;
}
.pricing-card .price {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 15px 0;
}
.pricing-card .price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--secondary-text);
}
.pricing-card ul {
  list-style: none;
  margin: 20px 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  flex-grow: 1;
}
.pricing-card li {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pricing-card li svg {
  color: var(--accent-color);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.pricing-card .btn {
  width: 100%;
  margin-top: auto;
  text-decoration: none;
}
.manage-link-container {
  margin-top: 50px;
  text-align: center;
  color: var(--secondary-text);
}
.manage-link-container a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}


/* ================================================== */
/* === VIEWER STYLES (PUBLIC FACING) ================ */
/* ================================================== */

/* In style.css, around line 700 */

.viewer-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  overflow: hidden; /* ADD THIS LINE */
}
.viewer-screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* --- Intro/Splash Screen --- */
#intro-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
#intro-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}
/* In style.css, replace the old .intro-video-embed rule with this one */

.intro-video-embed {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  
  /* --- The Cover-Effect Trick --- */
  /* Assumes a 16:9 aspect ratio. 100 / (16/9) = 56.25 */
  width: 177.77vh; /* 100 * (16/9) */
  height: 56.25vw; /* 100 * (9/16) */
  min-width: 100%;
  min-height: 100%;
}

/* NEW: This cover sits on top of the iframe to hide the initial load */
.intro-video-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient( circle, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.8) 100% );
    z-index: 2; /* Sits above the iframe */
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}
/* JS adds this class to fade the cover out */
.intro-video-cover.hidden {
    opacity: 0;
}

/* This ::after pseudo-element creates the dark gradient overlay */
/* This is the new, corrected rule */
#intro-screen.viewer-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
      circle,
      rgba(0, 0, 0, 0) 20%,
      rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 1; /* Sits above the background, below the content */
}

.intro-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}
.intro-logo {
  max-width: 150px;
  margin-bottom: 20px;
  display:none;
}

.intro-overlay{
  display:flex;
  justify-content: center;
  align-items: center;
  height:100%;
}
#intro-tour-title {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: white;
}

/* --- Main Viewer UI --- */
#viewer-ui {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
}
.scene-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  font-size: 1rem;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.scene-toggle-btn:hover {
  background-color: rgba(0, 0, 0, 0.9);
}
.scene-toggle-btn span {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}
.scene-toggle-btn.open span {
  transform: rotate(90deg);
}
.scene-nav {
  position: absolute;
  top: 100%;
  margin-top: 10px;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  border-radius: 8px;
  width: 280px;
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  transform: translateX(-20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.scene-nav.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
#scene-nav-title {
  padding: 15px;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
#scene-nav-list {
  list-style: none;
  padding: 10px;
  overflow-y: auto;
}
#scene-nav-list li {
  padding: 12px 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}
#scene-nav-list li:hover {
  background-color: rgba(255, 255, 255, 0.1);
}
#scene-nav-list li.active {
  background-color: var(--accent-color);
  color: white;
  font-weight: 500;
}
#transition-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
}
#transition-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* --- Hotspots & Lightbox --- */
.viewer-hotspot {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
  cursor: pointer;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.viewer-hotspot-ring {
  width: 40px;
  height: 40px;
  border: 2px solid white;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.4);
  animation: editor-pulse 2s infinite ease-in-out;
  transition: transform 0.3s, background-color 0.3s;
}
.viewer-hotspot.content .viewer-hotspot-ring {
  border-color: #ffcc04;
  animation-name: editor-pulse-info;
}
.viewer-hotspot:hover .viewer-hotspot-ring {
  transform: scale(1.2);
  animation: none;
  background-color: rgba(255, 255, 255, 0.2);
}
.viewer-hotspot-text {
  position: absolute;
  bottom: 20px; /* Position text above the hotspot */
  margin-bottom: 100%; /* Spacing from hotspot center */
  background-color: rgba(0, 0, 0, 0.8);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.viewer-hotspot:hover .viewer-hotspot-text {
  opacity: 1;
  transform: translateY(0);
}
#lightbox-close{
  position: absolute;
  top:40px;
  right:40px;
  border-radius:100px;
  font-size:44px;
  height:60px;
  width:60px;
}

/* style.css -> Add these rules to the end of the file */

.editor-hotspot.zoom .editor-hotspot-ring {
  border-color: #4caf50; /* A green color for zoom */
  animation-name: editor-pulse-zoom;
}

.editor-hotspot.zoom.active .editor-hotspot-ring {
  background-color: #4caf50;
  border-color: #4caf50;
}

.editor-hotspot.zoom .editor-hotspot-ring::before {
  content: "⚲"; /* A target/zoom icon */
  font-size: 24px;
  font-weight: bold;
}

@keyframes editor-pulse-zoom {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.5); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(76, 175, 80, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.viewer-hotspot.visited .viewer-hotspot-ring,
.modal-action-btn.visited {
    animation: none; /* Stop pulsing animation */
    /* The specific color will be set by JS, this is just a fallback */
    background-color: rgba(138, 43, 226, 0.7) !important; 
    border-color: #8a2be2 !important;
}


/* ================================================== */
/* === QUIZ STYLES (NEW & IMPROVED) ================ */
/* ================================================== */

#quiz-modal .modal-content {
    max-width: 50vw;
}

#quiz-question-screen, #quiz-results-screen {
    width: 100%;
    text-align: center;
}

#quiz-progress {
    font-size: 0.9rem;
    color: var(--secondary-text);
    margin-bottom: 15px;
}

#quiz-question {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 30px;
    line-height: 1.5;
    text-align: left;
}

#quiz-answer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
    text-align: left;
    padding: 20px;
}

.quiz-answer-label {
    display: block;
    padding: 15px 20px;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.quiz-answer-label:hover {
    border-color: var(--accent-hover);
}

.quiz-answer-label.selected {
    background-color: rgba(0, 169, 255, 0.1);
    border-color: var(--accent-color);
}

.quiz-answer-label input {
    display: none; /* Hide the actual radio button */
}

/* --- Feedback States --- */
#quiz-answer-list.answered .quiz-answer-label {
    cursor: default;
    opacity: 0.7;
}

#quiz-answer-list.answered .quiz-answer-label:hover {
    border-color: var(--border-color); /* Disable hover effect after answering */
}

#quiz-answer-list.answered .quiz-answer-label.correct {
    background-color: rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
    opacity: 1;
}

#quiz-answer-list.answered .quiz-answer-label.incorrect {
    background-color: rgba(244, 67, 54, 0.2);
    border-color: #f44336;
    opacity: 1;
}

#quiz-feedback {
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    min-height: 25px;
}

.quiz-nav {
    padding:20px;
    box-sizing:border-box;
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

#quiz-final-score {
    font-size: 3rem;
    font-weight: 700;
    margin: 10px 0 20px;
    color: var(--accent-color);
}

/* ================================================== */
/* === UNIFIED HOTSPOT STYLES (EDITOR & VIEWER) ===== */
/* ================================================== */

/* --- Base Hotspot Element --- */
.editor-hotspot, .viewer-hotspot {
  position: absolute;
  width: 60px;
  height: 60px;
  z-index: 1;
  cursor: pointer;
  
}

/* --- Base Ring Styles (Shared) --- */
.editor-hotspot-ring, .viewer-hotspot-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- Color & Animation by Type (Shared) --- */
.editor-hotspot.navigation .editor-hotspot-ring,
.viewer-hotspot.navigation .viewer-hotspot-ring {
  border: 2px solid white;
  animation: editor-pulse 2s infinite;
}
.editor-hotspot.content .editor-hotspot-ring,
.viewer-hotspot.content .viewer-hotspot-ring {
  border: 2px solid var(--accent-color); /* Correctly uses the brand color */
  animation: editor-pulse-info 2s infinite;
}

/* --- Active & Hover States --- */
/* Editor selection state */
.editor-hotspot.active .editor-hotspot-ring {
  transform: scale(1.2);
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  animation: none;
}
/* Viewer hover state */
.viewer-hotspot:hover .viewer-hotspot-ring {
    transform: scale(1.2);
    animation: none;
    background-color: rgba(255, 255, 255, 0.2);
}

/* --- Icon Content Base (Shared) --- */
.editor-hotspot-ring::before,
.viewer-hotspot-ring::before {
    font-family: sans-serif;
    font-weight: bold;
    font-size: 20px;
    color: white;
    line-height: 1;
    content: ''; /* Default empty */
}

/* --- Icon Library (Shared) --- */
.icon-info .editor-hotspot-ring::before, .icon-info .viewer-hotspot-ring::before { content: 'i';  }
.icon-help .editor-hotspot-ring::before, .icon-help .viewer-hotspot-ring::before { content: '?'; }
.icon-video .editor-hotspot-ring::before, .icon-video .viewer-hotspot-ring::before { content: '▶'; font-size: 16px; }
.icon-gallery .editor-hotspot-ring::before, .icon-gallery .viewer-hotspot-ring::before { content: '▣'; font-size: 24px; }
.icon-quiz .editor-hotspot-ring::before, .icon-quiz .viewer-hotspot-ring::before { content: '!'; }
.icon-zoom .editor-hotspot-ring::before, .icon-zoom .viewer-hotspot-ring::before { content: '⚲'; font-size: 24px; }
.icon-arrow .editor-hotspot-ring::before, .icon-arrow .viewer-hotspot-ring::before { content: '→'; }

/* --- Defaults (Shared) --- */
/* Default for content hotspots if no icon is set */
.editor-hotspot.content:not([class*="icon-"]) .editor-hotspot-ring::before,
.viewer-hotspot.content:not([class*="icon-"]) .viewer-hotspot-ring::before {
    content: 'i';
    
}
/* Default for navigation hotspots */
.editor-hotspot.navigation .editor-hotspot-ring::before,
.viewer-hotspot.navigation .viewer-hotspot-ring::before {
    content: '→';
}

/* --- Keyframes --- */
@keyframes editor-pulse-info {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 var(--accent-color); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(0,0,0,0); } /* Transparent fallback for safety */
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 var(--accent-color); }
}