/**
 * 全局样式 - 崖城风骨
 * 国赛级多页面Web作品
 */

/* ===== CSS变量定义 ===== */
:root {
    /* 主色调 */
    --color-rock: #2D2D2D;
    --color-rock-light: #3D3D3D;
    --color-ochre: #8B4513;
    --color-ochre-light: #A0522D;
    --color-river: #2F5D7A;
    --color-river-light: #4A7A9A;
    --color-paper: #F5F0E8;
    --color-paper-dark: #E8E0D0;
    --color-gold: #C9A961;
    --color-gold-light: #D4B872;
    --color-ink: #1A1A1A;
    --color-stone: #6B6B6B;
    --color-white: #FFFFFF;
    
    /* 辅助色 */
    --color-wood: #8B7355;
    --color-stone-blue: #4A5568;
    
    /* 字体 */
    --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', serif;
    --font-sans: 'Noto Sans SC', 'Source Han Sans SC', 'Microsoft YaHei', sans-serif;
    
    /* 间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.25);
    
    /* 过渡 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* 字体大小 */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
}

/* ===== 重置样式 ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--color-ink);
    background-color: var(--color-paper);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ===== 滚动条样式 ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-paper);
}

::-webkit-scrollbar-thumb {
    background: var(--color-ochre);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-ochre-light);
}

/* ===== 选中文字样式 ===== */
::selection {
    background: rgba(139, 69, 19, 0.3);
    color: var(--color-ink);
}

/* ===== 全局导航 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: transparent;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(245, 240, 232, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 0.1em;
    transition: color var(--transition-normal);
}

.navbar.scrolled .nav-logo {
    color: var(--color-ochre);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    position: relative;
    font-size: var(--text-sm);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0;
    transition: color var(--transition-normal);
}

.navbar.scrolled .nav-link {
    color: var(--color-ink);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-gold);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-gold);
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
    color: var(--color-ochre);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--color-white);
    transition: all var(--transition-normal);
}

.navbar.scrolled .nav-toggle span {
    background: var(--color-ink);
}

/* ===== 全局控件 ===== */
.global-controls {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 998;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.control-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.control-btn svg {
    width: 20px;
    height: 20px;
    color: var(--color-ochre);
}

.control-btn img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
}

/* 智能体浮窗按钮 - 无背景框，放大显示 */
#assistant-toggle {
    position: fixed;
    bottom: 9rem;
    right: 2rem;
    z-index: 999;
    background: transparent;
    box-shadow: none;
    width: auto;
    height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    cursor: grab;
    transition: none;
    display: block;
}

#assistant-toggle img {
    width: 190px;
    height: 190px;
    border-radius: 0;
    transition: transform var(--transition-normal);
    pointer-events: none;
}

#assistant-toggle:hover {
    transform: scale(1.1);
    box-shadow: none;
}

#assistant-toggle:hover img {
    transform: scale(1.0);
}

/* 智能助手图标拖拽效果 */
#assistant-toggle.dragging {
    cursor: grabbing;
    opacity: 0.8;
    transform: scale(1.15);
    z-index: 1000;
    transition: none;
}

#assistant-toggle.draggable {
    cursor: grab;
}

#assistant-toggle.draggable:active {
    cursor: grabbing;
}

.control-btn.playing svg {
    color: var(--color-river);
}

/* ===== 音频控制面板 ===== */
.audio-control-wrapper {
    position: relative;
}

.audio-panel {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    width: 260px;
    background: var(--color-paper);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    z-index: 1000;
}

.audio-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.audio-panel::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--color-paper);
}

.audio-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.audio-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-ink);
}

.audio-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-ochre);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.audio-play-btn:hover {
    background: var(--color-earth);
    transform: scale(1.05);
}

.audio-play-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

.audio-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.audio-time {
    font-size: 11px;
    color: var(--color-stone);
    min-width: 32px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.audio-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--color-ochre), var(--color-gold));
    border-radius: 2px;
    width: 0;
    transition: width 0.1s linear;
}

.audio-progress-bar:hover .progress-fill {
    background: linear-gradient(to right, var(--color-earth), var(--color-ochre));
}

.audio-volume-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-icon {
    width: 16px;
    height: 16px;
    color: var(--color-stone);
    flex-shrink: 0;
}

.volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    cursor: pointer;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--color-ochre);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--color-earth);
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--color-ochre);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

.volume-slider::-moz-range-thumb:hover {
    background: var(--color-earth);
    transform: scale(1.2);
}

