/* 沉浸模式样式 - 重构版 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #0051CF;
    --primary-dark: #003a92;
    --primary-light: #3374d8;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 
                 'Microsoft YaHei', sans-serif;
    background: #000;
    color: white;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== 主容器 ========== */
.immersive-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #000;
}

/* 背景层（用于显示当前卡片背景） */
.background-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.8s ease, background-color 0.8s ease;
}

/* 顶部暗角遮罩（只作用于背景层） */
.background-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

/* 底部暗角遮罩（只作用于背景层） */
.background-layer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25rem;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

/* ========== 顶部输入区域 ========== */
.top-input-area {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    width: auto;
    max-width: 600px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-input-area.active {
    width: 90%;
}

/* ========== 右上角更多菜单 ========== */
.top-right-menu {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 200;
}

.more-menu-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.more-menu-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.more-menu-btn.active {
    background: rgba(0, 81, 207, 0.5);
    border-color: rgba(0, 81, 207, 0.7);
}

.more-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* 侧边菜单面板 */
.side-menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    padding-top: 5rem;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 190;
}

.side-menu-panel.open {
    transform: translateX(0);
}

.menu-section {
    margin-bottom: 2rem;
}

.menu-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.menu-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.menu-select:hover {
    background: rgba(255, 255, 255, 0.15);
}

.menu-select option {
    background: #1a1a1e;
    color: white;
}

.menu-tabs {
    display: flex;
    gap: 0.5rem;
}

.menu-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.menu-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.menu-tab.active {
    background: rgba(0, 81, 207, 0.5);
    border-color: rgba(0, 81, 207, 0.7);
    color: white;
}

.menu-action-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.menu-action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.menu-action-btn svg {
    width: 20px;
    height: 20px;
}

/* ========== 卡片视窗 ========== */
.cards-viewport {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    padding-bottom: 3rem;
    padding-top: 8rem; /* 为顶部输入区域留出空间 */
    transition: opacity 0.6s ease, filter 0.6s ease;
    z-index: 10;
}

.cards-viewport.hidden {
    opacity: 0;
    pointer-events: none;
}

.cards-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== 卡片样式 ========== */
.scene-card {
    position: absolute;
    bottom: 0;
    width: 400px;
    min-height: 200px;
    background: rgba(20, 20, 30, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    will-change: transform, width, opacity;
}

/* 预览模式（未选中） - 只显示图片，缩小卡片 */
.scene-card.preview {
    opacity: 0.5;
    transform: scale(0.65);
    width: 320px;
    min-height: 180px;
    background: transparent;
    border: none;
}

.scene-card.preview:hover {
    opacity: 0.8;
    transform: scale(0.75);
}

/* 预览模式（选中但未展开） - 放大显示，更宽 */
.scene-card.selected {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
    width: 550px;
    min-height: 320px;
}

/* 场景选中态（完全展开） */
.scene-card.expanded {
    width: 800px;
    min-height: 600px;
    max-height: 80vh;
    opacity: 1;
    transform: scale(1);
    z-index: 20;
    cursor: default;
}

/* 卡片背景图 */
.card-background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.6s ease;
}

/* 生成中状态隐藏背景图，显示渐变动画 */
.scene-card.generating .card-background {
    opacity: 0;
}

.scene-card.expanded .card-background {
    opacity: 0.3;
}

/* 卡片遮罩层（让文字更清晰） */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0) 0%, 
        rgba(0, 0, 0, 0.3) 40%, 
        rgba(0, 0, 0, 0.7) 70%, 
        rgba(0, 0, 0, 0.85) 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

/* 选中态显示遮罩 */
.scene-card.selected .card-overlay {
    opacity: 1;
}

/* 展开态加强遮罩 */
.scene-card.expanded .card-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
}

/* 轮播进度条 */
.card-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-progress-bar-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.35);
    width: 0%;
    transition: none;
}

/* 选中态且轮播激活时显示进度条 */
.scene-card.selected.autoplay-active .card-progress-bar {
    opacity: 1;
}

/* 卡片内容 */
.card-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
    transition: all 0.6s ease;
}

/* 预览模式（未选中） - 隐藏所有文字 */
.scene-card.preview .card-content {
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

/* 预览模式（选中） - 标题和描述显示在左下角 */
.scene-card.selected .card-content {
    padding: 2rem;
    justify-content: flex-end;
    gap: 0.5rem;
}

.card-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    transition: all 0.6s ease;
}

/* 预览模式（未选中）隐藏标题 */
.scene-card.preview .card-title {
    opacity: 0;
    display: none;
}

/* 预览模式（选中）标题放在左下角，较大文本 */
.scene-card.selected .card-title {
    font-size: 2rem;
    text-align: left;
}

.card-description {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.6s ease;
}

/* 预览模式（选中）描述放在左下角，较小文本 */
.scene-card.selected .card-description {
    opacity: 1;
    max-height: 200px;
    font-size: 0.95rem;
    text-align: left;
}

.scene-card.expanded .card-description {
    opacity: 1;
    max-height: none;
}

/* 色彩氛围 - 已隐藏 */
.card-colors {
    display: none !important;
}

.color-dot {
    display: none !important;
}

/* Markdown内容区域（仅展开态显示） */
.card-markdown {
    flex: 1;
    opacity: 0;
    max-height: 0;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    transition: all 0.6s ease;
}

.scene-card.expanded .card-markdown {
    opacity: 1;
    max-height: 400px;
}

.card-markdown h1,
.card-markdown h2,
.card-markdown h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.card-markdown h1 { font-size: 1.5rem; }
.card-markdown h2 { font-size: 1.25rem; }
.card-markdown h3 { font-size: 1.1rem; }

