/* 移动端竖屏界面样式 */

/* Capacitor 安全区域适配 */
:root {
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-right: env(safe-area-inset-right, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-inset-left: env(safe-area-inset-left, 0px);
    
    /* 角色主题颜色变量 */
    --theme-bg-color: #ffffff; /* 默认白色（龙马） */
    --theme-text-color: #333333;
    --theme-text-secondary: #666666;
    --theme-bg-image: url('../assets/image/hoshino.png'); /* 默认背景图片 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--theme-bg-color);
    /* background-image: var(--theme-bg-image); */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    transition: background-color 0.5s ease, background-image 0.5s ease;
}

/* 星野爱主题（黑色 + 背景图） */
body.theme-hoshino {
    --theme-bg-color: #000000;
    --theme-text-color: #ffffff;
    --theme-text-secondary: #cccccc;
    --theme-bg-image: url('../assets/image/hoshino.png');
}

/* 龙马王子主题（白色 + 背景图） */
body.theme-ryoma {
    --theme-bg-color: #ffffff;
    --theme-text-color: #333333;
    --theme-text-secondary: #666666;
    --theme-bg-image: url('../assets/image/ryoma.png');
}

/* 展会模式下body适配 */
body.exhibition-mode {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 视频背景 */
.video-background {
    position: fixed;
    top: 120px;
    left: 0;
    width: 100%;
    height: calc(100% - 120px);
    z-index: -2;
    overflow: hidden;
}

/* 双video切换 - 基础样式 */
.video-background .bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(1);
    opacity: 0;
    /* 完全禁用过渡效果 */
    transition: none !important;
    transform: none !important;
    animation: none !important;
    z-index: 0;
}

/* 当前显示的video */
.video-background .bg-video.active {
    opacity: 1;
    z-index: 1;
    /* 确保无过渡 */
    transition: none !important;
    transform: none !important;
    animation: none !important;
}

/* 兼容旧的选择器（如果有其他地方引用） */
/*.video-background video {*/
/*    position: absolute;*/
/*    top: 0;*/
/*    left: 0;*/
/*    width: 100%;*/
/*    height: 100%;*/
/*    object-fit: cover;*/
/*    object-position: center;*/
/*}*/

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 透明蒙版，不影响视频显示 */
    background: transparent;
}

.app {
    width: 100vw;
    width: 100dvw; /* 动态视口宽度，避免地址栏影响 */
    height: 100vh;
    height: 100dvh; /* 动态视口高度，避免地址栏影响 */
    min-height: 100vh;
    min-height: -webkit-fill-available; /* iOS Safari 支持 */
    position: relative;
    display: flex;
    flex-direction: column;
    z-index: 1;
    overflow: hidden;
    /* 确保展会模式下容器正确显示 */
    transition: width 0.3s ease, height 0.3s ease, max-width 0.3s ease, max-height 0.3s ease;
}

/* 设置面板 */
.settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 5, 20, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: none;
}