/* ===== 页面进度条 ===== */
.page-progress {
    position: fixed;
    left: 0;
    top: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom, var(--color-ochre), var(--color-gold));
    z-index: 1001;
    transition: height 0.1s linear;
}

/* ===== 弹窗样式 ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 700px;
    max-height: 85vh;
    margin: 1rem;
    padding: 2.5rem;
    background: var(--color-paper);
    border-radius: var(--radius-lg);
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-stone);
    background: transparent;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--color-ochre);
    background: var(--color-paper-dark);
}

/* ===== 引导蒙层 ===== */
.guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.guide-overlay.active {
    opacity: 1;
    visibility: visible;
}

.guide-content {
    max-width: 520px;
    padding: 3rem;
    background: var(--color-paper);
    border-radius: var(--radius-lg);
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-xl);
}

.guide-overlay.active .guide-content {
    transform: scale(1) translateY(0);
}

.guide-logo {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-ochre);
    margin-bottom: 1rem;
    letter-spacing: 0.15em;
}

.guide-content h3 {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    color: var(--color-ink);
    margin-bottom: 0.5rem;
}

.guide-subtitle {
    color: var(--color-stone);
    margin-bottom: 2rem;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: left;
}

.guide-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(139, 69, 19, 0.08);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.guide-step:hover {
    transform: translateX(5px);
    background: rgba(139, 69, 19, 0.12);
}

.step-num {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-ochre);
    color: var(--color-white);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== 按钮样式 ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 1rem 2.5rem;
    background: var(--color-ochre);
    color: var(--color-white);
    font-size: var(--text-base);
    font-weight: 500;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--color-ochre-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--color-ochre);
    font-size: var(--text-base);
    font-weight: 500;
    border: 2px solid var(--color-ochre);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.btn-outline:hover {
    background: var(--color-ochre);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* ===== 动画 ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(201, 169, 97, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(201, 169, 97, 0.2);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===== 智能信息查询助手 ===== */
.assistant-float {
    position: fixed;
    top: 100px;
    right: 100px;
    width: 420px;
    max-width: calc(100% - 20px);
    height: 500px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    resize: both;
    min-width: 320px;
    min-height: 400px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* 拖拽状态样式 */
.assistant-float.dragging {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
    z-index: 10000;
}

.assistant-float.dragging .assistant-header {
    cursor: grabbing;
}

.assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--color-ochre), var(--color-ochre-light));
    color: var(--color-white);
    cursor: move;
}

.assistant-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    font-weight: 600;
}

.assistant-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    vertical-align: middle;
}

.assistant-controls {
    display: flex;
    gap: 0.5rem;
}

.assistant-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: var(--color-white);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.assistant-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.assistant-btn svg {
    width: 16px;
    height: 16px;
}

.assistant-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.assistant-search {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--color-paper-dark);
}

.assistant-search input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-paper-dark);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    transition: border-color var(--transition-fast);
}

.assistant-search input:focus {
    outline: none;
    border-color: var(--color-ochre);
}

.assistant-search button {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-ochre);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-white);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.assistant-search button:hover {
    background: var(--color-ochre-light);
    transform: scale(1.05);
}

.assistant-search button svg {
    width: 18px;
    height: 18px;
}

.assistant-categories {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-paper-dark);
    overflow-x: auto;
}

.category-btn {
    padding: 0.5rem 1rem;
    background: var(--color-paper);
    border: none;
    border-radius: 50px;
    font-size: var(--text-sm);
    color: var(--color-stone);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.category-btn:hover {
    background: rgba(139, 69, 19, 0.1);
    color: var(--color-ochre);
}

.category-btn.active {
    background: var(--color-ochre);
    color: var(--color-white);
}

.assistant-results {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.results-loading,
.results-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--color-stone);
}

.results-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-paper-dark);
    border-top-color: var(--color-ochre);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    padding: 1rem;
    background: var(--color-paper);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.result-item:hover {
    background: rgba(139, 69, 19, 0.08);
    transform: translateX(5px);
}

.result-item h4 {
    font-family: var(--font-serif);
    font-size: var(--text-base);
    color: var(--color-ochre);
    margin-bottom: 0.5rem;
}

.result-item p {
    font-size: var(--text-sm);
    color: var(--color-stone);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-item .result-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: var(--text-xs);
    color: var(--color-stone);
}

.result-item .result-category {
    padding: 0.25rem 0.75rem;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 50px;
    color: var(--color-ochre);
}

.result-detail {
    padding: 1rem;
    background: var(--color-paper);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
    display: none;
}

.result-detail.active {
    display: block;
}

