  @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300&family=Josefin+Sans:wght@100;300;400&display=swap');

  :root {
    --gold: #c9a84c;
    --gold-light: #e8c97a;
    --dark: #0a0a0a;
    --dark2: #121212;
    --text: #f0ece0;
    --text-muted: #9a9485;
    --glass: rgba(10,10,10,0.72);
    --border: rgba(201,168,76,0.25);
  }

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

  body {
    background: var(--dark);
    color: var(--text);
    font-family: 'Josefin Sans', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
  }

  /* ──── SCENE ──── */
  #scene {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    touch-action: none;
  }
  #scene.dragging { cursor: grabbing; }

  /* Lớp zoom/pan: ảnh thường + hotspot cùng transform */
  #view {
    position: absolute;
    inset: 0;
    transform-origin: center center;
    will-change: transform;
  }

  #panorama {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: background-image 0.05s;
    /* Một lớp vẽ, tránh blur kép khi zoom (không dùng scale trên cả lớp ảnh) */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  /* Vignette overlay */
  #scene::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.65) 100%);
    pointer-events: none;
    z-index: 2;
  }

  /* ──── HOTSPOTS ──── */
  .hotspot {
    position: absolute;
    z-index: 10;
    transform: translate(-50%, -50%);
    cursor: pointer;
    animation: pulse 2.4s ease-in-out infinite;
  }
  .hotspot-ring {
    width: 52px; height: 52px;
    border: 1.5px solid var(--gold);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(10,10,10,0.55);
    backdrop-filter: blur(6px);
    transition: transform 0.25s, background 0.25s, border-color 0.25s;
    position: relative;
  }
  .hotspot:hover .hotspot-ring {
    transform: scale(1.15);
    background: rgba(201,168,76,0.18);
    border-color: var(--gold-light);
  }
  .hotspot-icon {
    font-size: 18px;
  }
  .hotspot-label {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--gold-light);
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.2s;
  }
  .hotspot:hover .hotspot-label { opacity: 1; }

  @keyframes pulse {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(201,168,76,0.4)); }
    50% { filter: drop-shadow(0 0 14px rgba(201,168,76,0.8)); }
  }

  /* Ripple on hotspot */
  .hotspot-ring::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid rgba(201,168,76,0.3);
    animation: ripple 2.4s ease-in-out infinite;
  }
  @keyframes ripple {
    0% { transform: scale(0.85); opacity: 0.8; }
    100% { transform: scale(1.35); opacity: 0; }
  }

  /* ──── TOP BAR ──── */
  #topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 64px;
    z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
  }
  .brand {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--text);
  }
  .brand span { color: var(--gold); font-style: italic; }

  .room-name {
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold-light);
    padding: 6px 16px;
    border: 1px solid var(--border);
    background: var(--glass);
    backdrop-filter: blur(8px);
    border-radius: 2px;
  }

  .hint {
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    display: flex; align-items: center; gap: 8px;
  }
  .hint svg { opacity: 0.5; }

  /* ──── FLOOR PLAN ──── */
  #minimap {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 50;
    width: 180px;
    background: var(--glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    border-radius: 4px;
    padding: 14px;
  }
  .minimap-title {
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 10px;
  }
  .floor-plan {
    width: 100%;
    aspect-ratio: 1.2;
    position: relative;
  }
  .fp-room {
    position: absolute;
    border: 1px solid rgba(201,168,76,0.25);
    font-size: 7px;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.3s, border-color 0.3s;
    cursor: pointer;
    text-transform: uppercase;
  }
  .fp-room.active {
    border-color: var(--gold);
    background: rgba(201,168,76,0.12);
    color: var(--gold-light);
  }
  .fp-dot {
    position: absolute;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--gold);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(201,168,76,0.8);
    transition: left 0.5s, top 0.5s;
    z-index: 2;
  }

  /* ──── ROOM STRIP ──── */
  #roomstrip {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    gap: 12px;
    background: var(--glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    border-radius: 4px;
    padding: 10px 16px;
  }
  .room-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'Josefin Sans', sans-serif;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s;
    position: relative;
  }
  .room-btn::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; right: 50%;
    height: 1px;
    background: var(--gold);
    transition: left 0.3s, right 0.3s;
  }
  .room-btn:hover, .room-btn.active {
    color: var(--gold-light);
  }
  .room-btn.active::after { left: 0; right: 0; }

  /* ──── TRANSITION ──── */
  #curtain {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--dark);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }
  #curtain.show { opacity: 1; pointer-events: all; }

  /* ──── LOADING ──── */
  #loader {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    transition: opacity 0.6s;
  }
  #loader.hidden { opacity: 0; pointer-events: none; }
  .loader-brand {
    font-family: 'Cormorant Garamond', serif;
    font-size: 38px;
    font-weight: 300;
    letter-spacing: 0.12em;
    color: var(--text);
  }
  .loader-brand em { color: var(--gold); font-style: italic; }
  .loader-bar {
    width: 200px;
    height: 1px;
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
  }
  .loader-bar::after {
    content: '';
    position: absolute;
    left: -60%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    animation: slide 1.2s ease-in-out infinite;
  }
  @keyframes slide {
    to { left: 120%; }
  }
  .loader-text {
    font-size: 10px;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    text-transform: uppercase;
  }

  /* ──── COMPASS ──── */
  #compass {
    position: fixed;
    top: 80px;
    right: 28px;
    z-index: 50;
    width: 48px; height: 48px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--glass);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
  }
  #compass-needle {
    width: 2px; height: 30px;
    position: relative;
    transition: transform 0.1s;
  }
  #compass-needle::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 14px solid var(--gold);
  }
  #compass-needle::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 14px solid #555;
  }

  /* ──── INFO TOOLTIP ──── */
  #info-tooltip {
    position: fixed;
    z-index: 60;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    max-width: 200px;
    background: var(--glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    border-radius: 4px;
    padding: 12px 16px;
  }
  #info-tooltip.visible { opacity: 1; }
  .tooltip-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 300;
    color: var(--gold-light);
    margin-bottom: 4px;
  }
  .tooltip-desc {
    font-size: 10px;
    letter-spacing: 0.05em;
    line-height: 1.6;
    color: var(--text-muted);
  }

  /* ──── CONTROLS ──── */
  #controls {
    position: fixed;
    left: 28px;
    bottom: 28px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .ctrl-btn {
    width: 38px; height: 38px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.2s, border-color 0.2s;
    backdrop-filter: blur(8px);
  }
  .ctrl-btn:hover { color: var(--gold); border-color: var(--gold); }