.settings-panel.active {
    transform: translateY(0);
    display: block;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-header h3 {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
}

.close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.settings-content {
    padding: 1.5rem;
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.setting-item input[type="text"],
.setting-item input[type="url"],
.setting-item select {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

.setting-item input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

/* Session ID显示 */
.session-id-display {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.session-id-input {
    flex: 1;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    cursor: text;
}

.session-id-input:focus {
    outline: none;
    border-color: rgba(255, 107, 157, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.copy-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: rgba(255, 107, 157, 0.2);
    border-color: rgba(255, 107, 157, 0.4);
    color: white;
    transform: scale(1.05);
}

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

.copy-btn.copied {
    background: rgba(78, 205, 196, 0.3);
    border-color: rgba(78, 205, 196, 0.5);
    color: #4ecdc4;
}

/* 测试日志上传按钮 */
.btn-test-log {
    width: 100%;
    padding: 0.8rem;
    background: rgba(78, 205, 196, 0.2);
    border: 1px solid rgba(78, 205, 196, 0.4);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-test-log:hover {
    background: rgba(78, 205, 196, 0.3);
    border-color: rgba(78, 205, 196, 0.6);
    transform: translateY(-1px);
}

.btn-test-log:active {
    transform: translateY(0);
}

/* 主视图 */
.main-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 顶部状态栏 - 沉浸式设计 */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    padding-top: max(1rem, env(safe-area-inset-top));
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.15) 50%, transparent 100%);
    backdrop-filter: blur(12px);
    gap: 1rem;
}

/* 麦克风状态显示区域 */
.mic-status-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    min-width: 0;
    overflow: hidden;
}

/* 图标显示控制 - 默认只显示麦克风图标 */
.mic-status-display .default-icon {
    display: block !important;
}

.mic-status-display .listening-icon,
.mic-status-display .thinking-icon,
.mic-status-display .speaking-icon {
    display: none !important;
}

/* 监听状态 - 显示波浪 */
.mic-status-display.listening .default-icon,
.mic-status-display.listening .thinking-icon,
.mic-status-display.listening .speaking-icon {
    display: none !important;
}

.mic-status-display.listening .listening-icon {
    display: block !important;
}

/* 思考状态 - 显示三个点 */
.mic-status-display.thinking .default-icon,
.mic-status-display.thinking .listening-icon,
.mic-status-display.thinking .speaking-icon {
    display: none !important;
}

.mic-status-display.thinking .thinking-icon {
    display: block !important;
}

/* 说话状态 - 显示笑脸 */
.mic-status-display.speaking .default-icon,
.mic-status-display.speaking .listening-icon,
.mic-status-display.speaking .thinking-icon {
    display: none !important;
}

.mic-status-display.speaking .speaking-icon {
    display: block !important;
}

/* 监听状态 - 蓝色样式 */
.mic-status-display.listening {
    background: rgba(79, 172, 254, 0.2);
    border-color: rgba(79, 172, 254, 0.4);
    color: #4facfe;
}

/* 思考状态 - 黄色样式 */
.mic-status-display.thinking {
    background: rgba(255, 193, 113, 0.2);
    border-color: rgba(255, 193, 113, 0.4);
    color: #ffc371;
}

.mic-status-display.thinking .thinking-icon circle {
    animation: thinking-blink 1.4s ease-in-out infinite;
}

.mic-status-display.thinking .thinking-icon circle:nth-child(1) {
    animation-delay: 0s;
}

.mic-status-display.thinking .thinking-icon circle:nth-child(2) {
    animation-delay: 0.2s;
}

.mic-status-display.thinking .thinking-icon circle:nth-child(3) {
    animation-delay: 0.4s;
}

/* 回复状态 - 紫粉色样式 */
.mic-status-display.speaking {
    background: rgba(196, 113, 245, 0.2);
    border-color: rgba(196, 113, 245, 0.4);
    color: #c471f5;
}

/* 波浪条动画 */
.mic-status-display.listening .listening-icon {
    opacity: 0.95;
}

.mic-status-display.listening .listening-icon .wave-bar {
    transform-origin: center;
}

.mic-status-display.listening .listening-icon .bar-1 {
    animation: wave-bar-1 0.8s ease-in-out infinite !important;
}

.mic-status-display.listening .listening-icon .bar-2 {
    animation: wave-bar-2 0.9s ease-in-out infinite !important;
}

.mic-status-display.listening .listening-icon .bar-3 {
    animation: wave-bar-3 1s ease-in-out infinite !important;
}

.mic-status-display.listening .listening-icon .bar-4 {
    animation: wave-bar-4 0.9s ease-in-out infinite !important;
}

.mic-status-display.listening .listening-icon .bar-5 {
    animation: wave-bar-5 0.8s ease-in-out infinite !important;
}

.mic-state-text {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.connection-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 107, 157, 0.95);
    box-shadow:
        0 0 15px rgba(255, 107, 157, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
    animation: blink 2s infinite;
    flex-shrink: 0;
    margin-left: auto;
}

.connection-indicator.connected {
    background: rgba(78, 205, 196, 1);
    box-shadow:
        0 0 18px rgba(78, 205, 196, 0.7),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
    animation: pulse 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.settings-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.settings-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.35);
}

.settings-icon:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.2);
}

/* 角色显示区域 */
.character-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    min-height: 35vh;
}

.character-placeholder {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.avatar-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ASR文本区域 - 用户语音识别结果（显示在左下角） */
.asr-text-area {
    position: fixed;
    bottom: 40px;
    left: 1rem;
    right: auto;
    z-index: 5;
    max-width: 60%;
    animation: float-in 0.5s ease-out;
}

.asr-bubble {
    position: relative;
    padding: 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: auto;

    /* 使用背景图片 */
    background-image: url('../assets/image/back_02.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-origin: padding-box;

    animation: bubble-appear 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.2));
}

.asr-bubble-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: rgba(40, 40, 40, 0.9);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.asr-icon {
    font-size: 0.9rem;
}

.asr-label {
    font-weight: 500;
    color: rgba(50, 50, 50, 0.95);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.asr-bubble-content {
    position: relative;
    z-index: 1;
}

.asr-bubble-content p {
    color: #596a7c;
    font-size: 1.2rem;
    line-height: 1.2;
    text-align: left;
    margin: 0;
    padding: 0.6rem 0.3rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    word-break: break-word;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

/* TTS文本区域 - 服务器返回的（显示在下方，避免遮挡状态栏） */
.tts-text-area {
    padding-top: calc(1rem + env(safe-area-inset-top));
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 0;
    position: relative;
    z-index: 100;
    animation: float-in 0.5s ease-out;
}

@keyframes float-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tts-bubble {
    position: relative;
    max-width: fit-content;
    /* 居中 */
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
    /* 水平居中 */
    padding: 1.8rem 2.5rem 2.2rem 2.5rem;
    min-height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;

    /* 使用椭圆思考气泡框图片 */
    background-image: url('../assets/image/back_01.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;

    animation: bubble-appear 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.12));
}

/* 气泡框隐藏状态 */
.tts-bubble[style*="display: none"] {
    animation: none;
}

@keyframes bubble-appear {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 气泡尾巴已包含在图片中 */
.bubble-tail {
    display: none;
}

.bubble-content {
    position: relative;
    z-index: 1;
}

.bubble-content p {
    color: #ff1493;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 双语字幕样式 */
.bubble-content .subtitle-primary {
    color: #ff1493;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 0.4rem 0;
    letter-spacing: 0.5px;
}

.bubble-content .subtitle-secondary {
    color: rgba(255, 20, 147, 0.65);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
    letter-spacing: 0.3px;
}

/* 气泡闪烁装饰 */
.tts-text-area::before {
    content: '✨';
    position: absolute;
    top: 3.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    z-index: 6;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2) rotate(20deg);
    }
}

/* VAD状态已移除 - 整合到状态显示 */

/* 底部控制栏 - 自适应移动端 */
.bottom-controls {
    padding: 1.5rem 1.5rem calc(2rem + env(safe-area-inset-bottom, 1rem));
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    /* 确保在移动端不会被UI遮挡 */
    min-height: calc(100px + env(safe-area-inset-bottom, 1rem));
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

/* 合拍按钮 - 固定在右下角 */
.photo-btn {
    position: fixed;
    bottom: max(2rem, calc(2rem + env(safe-area-inset-bottom)));
    right: 2rem;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.9) 0%, rgba(78, 205, 196, 0.7) 100%);
    border: 3px solid rgba(255, 255, 255, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    cursor: pointer;
    box-shadow:
        0 6px 20px rgba(78, 205, 196, 0.4),
        inset 0 2px 8px rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

/* 合拍按钮状态样式 */
.photo-btn.processing,
.photo-btn.photo-btn-processing {
    background: linear-gradient(135deg, rgba(255, 193, 113, 0.9) 0%, rgba(255, 193, 113, 0.7) 100%);
    opacity: 0.8;
    cursor: not-allowed;
}

.photo-btn.success,
.photo-btn.photo-btn-success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.9) 0%, rgba(76, 175, 80, 0.7) 100%);
    animation: pulse-success 2s ease-in-out infinite;
}

