:root {
    --bg-dark: #121212;
    --panel-bg: #1e1e1e;
    --primary: #3b82f6;
    --text-main: #ffffff;
    --text-sub: #aaaaaa;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.page-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow-y: auto;
}

/* 네비게이션 */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(18, 18, 18, 0.95);
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px; /* 💡 왼쪽 40px 여백 복구됨 */
    box-sizing: border-box;
    z-index: 1000;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-btn {
    background: transparent;
    border: 1px solid #555;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    cursor: pointer;
}

.nav-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: bold;
}

#lang-select {
    background: #333;
    color: white;
    border: none;
    padding: 5px;
    border-radius: 4px;
}

/* 랜딩 페이지 */
#page-landing {
    padding-top: 60px;
}

.hero-section {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    background: linear-gradient(135deg, #121212, #1e1e1e);
}

.hero-content {
    max-width: 50%;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-sub);
    margin-bottom: 40px;
}

.cta-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s;
}

.cta-btn:hover {
    transform: scale(1.05);
}

.hero-image-placeholder {
    width: 45%;
    height: 60%;
    /* background 부분을 이미지 경로로 변경합니다 */
    background: url('image/mainbanner.png') center/cover no-repeat;
    border: 1px solid #333;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* .hero-image-placeholder::after 코드는 전체 삭제합니다 */


.features-section {
    padding: 80px 10%;
    background: #181818;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.feature-card {
    padding: 30px;
    background: #222;
    border-radius: 10px;
    transition: 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.showcase-section {
    padding: 80px 10%;
    background: #121212;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.image-placeholder {
    background: #000;
    border: 1px solid #333;
    border-radius: 8px;
    width: 100%;
    aspect-ratio: 16/9;
}

footer {
    padding: 40px;
    text-align: center;
    color: #555;
    background: #0e0e0e;
}

/* 로그인 모달 */
.auth-content {
    max-width: 400px;
    padding: 40px;
}

.auth-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: #222;
    border: 1px solid #444;
    color: white;
    border-radius: 5px;
    box-sizing: border-box;
}

.full-width {
    width: 100%;
    margin-top: 10px;
}

.divider {
    margin: 20px 0;
    color: #555;
    font-size: 0.9rem;
}

.google-btn {
    background: white;
    color: #333;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.auth-switch {
    margin-top: 20px;
    font-size: 0.95rem;
    color: #aaa;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 앱 스타일 */
.app-header {
    padding-top: 80px;
    padding-left: 40px;
    padding-right: 40px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

#page-list {
    padding-bottom: 40px;
}

.filter-bar {
    padding: 0 40px;
    margin-bottom: 20px;
}

#tour-list-container {
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.tour-card {
    background: var(--panel-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #333;
}

.tour-thumb {
    height: 180px;
    background-size: cover;
    cursor: pointer;
    transition: 0.2s;
}

.tour-thumb:hover {
    transform: scale(1.02);
}

.tour-info {
    padding: 15px;
}

.tour-meta {
    color: var(--text-sub);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.badge-type {
    background: #333;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* 에디터 스타일 */
.editor-layout {
    display: flex;
    height: 100%;
    padding-top: 0 !important;
}

.editor-preview-area {
    flex: 1;
    position: relative;
    background: #000;
}

#editor-panorama,
#viewer-panorama {
    width: 100%;
    height: 100%;
}

.editor-controls {
    width: 350px;
    background: var(--panel-bg);
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 10;
}

.panel-header {
    padding: 15px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion details {
    border-bottom: 1px solid #333;
}

.accordion summary {
    padding: 15px;
    cursor: pointer;
    font-weight: bold;
    list-style: none;
}

.control-group {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #252525;
}

input,
select,
button {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    background: #333;
    color: white;
    border: 1px solid #444;
    border-radius: 4px;
}

.row {
    display: flex;
    gap: 5px;
}

.save-btn {
    background: #10b981;
    color: white;
    padding: 15px;
    margin-top: auto;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

/* ★ 추가: 에디터 리스트 썸네일 스타일 */
.scene-thumb-small {
    width: 40px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    vertical-align: middle;
    border: 1px solid #555;
}

#scene-list li {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

#scene-list li span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 십자선 */
#editor-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    z-index: 99;
    pointer-events: none;
}

#editor-crosshair::before,
#editor-crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 0, 0.7);
}

#editor-crosshair::before {
    top: 9px;
    left: 0;
    width: 20px;
    height: 2px;
}

#editor-crosshair::after {
    top: 0;
    left: 9px;
    width: 2px;
    height: 20px;
}

/* 뷰어 UI */
#viewer-header-info {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-row {
    display: flex;
    align-items: center;
}

#v-apt-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 10px;
}

