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

:root {
    --primary-color: #e31837;
    --primary-hover: #c41230;
    --background-color: #f8d9d9;
    --text-color: #1a1a1a;
    --text-secondary: #666;
    --shadow-color: rgba(227, 24, 55, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
    padding: 40px 0;
}

header {
    text-align: center;
    margin-bottom: 1rem;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.site-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 1rem auto;
    line-height: 1.6;
    display: block;
    opacity: 1;
    position: relative;
    z-index: 5;
}

.divider {
    width: 60px;
    height: 4px;
    background-color: #e31837 !important;
    margin: 1rem auto;
    border-radius: 2px;
    display: block;
    opacity: 1;
    z-index: 10;
    position: relative;
}

.gallery-container {
    width: 100%;
    max-width: 1600px;
    margin: 2rem auto 0;
    position: relative;
    height: 555px;
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow-color);
    z-index: 1;
}

#thumbnails-grid {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.thumbnail-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-item.active {
    opacity: 1;
    z-index: 2;
}

.thumbnail-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.indicators-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    padding: 20px 0 20px 40px;
}

/* 指示器样式 */
.indicators {
    display: flex;
    flex-direction: row;
    gap: 8px;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    width: 24px;
    border-radius: 4px;
    background: var(--primary-color);
}

/* 箭头按钮样式 */
.arrow-button {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 80px;
    cursor: pointer;
    z-index: 100;
    padding: 0 20px;
    margin: 0 -20px;
    background: transparent;
}

.arrow-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transition: all 0.5s ease;
    border-radius: 2px;
    opacity: 1;
}

.arrow-prev {
    left: 80px;
}

.arrow-next {
    right: 80px;
}

.arrow-prev:hover::before {
    transform: translate(0, 0);
    animation: waveLeft 2s ease-in-out infinite;
}

.arrow-next:hover::before {
    transform: translate(0, 0);
    animation: waveRight 2s ease-in-out infinite;
}

@keyframes waveLeft {
    0%, 100% {
        transform: translate(0, 0);
        border-radius: 2px;
    }
    50% {
        transform: translate(-15px, 0);
        border-radius: 12px 2px 2px 12px;
    }
}

@keyframes waveRight {
    0%, 100% {
        transform: translate(0, 0);
        border-radius: 2px;
    }
    50% {
        transform: translate(15px, 0);
        border-radius: 2px 12px 12px 2px;
    }
}

/* 全景图查看器样式 */
#panorama-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
}

#panorama-viewer.hidden {
    display: none;
}

#panorama-container {
    width: 100%;
    height: 100%;
}

#close-viewer {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#close-viewer:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 美化滚动条 */
.gallery-container::-webkit-scrollbar {
    height: 8px;
}

.gallery-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.gallery-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.gallery-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 添加响应式设计 */
@media (max-width: 1700px) {
    .gallery-container {
        max-width: 90%;
        height: 470px;
        margin: 2rem auto 3rem;
    }
    
    .indicators-container {
        padding: 20px 20px;
    }
    
    .arrow-button {
        height: 60px;
    }
    
    .arrow-prev {
        left: 40px;
    }
    
    .arrow-next {
        right: 40px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 20px 0;
    }
    
    .site-title {
        font-size: 2rem;
    }
    
    .site-description {
        font-size: 1.1rem;
        padding: 0 20px;
    }
    
    .gallery-container {
        height: 280px;
        margin: 1.5rem auto 2.5rem;
    }
    
    .indicators-container {
        padding: 20px 10px;
    }
    
    .arrow-button {
        height: 40px;
    }
    
    .arrow-prev {
        left: -30px;
    }
    
    .arrow-next {
        right: -30px;
    }
}

/* 聊天按钮样式 */
.chat-button {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
    transform: none !important;
    width: 50px !important;
    height: 50px !important;
    background: var(--primary-color) !important;
    border-radius: 25px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    z-index: 1000 !important;
    box-shadow: 0 4px 12px rgba(227, 24, 55, 0.15) !important;
}

.chat-button:hover,
.chat-button.active {
    width: 240px !important;
    border-radius: 25px !important;
    background: var(--primary-hover) !important;
}

.icon-container {
    position: relative !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.chat-button.active .icon-container {
    position: absolute !important;
    right: 13px !important;
}

.chat-button .icon {
    width: 24px !important;
    height: 24px !important;
    fill: white !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease !important;
}

.chat-button .send-icon {
    position: absolute;
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
    transition: all 0.3s ease;
}

.chat-button .chat-icon {
    position: absolute;
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

.chat-button.has-content .chat-icon {
    opacity: 0;
    transform: scale(0.5) rotate(45deg);
    pointer-events: none;
}

.chat-button.has-content .send-icon {
    opacity: 1;
    transform: scale(1) rotate(0);
    pointer-events: auto;
}

.chat-input {
    position: absolute;
    left: 15px;
    width: calc(100% - 50px);
    height: 30px;
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    outline: none;
    padding: 5px 0;
    caret-color: white;
}

/* 添加占位符效果 */
.chat-input:empty::before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

/* 输入框激活状态 */
.chat-button.active .chat-input {
    opacity: 1;
}

/* 闪烁光标效果 */
.chat-input:focus {
    outline: none;
}

.chat-button.active .icon-container {
    margin-left: auto;
}

/* 消息样式 */
.chat-messages {
    position: absolute;
    bottom: 100%;
    right: 0;
    left: auto;
    transform: none;
    width: 240px;
    margin-bottom: 10px;
    display: none;
    flex-direction: column;
    gap: 8px;
}

.chat-button.active .chat-messages {
    display: flex;
}

.message {
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
    font-size: 14px;
    animation: fadeIn 0.3s ease;
}

.message.user {
    margin-left: auto;
    background: var(--primary-color);
    color: white;
    border-radius: 12px 12px 0 12px;
}

.message.bot {
    margin-right: auto;
    background: white;
    color: var(--text-color);
    border-radius: 12px 12px 12px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    max-width: 280px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 复制按钮样式 */
.copy-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--primary-hover);
}

.copy-btn.copied {
    background: #4CAF50;
}

/* 加载动画样式 */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(227, 24, 55, 0.1);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 4px 0;
}

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

.message.bot .loading-spinner {
    margin: 4px auto;
    display: block;
}

/* 隐藏加载动画 */
.loading-spinner.hidden {
    display: none;
}

/* 消息内摄像头样式 */
.message-camera-wrapper {
    position: relative;
    width: 240px;
    height: 180px;
    margin: 8px -8px -4px -8px;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.message-camera {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.message-camera-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    text-align: center;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.message-camera-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.message-camera-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* 移除旧的全屏摄像头样式 */
.camera-container,
.camera-wrapper,
.camera-overlay,
.close-camera {
    display: none;
} 