@keyframes pulse-success {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4),
                    inset 0 2px 8px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 6px 30px rgba(76, 175, 80, 0.6),
                    inset 0 2px 8px rgba(255, 255, 255, 0.3);
    }
}

.photo-btn.error,
.photo-btn.photo-btn-error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.9) 0%, rgba(244, 67, 54, 0.7) 100%);
}

.photo-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.photo-btn-text {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

/* 测肤按钮 - 与合拍按钮并列 */
.skin-btn {
    position: fixed;
    bottom: max(2rem, calc(2rem + env(safe-area-inset-bottom)));
    right: calc(2rem + 80px);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.9) 0%, rgba(255, 107, 157, 0.7) 100%);
    border: 3px solid rgba(255, 255, 255, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    cursor: pointer;
    box-shadow:
        0 6px 20px rgba(255, 107, 157, 0.4),
        inset 0 2px 8px rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.skin-btn.processing,
.skin-btn.skin-btn-processing {
    background: linear-gradient(135deg, rgba(255, 193, 113, 0.9) 0%, rgba(255, 193, 113, 0.7) 100%);
    opacity: 0.8;
    cursor: not-allowed;
}

.skin-btn.success,
.skin-btn.skin-btn-success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.9) 0%, rgba(76, 175, 80, 0.7) 100%);
    animation: pulse-success 2s ease-in-out infinite;
}

.skin-btn.error,
.skin-btn.skin-btn-error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.9) 0%, rgba(244, 67, 54, 0.7) 100%);
}

.skin-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.skin-btn-text {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}


@keyframes wave-bar-1 {
    0%, 100% {
        transform: scaleY(0.4);
    }
    50% {
        transform: scaleY(1);
    }
}

@keyframes wave-bar-2 {
    0%, 100% {
        transform: scaleY(0.6);
    }
    50% {
        transform: scaleY(1.2);
    }
}

@keyframes wave-bar-3 {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(1.5);
    }
}

@keyframes wave-bar-4 {
    0%, 100% {
        transform: scaleY(0.6);
    }
    50% {
        transform: scaleY(1.2);
    }
}

@keyframes wave-bar-5 {
    0%, 100% {
        transform: scaleY(0.4);
    }
    50% {
        transform: scaleY(1);
    }
}



/* 停止按钮已移除 */

/* 连接覆盖层 - 二次元风格 */
.connect-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.15) 0%, rgba(78, 205, 196, 0.15) 100%),
                rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.3s ease;
    padding: clamp(1rem, 5vw, 2rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.connect-overlay::before {
    content: '✨';
    position: absolute;
    font-size: clamp(1.5rem, 8vw, 3rem);
    top: clamp(10%, 20%, 25%);
    left: clamp(5%, 15%, 20%);
    animation: float-sparkle 3s infinite;
    pointer-events: none;
}

.connect-overlay::after {
    content: '💫';
    position: absolute;
    font-size: clamp(1.2rem, 6vw, 2.5rem);
    bottom: clamp(20%, 30%, 35%);
    right: clamp(10%, 20%, 25%);
    animation: float-sparkle 4s infinite 1s;
    pointer-events: none;
}

@keyframes float-sparkle {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

.connect-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 语言配置按钮 - 右上角 */
.lang-config-btn {
    position: fixed;
    top: clamp(10px, 5vw, 20px);
    right: clamp(10px, 5vw, 20px);
    display: flex;
    align-items: center;
    gap: clamp(0.3rem, 1vw, 0.4rem);
    padding: clamp(0.45rem, 1.5vw, 0.55rem) clamp(0.7rem, 2.5vw, 0.9rem);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: clamp(16px, 5vw, 20px);
    color: rgba(255, 255, 255, 0.5);
    font-size: clamp(0.65rem, 2vw, 0.75rem);
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 11;
    white-space: nowrap;
}

.lang-config-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 107, 157, 0.3);
    transform: scale(1.05);
}

.lang-config-btn:active {
    transform: scale(0.98);
}