.card-markdown p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.card-markdown ul,
.card-markdown ol {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.card-markdown li {
    margin-bottom: 0.25rem;
}

.card-markdown code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* 自定义滚动条 */
.card-markdown::-webkit-scrollbar {
    width: 6px;
}

.card-markdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.card-markdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* CTA按钮容器（选中态） */
.card-cta-buttons {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.6s ease;
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.scene-card.selected .card-cta-buttons {
    opacity: 1;
    max-height: 60px;
}

.scene-card.expanded .card-cta-buttons {
    opacity: 0;
    max-height: 0;
}

/* 详情按钮（浅色） */
.detail-button {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.detail-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* 执行按钮（主题色） */
.execute-button {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.execute-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.execute-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 旧的进入按钮（保留但隐藏） */
.card-enter-btn {
    display: none;
}

/* 返回按钮（展开态） */
.card-back-btn {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.6s ease;
}

.scene-card.expanded .card-back-btn {
    opacity: 1;
    max-height: 50px;
}

.back-button {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ========== AI生成卡片状态 ========== */
.scene-card.generating {
    pointer-events: none;
}

.generating-indicator {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 5;
}

.generating-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.generating-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* 渐变背景（生成中） */
.card-gradient-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--gradient-start, #4A90E2) 0%,
        var(--gradient-mid, #50E3C2) 50%,
        var(--gradient-end, #F5A623) 100%
    );
    background-size: 200% 200%;
    animation: gradientFlow 8s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.scene-card.generating .card-gradient-bg {
    opacity: 1;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    height: 56px;
    width: auto;
    min-width: 260px;
}

.input-wrapper:hover {
    background: rgba(255, 255, 255, 0.18);
}

.input-wrapper.active {
    width: 100%;
    cursor: default;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.main-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper.active .main-input {
    text-align: left;
}

.main-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.back-icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.back-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.send-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.send-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* ========== 背景模糊层 ========== */
.blur-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 150;
    animation: fadeIn 0.3s ease;
    transition: background 0.8s ease;
}

/* 背景渐变动画 */
.blur-overlay.gradient-animated {
    background: linear-gradient(
        135deg,
        var(--gradient-start, #4A90E2) 0%,
        var(--gradient-mid, #50E3C2) 50%,
        var(--gradient-end, #F5A623) 100%
    );
    background-size: 200% 200%;
    animation: gradientFlow 8s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========== 推荐问题（跟随输入框下方） ========== */
.recommendations-bottom {
    position: fixed;
    top: 7rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    z-index: 210;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: slideDown 0.4s ease;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.recommendation-item {
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    overflow: hidden;
    position: relative;
}

.recommendation-item:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 英文推荐问题的跑马灯效果 */
.recommendation-item.marquee {
    white-space: nowrap;
}

.recommendation-item.marquee .marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 15s linear infinite;
}

.recommendation-item.marquee:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 换一换按钮 */
.refresh-recommendations-btn {
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.refresh-recommendations-btn:hover {
    color: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.refresh-recommendations-btn svg {
    transition: transform 0.3s ease;
}

.refresh-recommendations-btn:hover svg {
    transform: rotate(180deg);
}

/* ========== AI气泡区域 ========== */
.ai-bubble-container {
    position: fixed;
    top: 7rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    max-height: calc(100vh - 10rem);
    overflow-y: auto;
    z-index: 210;
    animation: slideDown 0.4s ease;
}

.ai-bubble {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.ai-bubble-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.atmosphere-container {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    overflow: hidden;
}

.atmosphere-placeholder {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 渐变动画效果（参考chat.css） */
.atmosphere-placeholder.gradient-animated {
    background: linear-gradient(
        135deg,
        var(--gradient-start, #4A90E2) 0%,
        var(--gradient-mid, #50E3C2) 50%,
        var(--gradient-end, #F5A623) 100%
    );
    background-size: 200% 200%;
    animation: gradientFlow 8s ease-in-out infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.atmosphere-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.atmosphere-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.6s ease;
}

.ai-bubble-content {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.8;
}

.ai-bubble-content h1,
.ai-bubble-content h2,
.ai-bubble-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: white;
}

.ai-bubble-content h1 { font-size: 1.5rem; }
.ai-bubble-content h2 { font-size: 1.25rem; }
.ai-bubble-content h3 { font-size: 1.1rem; }

.ai-bubble-content p {
    margin-bottom: 1rem;
}

.ai-bubble-content ul,
.ai-bubble-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.ai-bubble-content li {
    margin-bottom: 0.5rem;
}

.ai-bubble-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* 自定义滚动条 */
.ai-bubble-container::-webkit-scrollbar {
    width: 6px;
}

.ai-bubble-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.ai-bubble-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* ========== 加载动画 ========== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading p {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

/* ========== Toast提示 ========== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
    max-width: 400px;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.15);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.15);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .exit-immersive-btn {
        top: 1rem;
        left: 1rem;
        padding: 0.625rem 1rem;
    }

    .exit-immersive-btn span {
        display: none;
    }

    .side-tabs {
        left: 1rem;
    }

    .side-tab {
        width: 48px;
        height: 48px;
    }

    .scene-card {
        width: 90%;
        max-width: 350px;
    }

    .scene-card.expanded {
        width: 95%;
        max-width: 95%;
        min-height: 80vh;
    }

    .bottom-input-area {
        width: 95%;
        bottom: 2rem;
    }

    .card-title {
        font-size: 1.5rem;
    }

    .scene-card.preview .card-title {
        font-size: 1.125rem;
    }
}
