/* 3D工厂虚拟参观 - 主样式文件 */

/* CSS变量定义 */
:root {
    --primary-color: #009b84;
    --secondary-color: #00c4a7;
    --accent-color: #ff6b35;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #ffffff;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: rgba(0, 0, 0, 0.8);
    --bg-overlay: rgba(0, 0, 0, 0.5);
    --border-color: #e0e0e0;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.2);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --z-loading: 9999;
    --z-modal: 9998;
    --z-panel: 1000;
    --z-controls: 999;
    --z-navigation: 998;
}
.arrow{
    background-color: #ff6b35;
    font-weight: bold;
}
/* 基础重置和全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-secondary);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 主容器 */
#factory-vr-tour {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* VR容器 */
.vr-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

.pano-viewer {
    width: 100%;
    height: 100%;
    background: url('../assets/images/icon_loading.gif') center center no-repeat #f5f5f5;
}

/* 加载进度条 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loading);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-container {
    text-align: center;
    color: var(--text-light);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--text-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
}

.loading-progress {
    width: 300px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--text-light);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 14px;
    opacity: 0.9;
}

/* 兼容性警告 */
.compatibility-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.compatibility-warning.hidden {
    display: none;
}

.warning-content {
    background: var(--bg-primary);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    max-width: 500px;
    text-align: center;
}

.warning-content h3 {
    color: var(--accent-color);
    font-size: 24px;
    margin-bottom: 20px;
}

.warning-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.warning-content ul {
    text-align: left;
    margin: 20px 0;
    padding-left: 20px;
}

.warning-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* 访客统计 */
.visitor-stats {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 12px 16px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: var(--z-controls);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.visitor-stats:hover {
    background: rgba(0, 0, 0, 0.9);
}

.stats-icon {
    font-size: 18px;
}

.stats-text {
    font-size: 14px;
    font-weight: 500;
}

.stats-count {
    color: var(--secondary-color);
    font-weight: 600;
}

/* 公司Logo */
.company-logo {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
    z-index: var(--z-controls);
    transition: var(--transition);
    cursor: pointer;
}

.company-logo.hidden {
    opacity: 0;
    visibility: hidden;
}

.company-logo img {
    max-width: 200px;
    max-height: 100px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transition: var(--transition);
}

.company-logo:hover img {
    transform: scale(1.05);
}

/* 控制面板 */
.control-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: var(--z-controls);
}

.control-btn {
    width: 48px;
    height: 48px;
    background: var(--bg-dark);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-medium);
}

.control-btn:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn .icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* 导航面板 */
.navigation-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    backdrop-filter: blur(10px);
    z-index: var(--z-navigation);
    transition: transform 0.3s ease;
}

.navigation-panel.collapsed {
    transform: translateY(calc(100% - 60px));
}

.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.nav-title {
    color: var(--text-light);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.nav-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-toggle .icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.navigation-panel.collapsed .nav-toggle .icon {
    transform: rotate(180deg);
}

.nav-content {
    padding: 20px;
    max-height: 200px;
    overflow: hidden;
}

.nav-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.nav-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.nav-scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.nav-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.nav-items {
    display: flex;
    gap: 15px;
    padding-bottom: 10px;
}

.nav-item {
    flex: 0 0 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.nav-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.nav-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 155, 132, 0.3);
}

.nav-item-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.nav-item-content {
    padding: 10px;
}

.nav-item-title {
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 模态框通用样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.modal-close .icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

/* 询盘表单样式 */
.inquiry-form {
    width: 500px;
    max-width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 155, 132, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* 按钮样式 */
.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--text-secondary);
    color: var(--text-light);
}

/* 帮助信息样式 */
.help-section {
    margin-bottom: 30px;
}

.help-section h4 {
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.help-section ul {
    list-style: none;
    padding: 0;
}

.help-section li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.help-section li:last-child {
    border-bottom: none;
}

.help-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .visitor-stats {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .control-panel {
        top: 10px;
        right: 10px;
        gap: 8px;
    }
    
    .control-btn {
        width: 44px;
        height: 44px;
    }
    
    .control-btn .icon {
        width: 20px;
        height: 20px;
    }
    
    .nav-header {
        padding: 12px 15px;
    }
    
    .nav-title {
        font-size: 14px;
    }
    
    .nav-content {
        padding: 15px;
        max-height: 150px;
    }
    
    .nav-item {
        flex: 0 0 100px;
    }
    
    .nav-item-image {
        height: 60px;
    }
    
    .nav-item-content {
        padding: 8px;
    }
    
    .nav-item-title {
        font-size: 11px;
    }
    
    .nav-item-subtitle {
        font-size: 9px;
    }
    
    .modal-content {
        margin: 20px;
        max-width: calc(100vw - 40px);
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .inquiry-form {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .company-logo img {
        max-width: 150px;
        max-height: 75px;
    }
    
    .loading-container {
        padding: 20px;
    }
    
    .loading-progress {
        width: 250px;
    }
    
    .warning-content {
        margin: 20px;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .nav-item {
        flex: 0 0 80px;
    }
    
    .nav-item-image {
        height: 50px;
    }
    
    .nav-item-title {
        font-size: 10px;
    }
    
    .nav-item-subtitle {
        font-size: 8px;
    }
    
    .loading-progress {
        width: 200px;
    }
    
    .loading-text {
        font-size: 16px;
    }
}

/* 工具类 */
.hidden {
    display: none !important;
}

.invisible {
    opacity: 0;
    visibility: hidden;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