.lang-config-btn svg {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.lang-config-btn:hover svg {
    opacity: 1;
}

/* 语言选择器 - 按钮式设计 */
.language-selector {
    display: flex;
    flex-direction: column;
    gap: clamp(0.7rem, 2.5vw, 0.9rem);
    margin-bottom: clamp(0.8rem, 3vw, 1.2rem);
    padding: clamp(0.8rem, 2.5vw, 1rem) clamp(1rem, 3vw, 1.2rem) clamp(1rem, 3vw, 1.2rem);
    background: rgba(255, 255, 255, 0.04);
    border-radius: clamp(14px, 4.5vw, 18px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-height: clamp(400px, 125vw, 500px);
    max-width: min(320px, calc(100vw - 2rem));
    width: 100%;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.language-selector.collapsed {
    max-height: 0;
    opacity: 0;
    transform: translateY(-15px) scale(0.95);
    margin-bottom: 0;
    padding: 0 1.2rem;
    pointer-events: none;
}

.lang-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.lang-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-align: left;
    padding-left: 0.2rem;
}

.lang-buttons {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
}

.lang-btn {
    flex: 1;
    padding: clamp(0.6rem, 1.8vw, 0.7rem) clamp(0.5rem, 1.5vw, 0.6rem);
    background: rgba(255, 255, 255, 0.06);
    border: clamp(1px, 0.4vw, 1.5px) solid rgba(255, 255, 255, 0.12);
    border-radius: clamp(12px, 3.5vw, 14px);
    color: rgba(255, 255, 255, 0.65);
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
    min-width: 0;
    white-space: nowrap;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.lang-btn:active::before {
    width: 300px;
    height: 300px;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 107, 157, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.15);
    color: rgba(255, 255, 255, 0.85);
}

.lang-btn.active {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.25), rgba(196, 113, 245, 0.25));
    border-color: rgba(255, 107, 157, 0.5);
    color: white;
    box-shadow:
        0 4px 16px rgba(255, 107, 157, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.lang-btn.active::after {
    content: '✓';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #ff6b9d, #c471f5);
    border-radius: 50%;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(255, 107, 157, 0.4);
    animation: check-pop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes check-pop {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.connect-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(0.5rem, 2vw, 0.8rem);
    padding: clamp(1.2rem, 4.5vw, 1.8rem) clamp(2rem, 8vw, 3.2rem);
    background: linear-gradient(135deg, #ff6b9d 0%, #ffc371 100%);
    border: clamp(2px, 0.8vw, 3px) solid rgba(255, 255, 255, 0.8);
    border-radius: clamp(24px, 8vw, 32px);
    color: white;
    font-size: clamp(1rem, 3.5vw, 1.25rem);
    font-weight: 700;
    cursor: pointer;
    box-shadow:
        0 clamp(12px, 4vw, 16px) clamp(36px, 12vw, 48px) rgba(255, 107, 157, 0.45),
        inset 0 2px 12px rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    max-width: min(320px, calc(100vw - 2rem));
    width: 100%;
    box-sizing: border-box;
}

.connect-btn svg {
    width: clamp(24px, 8vw, 32px);
    height: clamp(24px, 8vw, 32px);
    flex-shrink: 0;
}

.connect-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.connect-btn:active {
    transform: scale(0.93);
}

/* 调试信息 */
.debug-info {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

.stats {
    text-align: center;
    margin-bottom: 0.3rem;
}

.info-panel {
    text-align: center;
    font-size: 0.7rem;
}

/* 响应式调整 */
@media (max-width: 375px) {
    .connect-overlay {
        padding: 0.95rem;
    }

    .connect-btn {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
        max-width: calc(100vw - 1.5rem);
    }

    .exhibition-mode-selector {
        padding: 0.8rem 1rem;
        margin: 0.8rem 0;
        max-width: calc(100vw - 1.5rem);
    }

    .exhibition-mode-btn {
        padding: 0.7rem 0.5rem;
        font-size: 0.75rem;
    }

    .exhibition-mode-btn small {
        font-size: 0.55rem;
    }

    .character-selector {
        padding: 0.8rem 1rem;
        margin: 0.8rem 0;
        max-width: calc(100vw - 1.5rem);
    }

    .character-btn {
        padding: 0.7rem 0.5rem;
        font-size: 0.75rem;
    }

    .character-btn small {
        font-size: 0.55rem;
    }

    .language-selector {
        padding: 0.7rem 0.9rem 0.9rem;
        max-width: calc(100vw - 1.5rem);
    }

    .lang-btn {
        padding: 0.5rem 0.4rem;
        font-size: 0.65rem;
    }

    .tts-bubble {
        padding: 1.0rem 2rem 1.8rem 2rem;
        min-height: 70px;
    }

    .bubble-content p {
        font-size: 1rem;
    }

    /* 双语字幕 - 移动端调整 */
    .bubble-content .subtitle-primary {
        font-size: 1.05rem;
        margin-bottom: 0.35rem;
    }

    .bubble-content .subtitle-secondary {
        font-size: 0.88rem;
    }

    .tts-text-area::before {
        font-size: 1.2rem;
        top: 3.3rem;
        right: 1.2rem;
    }

    .vad-status {
        padding: 0.3rem 0.7rem;
        font-size: 0.8rem;
    }
}

/* 移除 480px 宽度限制，允许全屏显示 */
/* @media (min-width: 768px) {
    .app {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    }
} */

/* 拍照模态框 */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.photo-modal.active {
    display: flex;
}

.photo-modal-content {
    width: 100%;
    max-width: 600px;
    background: rgba(20, 10, 30, 0.98);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.photo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-modal-header h3 {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.photo-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.photo-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.photo-preview-area {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#photoPreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* 镜像显示 */
}

.photo-controls {
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
}

.photo-capture-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d 0%, #ffc371 100%);
    border: 4px solid rgba(255, 255, 255, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        0 8px 30px rgba(255, 107, 157, 0.5),
        inset 0 2px 10px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.photo-capture-btn:active {
    transform: scale(0.9);
}

.photo-capture-btn svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* 拍照页面上传进度显示 */
.photo-upload-progress-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
    padding: 2rem;
}

.photo-upload-progress {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 200px;
    animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 结果模态框 */
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.result-modal.active {
    display: flex;
}

.result-modal-content {
    width: 100%;
    max-width: 600px;
    background: rgba(20, 10, 30, 0.98);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.result-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-modal-header h3 {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.result-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.result-image-area {
    width: 100%;
    aspect-ratio: 3/4;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#resultImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.result-actions {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
}

.result-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ff6b9d 0%, #ffc371 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.result-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

/* 测肤拍照模态框 */
.skin-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.skin-modal.active {
    display: flex;
}

.skin-modal-content {
    width: 100%;
    max-width: 600px;
    background: rgba(20, 10, 30, 0.98);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.skin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.skin-modal-header h3 {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.skin-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skin-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.skin-preview-area {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#skinPreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* 镜像显示 */
}

.skin-controls {
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
}

.skin-capture-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b9d 0%, #ffc371 100%);
    border: 4px solid rgba(255, 255, 255, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        0 8px 30px rgba(255, 107, 157, 0.5),
        inset 0 2px 10px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.skin-capture-btn:active {
    transform: scale(0.9);
}

.skin-capture-btn svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* 测肤页面上传进度显示 */
.skin-upload-progress-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
    padding: 2rem;
}

.skin-upload-progress {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 200px;
    animation: pulse-text 2s ease-in-out infinite;
}

/* 测肤结果模态框 */
.skin-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.skin-result-modal.active {
    display: flex;
}

.skin-result-modal-content {
    width: 100%;
    max-width: 800px;
    background: rgba(20, 10, 30, 0.98);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.skin-result-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.skin-result-modal-header h3 {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.skin-result-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skin-result-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.skin-result-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: calc(90vh - 180px);
}

.skin-result-image-area {
    width: 100%;
    aspect-ratio: 3/4;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

#skinResultImage {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.skin-result-data-area {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
}

.skin-result-data-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 107, 157, 0.5);
}

.skin-result-data {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skin-data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid rgba(255, 107, 157, 0.6);
    transition: all 0.2s ease;
}

.skin-data-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: rgba(255, 107, 157, 1);
}

.skin-data-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.skin-data-value {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    text-align: right;
}

.skin-data-filename {
    font-size: 0.85rem;
}

.skin-data-filename .skin-data-value {
    font-size: 0.85rem;
    font-weight: 400;
    word-break: break-all;
    text-align: left;
    flex: 1;
    margin-left: 1rem;
}

.skin-result-actions {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
    flex-shrink: 0;
}

.skin-result-btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ff6b9d 0%, #ffc371 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.skin-result-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

/* 处理进度模态框 */
.photo-progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2150;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.photo-progress-modal.active {
    display: flex;
}

.photo-progress-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 3rem;
    background: rgba(20, 10, 30, 0.98);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    min-width: 280px;
}

.photo-progress-spinner {
    width: 80px;
    height: 80px;
    position: relative;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 107, 157, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.photo-progress-text {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    min-height: 1.5rem;
}

/* 移动端适配 */
@media (max-width: 375px) {
    .photo-btn {
        width: 60px;
        height: 60px;
    }

    .photo-btn svg {
        width: 24px;
        height: 24px;
    }

    .photo-btn-text {
        font-size: 0.6rem;
    }

    /* 状态栏通知移动端适配 */
    .photo-status-notification {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        max-width: calc(100% - 60px);
    }

    .photo-status-icon {
        font-size: 0.9rem;
    }

    .photo-status-action {
        padding: 0.2rem 0.6rem;
        font-size: 0.7rem;
    }

    .photo-status-close {
        width: 18px;
        height: 18px;
        font-size: 0.9rem;
    }
}

/* 页面内通知样式 */
.photo-notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 360px;
    pointer-events: none;
}

.photo-notification {
    pointer-events: auto;
    background: rgba(20, 10, 30, 0.98);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.3s ease;
}

.photo-notification:hover {
    transform: translateX(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.photo-notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.photo-notification-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    line-height: 1;
}

.photo-notification-text {
    flex: 1;
    min-width: 0;
}

.photo-notification-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.photo-notification-message {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.4;
}

.photo-notification-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ff6b9d 0%, #ffc371 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

.photo-notification-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

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

.photo-notification-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.photo-notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 通知类型样式 */
.photo-notification-info {
    border-left: 3px solid rgba(78, 205, 196, 0.8);
}

.photo-notification-success {
    border-left: 3px solid rgba(76, 175, 80, 0.8);
}

.photo-notification-error {
    border-left: 3px solid rgba(244, 67, 54, 0.8);
}

/* 移动端适配 */
@media (max-width: 480px) {
    .photo-notification-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }

    .photo-notification-content {
        padding: 0.875rem 1rem;
    }

    .photo-notification-title {
        font-size: 0.95rem;
    }

    .photo-notification-message {
        font-size: 0.8rem;
    }

    .photo-notification-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* ==================== 展会模式 - 贴掌检测区域 ==================== */
.palm-touch-area {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    pointer-events: auto;
    cursor: pointer;
    will-change: transform;
    /* iOS 手势优化 - 禁用双击缩放和长按选择 */
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.palm-touch-area::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: -1;
}

.palm-touch-area.waiting::before {
    opacity: 1;
    animation: palm-ripple-outer 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.palm-touch-progress-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.palm-touch-area.contacting .palm-touch-progress-circle,
.palm-touch-area.touching .palm-touch-progress-circle {
    opacity: 1;
    display: block !important;
}

.palm-touch-progress-bg {
    transition: stroke 0.3s ease;
}

.palm-touch-progress-bar {
    transition: stroke-dashoffset 0.08s linear, stroke 0.3s ease;
    will-change: stroke-dashoffset;
    filter: drop-shadow(0 0 4px rgba(120, 220, 210, 0.6));
}

.palm-countdown-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    will-change: opacity;
}

.palm-touch-area.waiting .palm-countdown-circle {
    opacity: 1;
}

.palm-touch-area.contacting .palm-countdown-circle,
.palm-touch-area.touching .palm-countdown-circle {
    opacity: 0 !important;
}

.palm-countdown-bg {
    transition: stroke 0.3s ease;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 2;
}

.palm-countdown-progress {
    transition: stroke-dashoffset 0.1s linear, stroke 0.3s ease;
    will-change: stroke-dashoffset;
    stroke-width: 2.5;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-linecap: round;
}

.palm-countdown-circle.warning .palm-countdown-progress {
    stroke: rgba(255, 200, 220, 0.95);
}

.palm-touch-countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    font-size: clamp(56px, 12vw, 80px);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.95);
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.2);
    z-index: 6;
    transition: all 0.2s ease-out;
    min-width: 70px;
    text-align: center;
    pointer-events: none;
    line-height: 1;
    opacity: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    will-change: transform, opacity;
    letter-spacing: 0;
}

.palm-touch-area.waiting .palm-touch-countdown {
    opacity: 1;
    animation: countdown-breathe 2s ease-in-out infinite;
}

.palm-touch-area.contacting .palm-touch-countdown,
.palm-touch-area.touching .palm-touch-countdown {
    opacity: 0 !important;
    display: none !important;
}

.palm-touch-countdown.warning {
    color: rgba(255, 220, 240, 0.95);
    animation: countdown-breathe-warning 1s ease-in-out infinite;
}

@keyframes countdown-breathe {
    0%, 100% {
        transform: translate3d(-50%, -50%, 0) scale(1);
        opacity: 0.95;
    }
    50% {
        transform: translate3d(-50%, -50%, 0) scale(1.03);
        opacity: 1;
    }
}

@keyframes countdown-breathe-warning {
    0%, 100% {
        transform: translate3d(-50%, -50%, 0) scale(1);
        opacity: 0.95;
    }
    50% {
        transform: translate3d(-50%, -50%, 0) scale(1.05);
        opacity: 1;
    }
}

.palm-touch-area.contacting .palm-touch-countdown,
.palm-touch-area.touching .palm-touch-countdown {
    display: none !important;
}

.palm-touch-area.waiting .palm-touch-countdown {
    display: block !important;
}

.palm-touch-indicator {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease-out;
    will-change: transform, opacity, border-color, background;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.palm-touch-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    width: 110%;
    height: 110%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

.palm-touch-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 80%);
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

.palm-touch-area.waiting .palm-touch-indicator {
    animation: palm-waiting-breathe 2.5s ease-in-out infinite;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.palm-touch-area.waiting .palm-touch-indicator::after {
    opacity: 1;
}

.palm-touch-area.waiting .palm-touch-glow {
    opacity: 1;
    animation: palm-waiting-glow 2.5s ease-in-out infinite;
}

.palm-touch-area.waiting .palm-touch-indicator svg,
.palm-touch-indicator .palm-touch-icon {
    opacity: 0.4;
    transition: opacity 0.3s ease-out;
    color: rgba(255, 255, 255, 0.5);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    pointer-events: none;
    z-index: 1;
}

.palm-touch-area.waiting .palm-touch-indicator svg {
    opacity: 0.3;
    animation: palm-icon-fade 3s ease-in-out infinite;
}

@keyframes palm-icon-fade {
    0%, 100% {
        opacity: 0.3;
        transform: translate3d(-50%, -50%, 0) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translate3d(-50%, -50%, 0) scale(1.05);
    }
}

.palm-touch-area.contacting .palm-touch-indicator svg,
.palm-touch-area.touching .palm-touch-indicator svg {
    opacity: 0;
}

.palm-touch-area.contacting .palm-touch-indicator {
    border-color: rgba(120, 220, 210, 0.4);
    background: rgba(120, 220, 210, 0.12);
    transform: scale(1.01);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(120, 220, 210, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.palm-touch-area.contacting .palm-touch-indicator::after {
    opacity: 0.6;
    border-color: rgba(120, 220, 210, 0.2);
}

.palm-touch-area.contacting .palm-touch-glow {
    opacity: 0.8;
    background: radial-gradient(circle,
        rgba(120, 220, 210, 0.2) 0%,
        rgba(120, 220, 210, 0.1) 50%,
        transparent 80%);
}

.palm-touch-area.touching .palm-touch-indicator {
    background: rgba(120, 220, 210, 0.15);
    border-color: rgba(120, 220, 210, 0.5);
    transform: scale3d(1.03, 1.03, 1);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(120, 220, 210, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.palm-touch-area.touching .palm-touch-indicator::after {
    opacity: 0.8;
    border-color: rgba(120, 220, 210, 0.3);
}

.palm-touch-area.touching .palm-touch-glow {
    opacity: 1;
    background: radial-gradient(circle,
        rgba(120, 220, 210, 0.25) 0%,
        rgba(120, 220, 210, 0.15) 50%,
        transparent 80%);
}

@keyframes palm-waiting-breathe {
    0%, 100% {
        transform: scale3d(1, 1, 1);
        border-color: rgba(255, 255, 255, 0.3);
        background: rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale3d(1.02, 1.02, 1);
        border-color: rgba(255, 255, 255, 0.35);
        background: rgba(255, 255, 255, 0.12);
    }
}

@keyframes palm-waiting-glow {
    0%, 100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
    50% {
        opacity: 0.8;
        transform: scale3d(1.05, 1.05, 1);
    }
}

/* 移动端适配 */
@media (max-width: 480px) {
    .palm-touch-area {
        width: 180px;
        height: 180px;
        bottom: 15%;
    }

    .palm-touch-indicator svg {
        width: 60px;
        height: 60px;
    }
}

/* ==================== 角色选择器 ==================== */
.character-selector {
    margin: clamp(1rem, 4vw, 1.5rem) 0;
    padding: clamp(1rem, 3vw, 1.2rem) clamp(1.2rem, 4vw, 1.5rem);
    background: rgba(255, 255, 255, 0.04);
    border-radius: clamp(14px, 4.5vw, 18px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: min(320px, calc(100vw - 2rem));
    width: 100%;
    box-sizing: border-box;
}

.character-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(0.75rem, 2.2vw, 0.85rem);
    font-weight: 500;
    letter-spacing: 0.3px;
    text-align: center;
    margin-bottom: clamp(0.6rem, 2vw, 0.8rem);
}

.character-buttons {
    display: flex;
    gap: clamp(0.6rem, 2vw, 0.8rem);
    justify-content: center;
}

.character-btn {
    flex: 1;
    padding: clamp(0.8rem, 2.5vw, 1rem) clamp(0.6rem, 2vw, 0.8rem);
    background: rgba(255, 255, 255, 0.06);
    border: clamp(1px, 0.4vw, 1.5px) solid rgba(255, 255, 255, 0.12);
    border-radius: clamp(12px, 3.5vw, 14px);
    color: rgba(255, 255, 255, 0.65);
    font-size: clamp(0.8rem, 2.3vw, 0.9rem);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.2rem, 0.8vw, 0.3rem);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.character-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 107, 157, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.15);
    color: rgba(255, 255, 255, 0.85);
}

.character-btn.active {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.25), rgba(196, 113, 245, 0.25));
    border-color: rgba(255, 107, 157, 0.5);
    color: white;
    box-shadow:
        0 4px 16px rgba(255, 107, 157, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.character-btn.active::after {
    content: '✓';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff6b9d, #c471f5);
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(255, 107, 157, 0.4);
    animation: check-pop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.character-btn small {
    font-size: clamp(0.6rem, 1.8vw, 0.7rem);
    opacity: 0.8;
    font-weight: 400;
    white-space: nowrap;
}

.character-btn.active small {
    opacity: 1;
}

/* ==================== 展会模式选择器 ==================== */
.exhibition-mode-selector {
    margin: clamp(1rem, 4vw, 1.5rem) 0;
    padding: clamp(1rem, 3vw, 1.2rem) clamp(1.2rem, 4vw, 1.5rem);
    background: rgba(255, 255, 255, 0.04);
    border-radius: clamp(14px, 4.5vw, 18px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: min(320px, calc(100vw - 2rem));
    width: 100%;
    box-sizing: border-box;
}

.exhibition-mode-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(0.75rem, 2.2vw, 0.85rem);
    font-weight: 500;
    letter-spacing: 0.3px;
    text-align: center;
    margin-bottom: clamp(0.6rem, 2vw, 0.8rem);
}

.exhibition-mode-buttons {
    display: flex;
    gap: clamp(0.6rem, 2vw, 0.8rem);
    justify-content: center;
}

.exhibition-mode-btn {
    flex: 1;
    padding: clamp(0.8rem, 2.5vw, 1rem) clamp(0.6rem, 2vw, 0.8rem);
    background: rgba(255, 255, 255, 0.06);
    border: clamp(1px, 0.4vw, 1.5px) solid rgba(255, 255, 255, 0.12);
    border-radius: clamp(12px, 3.5vw, 14px);
    color: rgba(255, 255, 255, 0.65);
    font-size: clamp(0.8rem, 2.3vw, 0.9rem);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.2rem, 0.8vw, 0.3rem);
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.exhibition-mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 107, 157, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.15);
    color: rgba(255, 255, 255, 0.85);
}

.exhibition-mode-btn.active {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.25), rgba(196, 113, 245, 0.25));
    border-color: rgba(255, 107, 157, 0.5);
    color: white;
    box-shadow:
        0 4px 16px rgba(255, 107, 157, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.exhibition-mode-btn.active::after {
    content: '✓';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff6b9d, #c471f5);
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(255, 107, 157, 0.4);
    animation: check-pop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.exhibition-mode-btn small {
    font-size: clamp(0.6rem, 1.8vw, 0.7rem);
    opacity: 0.8;
    font-weight: 400;
    white-space: nowrap;
}

.exhibition-mode-btn.active small {
    opacity: 1;
}

/* ==================== 展会模式 - 使用正常全屏布局 ==================== */
.app.exhibition-mode {
    /* 展会模式使用正常全屏布局，不限制比例 */
    position: relative;
    overflow: hidden;
}

/* 展会模式下隐藏合照和测肤按钮 */
.app.exhibition-mode .photo-btn,
.app.exhibition-mode .skin-btn {
    display: none !important;
}

/* ==================== 展会模式 - 仅保留必要的适配 ==================== */

/* 展会模式UI提示 */
.exhibition-hint {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 20px;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 500;
    text-align: center;
    z-index: 2000;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transition: all 0.3s ease;
}

/* 展会模式倒计时 */
.exhibition-countdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    /* 修改为透明背景 */
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 700;
    /* 添加文本描边以确保在任何背景下都可见 */
    color: #fff;
    text-shadow:
        0 0 10px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(0, 0, 0, 0.4);
    z-index: 2001;
    pointer-events: none;
    /* 保持阴影效果但减少一些 */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: countdown-pulse 1s infinite;
}

@keyframes countdown-pulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
    }
}

/* 展会模式下倒计时适配 */
.app.exhibition-mode .exhibition-countdown {
    width: clamp(100px, 25vw, 120px);
    height: clamp(100px, 25vw, 120px);
    font-size: clamp(3rem, 10vw, 4rem);
}

/* 视频背景适配 - 适配.app容器而不是整个视口 */
.app.exhibition-mode .video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.app.exhibition-mode .video-background .bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ==================== 登录界面样式 ==================== */

/* 登录容器 - 全屏覆盖 */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(30, 20, 50, 0.95) 0%, 
        rgba(15, 10, 30, 0.98) 100%);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 1rem;
}

/* 登录内容区域 */
.login-content {
    width: 100%;
    max-width: 420px;
    padding: 2rem 1.5rem;
    animation: loginFadeIn 0.5s ease;
}

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

/* 登录头部 */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ff6b9d, #c471f5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* 登录方式切换选项卡 */
.login-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.3rem;
}

.login-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-tab svg {
    transition: transform 0.3s ease;
}

.login-tab.active {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.2), rgba(196, 113, 245, 0.2));
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

.login-tab.active svg {
    transform: scale(1.1);
}

/* 表单样式 */
.login-form {
    margin-bottom: 1.5rem;
}

.login-form-content {
    transition: opacity 0.3s ease;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* 输入框容器 */
.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper .form-input {
    width: 100%;
    padding: 0.9rem 1rem;
    padding-right: 3rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper .form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-wrapper .form-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 107, 157, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.input-wrapper .form-input.error {
    border-color: rgba(244, 67, 54, 0.6);
    background: rgba(244, 67, 54, 0.08);
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* 验证码输入带按钮 */
.input-with-button {
    display: flex;
    gap: 0.75rem;
}

.input-with-button .input-wrapper {
    flex: 1;
}

.btn-send-code {
    flex-shrink: 0;
    padding: 0.9rem 1.25rem;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.25), rgba(196, 113, 245, 0.25));
    border: 1.5px solid rgba(255, 107, 157, 0.4);
    border-radius: 12px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-send-code:hover {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.35), rgba(196, 113, 245, 0.35));
    border-color: rgba(255, 107, 157, 0.6);
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

.btn-send-code:disabled {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
}

/* 表单错误提示 */
.form-error {
    color: rgba(244, 67, 54, 0.9);
    font-size: 0.8rem;
    margin-top: 0.4rem;
    min-height: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.form-error::before {
    content: '⚠️';
    font-size: 0.9rem;
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #ff6b9d, #c471f5);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-login .btn-text,
.btn-login .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* 加载动画 */
.spinner {
    animation: rotate 1s linear infinite;
}

.spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* 用户协议 */
.login-terms {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

.login-terms .link {
    color: rgba(255, 107, 157, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.login-terms .link:hover {
    color: rgba(255, 107, 157, 1);
    text-decoration: underline;
}

/* 底部跳过登录 */
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.btn-skip-login {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-skip-login:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-skip-login svg {
    transition: transform 0.3s ease;
}

.btn-skip-login:hover svg {
    transform: translateX(3px);
}

/* 移动端适配 */
@media (max-width: 480px) {
    .login-content {
        padding: 1.5rem 1rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-subtitle {
        font-size: 0.85rem;
    }
    
    .login-tab {
        font-size: 0.85rem;
        padding: 0.65rem 0.8rem;
    }
    
    .input-wrapper .form-input {
        font-size: 0.95rem;
        padding: 0.8rem 0.9rem;
        padding-right: 2.8rem;
    }
    
    .btn-send-code {
        font-size: 0.8rem;
        padding: 0.8rem 1rem;
    }
    
    .btn-login {
        font-size: 1rem;
        padding: 0.9rem;
    }
}

/* 小屏幕适配 */
@media (max-height: 600px) {
    .login-content {
        padding: 1rem;
    }
    
    .login-header {
        margin-bottom: 1rem;
    }
    
    .login-logo {
        font-size: 2.5rem;
    }
    
    .login-tabs {
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
}