.result-detail h5 {
    font-family: var(--font-serif);
    font-size: var(--text-base);
    color: var(--color-ink);
    margin-bottom: 0.75rem;
}

.result-detail p {
    font-size: var(--text-sm);
    color: var(--color-stone);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.result-detail .detail-list {
    margin-left: 1.25rem;
    list-style-type: disc;
}

.result-detail .detail-list li {
    font-size: var(--text-sm);
    color: var(--color-stone);
    line-height: 1.6;
    margin-bottom: 0.25rem;
}

.assistant-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--color-paper-dark);
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: var(--color-paper);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    color: var(--color-stone);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--color-ochre);
    color: var(--color-white);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: var(--color-ochre);
    color: var(--color-white);
}

.pagination-info {
    font-size: var(--text-sm);
    color: var(--color-stone);
    margin-right: 0.5rem;
}

.assistant-badge {
    padding: 0.125rem 0.5rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: var(--text-xs);
    font-weight: 500;
}

/* AI聊天区域 */
.assistant-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(180deg, #faf8f5 0%, #f5f2ed 100%);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    max-width: 90%;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message.ai {
    align-self: flex-start;
}

.message-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.message-avatar .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-message.user .message-avatar {
    background: linear-gradient(135deg, var(--color-ochre), var(--color-ochre-light));
}

.chat-message.ai .message-avatar {
    background: linear-gradient(135deg, #4a90a4, #6ab0c4);
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.message-header {
    font-size: var(--text-xs);
    color: var(--color-stone);
    font-weight: 500;
}

.message-body {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    line-height: 1.7;
    word-wrap: break-word;
}

.chat-message.user .message-body {
    background: linear-gradient(135deg, var(--color-ochre), var(--color-ochre-light));
    color: var(--color-white);
    border-bottom-right-radius: 4px;
}

.chat-message.ai .message-body {
    background: var(--color-white);
    color: var(--color-ink);
    border: 1px solid var(--color-paper-dark);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 加载动画 */
.chat-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin: 0 1rem;
    background: var(--color-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-paper-dark);
    font-size: var(--text-sm);
    color: var(--color-stone);
}

.loading-dots {
    display: flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--color-ochre);
    border-radius: 50%;
    animation: dot-pulse 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dot-pulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 快捷问题 */
.quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--color-paper-dark);
    background: var(--color-white);
}

.quick-btn {
    padding: 0.5rem 0.875rem;
    background: var(--color-paper);
    border: 1px solid var(--color-paper-dark);
    border-radius: 50px;
    font-size: var(--text-xs);
    color: var(--color-stone);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.quick-btn:hover {
    background: var(--color-ochre);
    border-color: var(--color-ochre);
    color: var(--color-white);
    transform: translateY(-1px);
}

/* 输入区域 */
.assistant-input-area {
    padding: 1rem;
    background: var(--color-white);
    border-top: 1px solid var(--color-paper-dark);
}

.assistant-input-area .assistant-search {
    display: flex;
    gap: 0.5rem;
}

.assistant-input-area .assistant-search input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid var(--color-paper-dark);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
    background: var(--color-paper);
}

.assistant-input-area .assistant-search input:focus {
    outline: none;
    border-color: var(--color-ochre);
    background: var(--color-white);
}

.assistant-input-area .assistant-search button {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-ochre), var(--color-ochre-light));
    border: none;
    border-radius: var(--radius-lg);
    color: var(--color-white);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
}

.assistant-input-area .assistant-search button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
}

.assistant-input-area .assistant-search button svg {
    width: 20px;
    height: 20px;
}

/* 滚动条样式 */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--color-paper-dark);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--color-stone);
}

.assistant-resize {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 12px;
    height: 12px;
    background: var(--color-paper-dark);
    cursor: se-resize;
    border-radius: 0 0 var(--radius-lg) 0;
}

/* ===== 页脚样式 ===== */
.footer {
    background: var(--color-rock);
    color: var(--color-white);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    color: var(--color-gold);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section li {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-section a {
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--color-gold);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.6);
    margin: 0.25rem 0;
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        background: rgba(245, 240, 232, 0.98);
        backdrop-filter: blur(10px);
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        color: var(--color-ink) !important;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .global-controls {
        bottom: 1rem;
        right: 1rem;
    }
    
    #assistant-toggle {
        bottom: 8rem;
        right: 1rem;
    }
    
    .guide-content {
        padding: 2rem;
        margin: 1rem;
    }
    
    .guide-logo {
        font-size: 2rem;
    }
    
    .footer {
        padding: 3rem 1rem 1.5rem;
    }
}