#v-apt-type {
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
}

.scene-subtitle {
    font-size: 1.2rem;
    font-weight: normal;
    margin-top: 5px;
    color: #ddd;
}

/* 하단 썸네일 바 (최하단 고정 유지) */
#thumbnail-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px; /* 높이 명시 */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 10px 0;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.thumb-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-width: 80px;
    opacity: 0.7;
    transition: 0.3s;
}

.thumb-wrapper.active {
    opacity: 1;
    transform: scale(1.05);
}

.thumb-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid transparent;
}

.thumb-wrapper.active .thumb-img {
    border-color: var(--primary);
}

#viewer-controls-bar {
    position: fixed;
    bottom: 120px; /* 썸네일 바(약 100px) 위에 위치하도록 상향 조정 */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 30px;
    display: flex;
    gap: 15px;
    z-index: 10000; /* 썸네일 바보다 위에 표시 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.transparent-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

/* 모달 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #333;
    padding: 30px;
    border-radius: 10px;
    width: 300px;
    text-align: center;
    position: relative;
}

/* -------------------------
   [추가] 모바일 최적화 (Mobile-First UI)
   ------------------------- */

@media (max-width: 768px) {
    .editor-layout {
        flex-direction: column;
    }

    .editor-preview-area {
        flex: none;
        height: 50vh;
        width: 100%;
    }

    .editor-controls {
        width: 100%;
        height: 50vh;
        border-left: none;
        border-top: 1px solid #333;
    }

    #retouch-ai-panel {
        width: 90%;
        bottom: 10px;
        padding: 5px;
        flex-wrap: wrap;
        justify-content: center;
    }

    #ai-gen-prompt {
        width: 100%;
        margin-bottom: 5px;
    }

    #intro-text h2 {
        font-size: 1.5rem;
    }
}

/* 뷰어 컨테이너 복구 */
#viewer-container {
    width: 100%;
    height: 100%;
    position: relative;
}
/* 💡 [여기서부터 추가] 블랙 페이드인 오버레이 효과 */
#intro-black-fade {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    z-index: 9000;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}
/* 💡 [Req 4] 핫스팟 커스텀 모양 (화살표, 문, 원형) */
.custom-hotspot {
    pointer-events: auto !important;
    display: flex; 
    justify-content: center; 
    align-items: center;
}


/* 💡 [Req 1] 핫스팟 고정 (transform 속성을 쓰지 않고 margin으로 중앙 정렬) */
.custom-hotspot { pointer-events: auto !important; }

/* 원형 (Circle) */
.hs-shape-circle {
    height: 30px; width: 30px;
    margin: 0; /* Pannellum centers the marker. */
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: background 0.2s;
}
.hs-shape-circle:hover { background: rgba(255, 255, 255, 0.9); }
.hs-color-blue.hs-shape-circle { border-color: #3b82f6; }
.hs-color-red.hs-shape-circle { border-color: #ef4444; }

/* 화살표 (Arrow) */
.hs-shape-arrow { width: 28px; height: 28px; }
.hs-shape-arrow::before {
    content: ''; position: absolute; top:50%; left:0; width:28px; height:28px;
    color:white; background: currentColor;
    clip-path: polygon(50% 0, 100% 48%, 66% 48%, 66% 100%, 34% 100%, 34% 48%, 0 48%);
}
.hs-shape-arrow:hover::before { color: #10b981; }

/* 문 (Door) */
.hs-shape-door::before {
    content: '\f52b'; font-family: "Font Awesome 5 Free"; font-weight: 900;
    font-size: 26px; color: #fff; text-shadow: 0 0 8px rgba(0,0,0,0.8);
    display: block; transition: color 0.2s;
}
.hs-shape-door:hover::before { color: #10b981; }

/* 화살표/문 색상 */
.hs-color-blue.hs-shape-arrow::before, .hs-color-blue.hs-shape-door::before { color: #3b82f6; }
.hs-color-red.hs-shape-arrow::before, .hs-color-red.hs-shape-door::before { color: #ef4444; }

/* 툴팁 줄바꿈 방지 */
.custom-hotspot::after { content: attr(data-text); }
div.pnlm-tooltip span {
    visibility: visible !important;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff; padding: 4px 8px; border-radius: 4px;
    font-size: 14px; margin-top: 35px; margin-left: -20px;
    white-space: nowrap !important; /* 💡 줄바꿈 방지 */
}

/* 마우스를 올렸을 때 크기가 커지는(scale) 효과 삭제하고 배경색만 진하게 변경 */
.custom-hotspot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.hs-color-blue { border-color: #3b82f6; }
.hs-color-red { border-color: #ef4444; }

/* 핫스팟 호버 시 텍스트(툴팁) 강제 노출 설정 */
.custom-hotspot::after { content: attr(data-text); }

div.pnlm-tooltip span {
    visibility: visible !important;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 35px; /* 아이콘 아래로 배치 */
    margin-left: -20px;
    white-space: nowrap !important;
}

/* =========================================
   에디터 전용 레이아웃 (SaaS 스타일)
========================================= */
#page-editor { display:flex; flex-direction:column; height:100%; height:100dvh; padding:0; overflow:hidden; box-sizing:border-box; }
.editor-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:3px 8px; padding:3px 8px; flex:none; background:#1e1e24; border-bottom:1px solid #333; }
.editor-header .header-left, .editor-header .header-right { display:flex; align-items:center; flex-wrap:wrap; gap:4px; min-width:0; }
.editor-header .header-right { margin-left:auto; }
.editor-header button { width:auto; margin:0; white-space:nowrap; }
#page-editor .editor-header button { padding:4px 8px !important; min-height:28px; }
#draft-status { font-size:.75rem; overflow-wrap:anywhere; }
.editor-layout { flex:1; min-height:0; flex-direction:column; height:auto; background:#121212; }
.editor-body { display:flex; flex:1; min-height:0; overflow:hidden; }
.editor-body .editor-workspace { min-width:0; min-height:0; }
.editor-body .editor-sidebar { width:clamp(290px,29vw,380px); padding:12px; box-sizing:border-box; }
#nadir-patch-modal { max-width:calc(100% - 24px); max-height:calc(100% - 18px); overflow:auto; box-sizing:border-box; }
@media(max-width:680px) {
    .editor-header { padding:3px 4px; }
    .editor-body { flex-direction:column; }
    .editor-body .editor-sidebar { width:100%; flex:1 1 50%; min-height:0; border-top:1px solid #444; padding:8px; }
    .editor-body .editor-workspace { flex:1 1 50% !important; }
    #editor-scene-strip { height:64px !important; padding:3px 6px !important; }
    #nadir-patch-modal { bottom:4px !important; left:4px !important; }
}
/* 좌측 메인 뷰어 (가려짐 없이 100% 사용) */
.editor-workspace {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.panorama-container {
    width: 100%;
    height: 100%;
}

/* 우측 사이드바 패널 */
.editor-sidebar {
    width: 350px;
    background: #1e1e24;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* 플로팅 패널 (뷰어를 가리지 않는 모서리 배치) */
.floating-panel {
    position: absolute;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}
.floating-panel.bottom-left {
    bottom: 20px;
    left: 20px;
    width: 280px;
}

/* =========================================
   도움말(가이드) 모달 디자인
========================================= */
.help-content {
    width: 600px;
    background: #1e1e24;
    border-radius: 12px;
    overflow: hidden;
}

.help-header {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: #2a2a35;
    border-bottom: 1px solid #444;
}

.help-header h3 { margin: 0; font-size: 1.1rem; color: #fff; }

.help-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.help-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #2a2a35;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.help-icon {
    font-size: 1.5rem;
    color: #3b82f6;
    margin-top: 2px;
}

.help-text strong {
    display: block;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 5px;
}

.help-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #bbb;
    line-height: 1.4;
}


/* 💡 [Req 2] 오디오 및 스크립트 UI 컨트롤 바 스타일 */
.top-control-btn:hover { opacity: 1; transform: scale(1.1); }
.top-control-btn .hidden { display: none !important; }

#script-overlay {
    position: absolute; top: 80px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 600px; max-height: 50vh; background: rgba(20, 20, 24, 0.95);
    color: white; z-index: 8999; border-radius: 8px; border: 1px solid #444; padding: 20px;
    overflow-y: auto; box-shadow: 0 10px 25px rgba(0,0,0,0.5); pointer-events: auto;
}
#script-overlay.hidden { display: none; }
.script-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #444; padding-bottom: 10px; margin-bottom: 15px; }
.script-header h3 { margin: 0; color: #3b82f6; font-size: 1.1rem; }
#script-text-content { font-size: 0.95rem; line-height: 1.6; color: #ddd; word-break: break-all; }



.top-control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
    outline: none;
}

.top-control-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.top-control-btn .hidden {
    display: none !important;
}

/* 스크립트 오버레이 오버레이 스타일 */
#script-overlay {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    max-height: 50vh;
    background: rgba(20, 20, 24, 0.95);
    color: white;
    z-index: 1999;
    border-radius: 8px;
    border: 1px solid #444;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

#script-overlay.hidden {
    display: none;
}

.script-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.script-header h3 {
    margin: 0;
    color: #3b82f6;
    font-size: 1.1rem;
}

/* 💡 [수정] 스크립트 텍스트 줄바꿈 방지 및 엔터 유지 (기존 속성 교체) */
#script-text-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ddd;
    word-break: keep-all;     /* 단어 중간에서 쪼개지는 현상 방지 */
    white-space: pre-wrap;    /* 사용자가 입력한 엔터(줄바꿈) 자연스럽게 유지 */
}

/* 💡 [Req 4, 5] 로고 오버레이를 뷰어/에디터 화면 안쪽으로 절대 고정 */
.logo-overlay {
    position: absolute !important;
    z-index: 8000 !important;
    pointer-events: none; 
}
.logo-overlay img { max-width: 150px; max-height: 80px; object-fit: contain; }
.logo-overlay span { color: white; font-weight: bold; font-size: 1.2rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
.pos-top-left { top: 20px; left: 20px; }
.pos-top-right { top: 20px; right: 20px; }
.pos-bottom-left { bottom: 80px; left: 20px; }
.pos-bottom-right { bottom: 80px; right: 20px; }

/* 💡 [Req 5] 로고 크기 조절 옵션용 CSS 추가 */
.logo-size-small img { max-width: 80px !important; max-height: 40px !important; }
.logo-size-small span { font-size: 0.9rem !important; }

.logo-size-medium img { max-width: 150px !important; max-height: 80px !important; }
.logo-size-medium span { font-size: 1.2rem !important; }

.logo-size-large img { max-width: 250px !important; max-height: 120px !important; }
.logo-size-large span { font-size: 1.8rem !important; }

.logo-size-extra-large img { max-width: 375px !important; max-height: 180px !important; }
.logo-size-extra-large span { font-size: 2.7rem !important; }

/* 💡 유튜브 (재생 버튼) 아이콘 */
.hs-shape-youtube::before {
    content: '\f144'; font-family: "Font Awesome 5 Free"; font-weight: 900;
    font-size: 26px; color: #fff; text-shadow: 0 0 8px rgba(0,0,0,0.8);
    display: block; transition: color 0.2s;
}
.hs-shape-youtube:hover::before { color: #ef4444; } /* 유튜브는 빨간색 호버 */

/* 💡 정보 (i) 아이콘 */
.hs-shape-info_icon::before {
    content: '\f05a'; font-family: "Font Awesome 5 Free"; font-weight: 900;
    font-size: 26px; color: #fff; text-shadow: 0 0 8px rgba(0,0,0,0.8);
    display: block; transition: color 0.2s;
}
.hs-shape-info_icon:hover::before { color: #10b981; }

/* 💡 링크 (사슬) 아이콘 */
.hs-shape-link::before {
    content: '\f0c1'; font-family: "Font Awesome 5 Free"; font-weight: 900;
    font-size: 24px; color: #fff; text-shadow: 0 0 8px rgba(0,0,0,0.8);
    display: block; transition: color 0.2s;
}
.hs-shape-link:hover::before { color: #3b82f6; }

/* 💡 [추가] 신규 아이콘에 대한 파란색, 빨간색 옵션 지원 */
.hs-color-blue.hs-shape-youtube::before, .hs-color-blue.hs-shape-info_icon::before, .hs-color-blue.hs-shape-link::before { color: #3b82f6; }
.hs-color-red.hs-shape-youtube::before, .hs-color-red.hs-shape-info_icon::before, .hs-color-red.hs-shape-link::before { color: #ef4444; }

/* 에디터 우측 메뉴 아코디언 활성화(Open) 상태 하이라이트 */
.accordion details[open] summary {
    background-color: #3b82f6; /* 파란색 배경 */
    color: white;
    border-bottom: none;
    border-radius: 4px;
}
.accordion summary {
    background-color: #2a2a35;
    color: #ccc;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 4px;
    margin-bottom: 5px;
}
/* 💡 재난 시뮬레이션 VFX (Visual Effects) */
.vfx-fire {
    background: radial-gradient(circle, transparent 20%, rgba(255, 60, 0, 0.4) 80%, rgba(200, 0, 0, 0.8) 100%);
    animation: pulse-fire 1.5s infinite alternate;
}
@keyframes pulse-fire { 0% { opacity: 0.6; } 100% { opacity: 1; box-shadow: inset 0 -100px 150px rgba(0,0,0,0.8); } }

.vfx-shock {
    background: rgba(255, 255, 255, 0.1);
    animation: flash-shock 0.3s infinite;
}
@keyframes flash-shock {
    0%, 100% { backdrop-filter: invert(0); background: transparent; }
    50% { backdrop-filter: invert(0.8) sepia(100%) hue-rotate(180deg); background: rgba(0, 150, 255, 0.4); }
}

.vfx-fall {
    box-shadow: inset 0 100px 100px -50px rgba(0,0,0,0.9), inset 0 -100px 100px -50px rgba(0,0,0,0.9);
    animation: shake-y 0.1s infinite alternate;
}
@keyframes shake-y { 0% { transform: translateY(-15px); } 100% { transform: translateY(15px); } }

.vfx-gas {
    background: radial-gradient(circle, transparent 30%, rgba(150, 255, 0, 0.35) 100%);
    animation: pulse-gas 3s infinite alternate;
}
@keyframes pulse-gas { 0% { opacity: 0.5; backdrop-filter: blur(2px); } 100% { opacity: 1; backdrop-filter: blur(8px); } }

.vfx-quake {
    background: rgba(0,0,0,0.3);
    animation: shake-xy 0.15s infinite;
}
@keyframes shake-xy {
    0% { transform: translate(10px, 10px); }
    25% { transform: translate(-10px, -10px); }
    50% { transform: translate(-10px, 10px); }
    75% { transform: translate(10px, -10px); }
    100% { transform: translate(0, 0); }
}

/* 💡 교육 모드 인벤토리 스타일 */
.edu-item-slot {
    display: flex; align-items: center; gap: 10px; padding: 10px;
    background: #1e293b; border: 1px solid #334155; border-radius: 8px;
    cursor: pointer; color: white; transition: 0.2s;
}
.edu-item-slot:hover { background: #3b3b4a; }
.edu-item-slot.equipped {
    background: #047857; border-color: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}
/* 💡 모바일(화면 너비 768px 이하)에서 Welcome 문구(intro-overlay) 강제 숨김 처리 */
@media screen and (max-width: 768px) {
    #intro-overlay {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}
/* 2. 마우스 오버 시 핫스팟 주변에 생기는 불필요한 네모 윤곽선/배경 완벽 제거 */
.custom-hotspot-img-wrapper:hover,
.custom-hotspot:not(.hs-shape-circle):hover,
.pnlm-pointer:not(.hs-shape-circle):hover {
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
}

/* 3. 기본 핫스팟 마우스 오버 시 나타나는 기본 네모 레이어(툴팁)를 깔끔하게 변경 
   (아예 텍스트를 안 보이게 하려면 background: transparent, color: transparent 로 변경하세요) */
.pnlm-tooltip span {
    background: rgba(0, 0, 0, 0.7) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px !important;
    box-shadow: none !important;
}

.map-location { position:absolute; transform:translate(-50%,-50%); width:12px; height:12px; padding:0; border:2px solid white; border-radius:50%; background:#3b82f6; pointer-events:auto; cursor:pointer; z-index:5; }
.map-location.active { background:#ef4444; width:16px; height:16px; z-index:10; }
.map-location span { position:absolute; top:100%; left:50%; transform:translateX(-50%); margin-top:3px; color:white; background:#161616db; padding:2px 4px; border-radius:3px; white-space:nowrap; font-size:10px; }

#publish-review { width:720px; max-width:calc(100vw - 32px); max-height:calc(100dvh - 48px); padding:0; border:1px solid #475569; border-radius:20px; background:#161e2d; color:#f1f5f9; box-shadow:0 24px 80px #0009; overflow:hidden; }
#publish-review[open] { display:flex; flex-direction:column; }
#publish-review::backdrop { background:#020617b8; backdrop-filter:blur(4px); }
#publish-review .review-header { padding:24px 28px 18px; border-bottom:1px solid #334155; }
#publish-review h2 { margin:5px 0 8px; font-size:24px; }
#publish-review h3 { margin:0 0 14px; font-size:17px; }
#publish-review .review-eyebrow { color:#93c5fd; font-size:11px; letter-spacing:2px; }
#publish-review .review-header p,#publish-review .review-help { margin:0; color:#b6c3d5; font-size:13px; line-height:1.6; }
#publish-review .review-body { padding:24px 28px; overflow-y:auto; min-height:0; }
#publish-review .review-section + .review-section { margin-top:26px; }
#publish-review .review-visibility { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:12px; }
#publish-review .review-choice { display:flex; align-items:center; gap:10px; padding:16px; border:1px solid #475569; border-radius:12px; cursor:pointer; }
#publish-review .review-choice:has(input:checked) { border-color:#60a5fa; background:#1e3a5f; }
#publish-review .review-choice:has(input:disabled:not(:checked)) { opacity:.5; cursor:not-allowed; }
#publish-review .review-choice input { width:18px; height:18px; margin:0; accent-color:#60a5fa; }
#publish-review .review-choice strong,#publish-review .review-choice small { display:block; }
#publish-review .review-choice small { margin-top:6px; font-size:12px; color:#bfcee1; }
#publish-review .review-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
#publish-review .review-section-heading h3 { margin:0; }
#publish-review button { width:auto; margin:0; border-radius:9px; padding:12px 16px; font-size:14px; font-weight:600; cursor:pointer; }
#publish-review button:disabled { opacity:.55; cursor:wait; }
#publish-review button:focus-visible,#publish-review input:focus-visible { outline:3px solid #93c5fd; outline-offset:3px; }
#publish-review .review-refresh { padding:8px 10px; background:transparent; color:#93c5fd; border:1px solid #475569; font-size:12px; }
#publish-review .review-scenes { display:grid; gap:10px; }
#publish-review .review-scene { display:flex; align-items:center; gap:16px; padding:12px; border:1px solid #334155; border-radius:12px; background:#1c2738; }
#publish-review .review-scene img { width:112px; height:64px; object-fit:cover; border-radius:6px; background:#0f172a; flex-shrink:0; }
#publish-review .review-scene h4 { margin:0 0 6px; font-size:15px; overflow-wrap:anywhere; }
#publish-review .review-scene p { margin:0; font-size:12px; color:#b6c3d5; }
#publish-review .review-footer { flex-shrink:0; padding:16px 28px 22px; border-top:1px solid #334155; background:#111a29; }
#publish-review .review-status { margin:0 0 14px; color:#b6c3d5; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
#publish-review .review-status.is-error { color:#fecaca; background:#451f2b; border-radius:8px; padding:12px; }
#publish-review .review-actions { display:flex; justify-content:flex-end; gap:10px; }
#publish-review .review-cancel { color:#e2e8f0; background:#273449; border:1px solid #475569; }
#publish-review .review-submit { color:white; background:#2563eb; border:1px solid #3b82f6; min-width:160px; }
@media(max-width:540px) {
    #publish-review { max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); border-radius:14px; }
    #publish-review .review-header,#publish-review .review-body,#publish-review .review-footer { padding:18px; }
    #publish-review .review-visibility { grid-template-columns:1fr; gap:8px; }
    #publish-review .review-choice { padding:12px; }
    #publish-review .review-scene img { width:80px; height:52px; }
    #publish-review .review-actions button { flex:1; min-width:0; padding:12px 8px; }
}

.custom-hotspot-img-wrapper .tour-hotspot-icon { display:block; width:35px; height:35px; font-size:28px; text-align:center; line-height:35px; }
.custom-hotspot-img-wrapper img.tour-hotspot-icon { object-fit:cover; border:2px solid white; border-radius:50%; }
.custom-hotspot-img-wrapper .custom-tooltip-text { position:absolute; top:100%; left:50%; transform:translateX(-50%); white-space:nowrap; pointer-events:none; color:white; background:#111c; border-radius:4px; padding:3px 6px; }

.template-choices { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.template-choices button { border:1px solid #64748b; border-radius:6px; background:#334155; color:white; padding:14px 8px; cursor:pointer; }
.template-choices button:hover,.template-choices button:focus-visible { background:#155e75; }

/* Publication workspace: scrollable content and a persistent action / progress area. */
.view-quality-panel { padding:14px; margin:14px 0; border:1px solid #475569; border-radius:10px; background:#18212d; }
.view-quality-panel h4 { margin:0 0 10px; }
.view-quality-panel>summary { font-size:15px; font-weight:700; cursor:pointer; }
.accordion>details { border:1px solid #3b4758; border-radius:12px; overflow:hidden; margin-bottom:12px; background:#18212c; }
.accordion>details>summary { margin:0; padding:16px; background:#202d3d; color:#d6e2ef; font-size:15px; font-weight:700; border-radius:0; }
.accordion>details[open]>summary { background:#27476e; color:#fff; border-bottom:1px solid #4c6f99; border-radius:0; }
.accordion>details .control-group { padding:16px; background:#18212c; }
.accordion>details[open] details>summary { background:#1b2a3c; color:#c4d6ec; border:1px solid #415570; border-radius:7px; padding:10px; }
.accordion details details[open]>summary { background:#253e5b; color:#fff; border-radius:7px; }
.accordion label { color:#d0dbea; line-height:1.5; }
.accordion input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),.accordion select,.accordion textarea { box-sizing:border-box; background:#111c29 !important; color:#edf3fc !important; border:1px solid #495d75 !important; border-radius:7px !important; }
.accordion button.secondary-btn,.accordion #btn-image-undo { background:#25384e !important; border:1px solid #4c6583 !important; color:#d6e8ff !important; border-radius:8px; min-height:40px; }
.accordion button:disabled { opacity:.45; cursor:not-allowed; }
.accordion button:focus-visible,.accordion input:focus-visible,.accordion select:focus-visible { outline:2px solid #93c5fd; outline-offset:2px; }
.admin-api-settings { margin-top:30px; padding:24px; background:#18212c; border:1px solid #415570; border-radius:12px; }
.admin-api-settings p { color:#b8c8db; line-height:1.6; }
.admin-api-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.admin-api-grid form { padding:18px; background:#111c29; border-radius:10px; }
.admin-api-grid input { width:100%; box-sizing:border-box; padding:12px; border:1px solid #52677f; color:white; background:#0e1724; border-radius:7px; }
.ai-result-dialog { width:min(900px,90vw); max-height:90dvh; overflow:auto; border:1px solid #52677f; border-radius:12px; background:#18212c; color:white; padding:24px; }
.ai-result-dialog::backdrop { background:#000b; }
.ai-result-pair { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.ai-result-pair figure { margin:0; min-width:0; }
.ai-result-pair img { width:100%; display:block; }
.ai-result-pair figcaption { margin-bottom:10px; }
@media(max-width:600px){.admin-api-grid,.ai-result-pair{grid-template-columns:1fr;}}
.view-quality-panel output { float:right; color:#bfdbfe; font-variant-numeric:tabular-nums; }
.view-quality-panel input[type="range"] { padding:0; margin:12px 0; accent-color:#60a5fa; }
#viewer-controls-bar { box-sizing:border-box; width:max-content; flex-wrap:wrap; justify-content:center; gap:8px; padding:10px; max-width:calc(100vw - 20px); border-radius:24px; align-items:center; bottom:calc(124px + env(safe-area-inset-bottom,0px)); }
#viewer-controls-bar button.transparent-btn { flex:0 0 44px; width:44px; height:44px; min-width:44px; margin:0; padding:0; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:17px; line-height:1; }
#viewer-controls-bar button.hidden,#thumbnail-bar.hidden { display:none !important; }
#viewer-controls-bar button.active { background:#315caa; border-color:#93b4ee; }
#viewer-controls-bar.thumbnails-off { bottom:calc(18px + env(safe-area-inset-bottom,0px)); }
#viewer-controls-bar button:focus-visible { outline:2px solid #bfdbfe; outline-offset:3px; }
#thumbnail-bar { box-sizing:border-box; height:112px; padding-bottom:calc(10px + env(safe-area-inset-bottom,0px)); }
@media(max-width:420px) { #viewer-controls-bar { gap:4px; padding:8px; } #viewer-controls-bar button.transparent-btn { flex-basis:38px; min-width:38px; width:38px; height:44px; font-size:16px; } }
.view-quality-panel p { font-size:12px; line-height:1.6; color:#b8c8db; }
.view-quality-panel label { display:block; margin:10px 0; font-size:13px; }
.view-quality-panel input,.view-quality-panel select { box-sizing:border-box; width:100%; padding:9px; background:#111827; color:white; border:1px solid #64748b; border-radius:6px; }
.view-quality-panel .view-live { display:grid; gap:7px; padding:14px; background:#111827; border:1px solid #475569; border-radius:8px; margin:14px 0; }
.view-live>span { font-size:12px; color:#b8c8db; }
.view-live strong { font-size:20px; font-variant-numeric:tabular-nums; }
.view-live small { line-height:1.5; color:#cbd5e1; }
.view-quality-panel button { margin:6px 0; padding:12px 10px; border-radius:8px; background:#315caa; color:white; border:1px solid #5983ca; font-size:13px; }
.view-quality-panel .view-secondary { background:transparent; border-color:#475569; color:#bfdbfe; }
.view-quality-panel hr { border:0; border-top:1px solid #475569; margin:18px 0; }
.view-quality-panel details { margin-top:18px; border-top:1px solid #475569; padding-top:14px; }
.view-quality-panel summary { cursor:pointer; font-size:13px; line-height:1.6; }
#view-quality-feedback:not(:empty) { padding:10px; border-radius:6px; background:#1a3b35; color:#c7f3e4; }
.scene-transition-cover { position:absolute; inset:0; z-index:30; background:#1d2633; pointer-events:auto; }
.scene-transition-cover img { width:100%; height:100%; object-fit:cover; }
.scene-transition-cover span,.scene-load-message { position:absolute; bottom:22%; left:50%; transform:translateX(-50%); padding:12px 18px; border-radius:10px; background:#111e; color:white; font-size:14px; }
.scene-load-message { z-index:40; width:auto; }
#hotspot-list-display .hotspot-list-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px; margin:8px 0; border:1px solid #475569; border-radius:8px; background:#202b3a; }
.hotspot-list-row div { min-width:0; overflow-wrap:anywhere; }
.hotspot-list-row small { display:block; color:#94a3b8; margin-top:5px; }
#hotspot-list-display .hotspot-delete { width:auto; min-width:54px; min-height:44px; margin:0; padding:8px; background:#48252c; color:#fecaca; border:1px solid #9f4556; border-radius:7px; }
#hotspot-undo { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); z-index:20000; padding:14px; border-radius:10px; background:#1e293b; color:white; box-shadow:0 4px 20px #0008; }
#hotspot-undo button { display:inline-block; width:auto; margin:0 0 0 10px; padding:8px; color:#bfdbfe; }
#publish-review { width:960px; background:#111820; border-color:#36414f; border-radius:18px; }
#publish-review .review-header { display:flex; justify-content:space-between; gap:20px; padding:26px 30px; background:#18212d; }
#publish-review .review-header h2 { font-size:25px; letter-spacing:-.8px; margin:8px 0; }
#publish-review .review-eyebrow { letter-spacing:.6px; font-size:12px; font-weight:700; color:#9ebdff; }
#publish-review .review-draft-badge { align-self:flex-start; border:1px solid #4a5666; border-radius:20px; padding:5px 10px; color:#bfcbda; font-size:12px; white-space:nowrap; }
#publish-review .review-body { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(260px,1fr); gap:28px; padding:28px 30px; }
#publish-review .review-tour-heading { margin-bottom:18px; }
#publish-review .review-tour-name { margin-bottom:6px; font-size:20px; overflow-wrap:anywhere; }
#publish-review .review-count { color:#99aabd; font-size:13px; }
#publish-review .review-settings { border-left:1px solid #303c4a; padding-left:28px; }
#publish-review .review-visibility { grid-template-columns:1fr; }
#publish-review .review-choice { min-height:74px; box-sizing:border-box; padding:16px; background:#1a2431; border-color:#3d4b5f; }
#publish-review .review-choice:has(input:checked) { background:#1e3152; border-color:#719eff; box-shadow:0 0 0 1px #719eff; }
#publish-review .review-choice strong { font-size:15px; }
#publish-review .review-note { margin-top:22px; border-radius:10px; padding:16px; background:#1c2735; color:#b9c8dc; font-size:13px; line-height:1.6; }
#publish-review .review-note strong { color:#e2e8f0; }
#publish-review .review-note p { margin:7px 0 0; }
#publish-review .review-destination { font-size:12px; color:#99aabd; line-height:1.6; margin:16px 0 0; }
#publish-review .review-scene { padding:10px; gap:12px; background:#1a2431; }
#publish-review .review-scene img { width:108px; height:64px; }
#publish-review .review-refresh { margin-top:14px; }
#publish-review .review-footer { padding:20px 30px; background:#18212d; }
#publish-review .review-footer-row { display:flex; align-items:center; justify-content:space-between; gap:24px; }
#publish-review .review-status { margin:0; max-width:430px; }
#publish-review .review-actions { flex-shrink:0; }
#publish-review .review-submit { background:#4c7df0; border-color:#719eff; min-height:46px; }
#publish-review .review-submit:hover:not(:disabled) { background:#3869db; }
#publish-review .review-cancel { background:transparent; }
#publish-review .review-processing[hidden] { display:none; }
#publish-review .review-processing { margin-bottom:16px; }
#publish-review .review-progress-heading { display:flex; justify-content:space-between; font-size:14px; }
#publish-review .review-elapsed { font-variant-numeric:tabular-nums; color:#aabbd2; }
#publish-review .review-steps { list-style:none; display:grid; grid-template-columns:repeat(4,1fr); padding:0; margin:16px 0 10px; gap:8px; font-size:12px; color:#8d9eb4; }
#publish-review .review-steps li { border-top:2px solid #3d4b5f; padding-top:8px; }
#publish-review .review-steps .is-current { color:#b9d0ff; border-color:#719eff; }
#publish-review .review-steps .is-complete { color:#93cbb8; border-color:#4eaa8b; }
#publish-review .review-progress { width:100%; height:6px; display:block; accent-color:#719eff; border:0; border-radius:4px; overflow:hidden; }
@media(max-width:700px) {
    #publish-review .review-body { grid-template-columns:1fr; gap:24px; }
    #publish-review .review-settings { border-left:0; padding-left:0; border-top:1px solid #303c4a; padding-top:22px; }
    #publish-review .review-header,#publish-review .review-body,#publish-review .review-footer { padding:20px; }
    #publish-review .review-footer-row { align-items:stretch; flex-direction:column; gap:14px; }
    #publish-review .review-actions button { flex:1; }
    #publish-review .review-header h2 { font-size:22px; }
    #publish-review .review-steps { font-size:11px; }
}
