/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f0f8ff;
    color: #333;
    overflow: auto;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
.top-header {
    height: 60px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 0 0 12px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #1976d2;
}

.logo i {
    font-size: 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.breadcrumb-item.active {
    font-weight: 500;
}

.header-center {
    flex: 1;
    text-align: center;
}

.project-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: #f5f5f5;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.header-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.header-btn.primary {
    background: #1976d2;
    border-color: #1976d2;
    color: white;
}

.header-btn.primary:hover {
    background: #1565c0;
}

.user-avatar-container {
    position: relative;
    display: inline-block;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: visible;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.user-avatar:hover {
    transform: scale(1.05);
}

.user-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-dropdown-icon {
    margin-left: 4px;
    font-size: 10px;
    color: #666;
    transition: transform 0.2s;
}

.user-avatar-container:hover .avatar-dropdown-icon {
    transform: rotate(180deg);
}

/* 下拉菜单样式 */
.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-avatar-container:hover .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item i {
    margin-right: 8px;
    width: 16px;
    font-size: 14px;
    color: #666;
}

.dropdown-item a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    flex: 1;
}

.dropdown-item:hover a {
    color: #1976d2;
}

.dropdown-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 4px 0;
}

/* 特殊样式 */
.dropdown-item:last-child:hover {
    background-color: #fff5f5;
}

.dropdown-item:last-child:hover a {
    color: #d32f2f;
}

.dropdown-item:last-child:hover i {
    color: #d32f2f;
}

/* 工具栏 */
.toolbar {
    height: 60px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
}

.toolbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 48px;
    border: none;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 11px;
    color: #64748b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.2);
    position: relative;
    overflow: hidden;
}

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

.tool-btn:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
    border-color: #3b82f6;
}

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

.tool-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.tool-btn i {
    font-size: 18px;
    margin-bottom: 4px;
    transition: all 0.3s;
}

.tool-btn:hover i {
    transform: scale(1.1);
}

.tool-btn span {
    font-size: 11px;
    line-height: 1;
    font-weight: 500;
    transition: all 0.3s;
}

.toolbar-right {
    display: flex;
    align-items: center;
}

.zoom-level {
    font-size: 12px;
    color: #666;
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 3px;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    display: flex;
    overflow: auto;
    align-items: stretch; /* 确保所有子元素高度一致 */
}

/* 左侧文本编辑区域 */
.left-panel {
    width: 45%;
    background: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.text-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.editor-header {
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

.editor-content {
    flex: 1;
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    max-height: 900px;
    min-height: 600px;
}

#text-input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    font-family: inherit;
    overflow-y: auto;
    box-sizing: border-box;
}

#text-input::placeholder {
    color: #999;
}

.char-counter {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 12px;
    color: #999;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 3px;
}

/* 中间分隔线 */
.divider {
    width: 1px;
    background: #e0e0e0;
    flex-shrink: 0;
}

/* 中间主播选择区域 */
.middle-panel {
    width: 30%;
    background: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-left: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    height: 100%; /* 确保与父容器高度一致 */
}

/* 右侧参数控制面板 */
.right-panel {
    width: 25%;
    background: white;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
    height: 100%; /* 确保与父容器高度一致 */
}

.panel-section {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

/* 包含音色网格的panel-section需要特殊处理 */
.panel-section.voice-grid-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 确保音色网格容器能够滚动 */
.panel-section.voice-grid-container .voice-grid {
    flex: 1;
    overflow-y: auto;
}

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

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.section-actions {
    display: flex;
    gap: 12px;
}

.section-actions span {
    font-size: 12px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s;
}

.section-actions span:hover {
    background: #f0f0f0;
    color: #333;
}

/* 收藏按钮样式 */
.favorites-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.favorites-btn:hover {
    border-color: #ff4757;
    color: #ff4757;
    background: #fff5f5;
}

.favorites-btn.active {
    background: #ff4757;
    border-color: #ff4757;
    color: white;
}

.favorites-btn i {
    font-size: 12px;
}

/* 无收藏消息样式 */
.no-favorites-message {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

/* 搜索框 */
.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
}

.search-box input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 36px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: #667eea;
}

/* 筛选标签 */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-tab {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 16px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.filter-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-tab.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* 年龄筛选标签 */
.age-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.age-tab {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 16px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.age-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.age-tab.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* 接口筛选标签 */
.interface-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.interface-tab {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 16px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.interface-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.interface-tab.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* 音色网格 */
.voice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    flex: 1; /* 占据剩余空间 */
    overflow-y: auto;
    padding: 2px;
    min-height: 0; /* 允许flex子元素缩小 */
}

.voice-card {
    display: flex;
    align-items: center;
    padding: 8px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 120px;
    max-width: 180px;
}

.voice-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.voice-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.pagination-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.pagination-info .page-status {
    font-size: 12px;
    color: #333;
    padding: 4px 10px;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 999px;
    white-space: nowrap;
}

.pagination-loading {
    font-size: 12px;
    color: #667eea;
    white-space: nowrap;
}

.pagination-jump {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-input {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 12px;
    outline: none;
}

.pagination-input:focus {
    border-color: #667eea;
}

.voice-grid.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.voice-grid.is-transitioning {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.voice-card.selected {
    border-color: #667eea;
    background: #f8f9ff;
}

.voice-card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    flex-shrink: 0;
    position: relative;
}

.voice-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.voice-card-avatar-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    user-select: none;
}

.voice-card-info {
    flex: 1;
    min-width: 0;
}

.voice-card-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-card-desc {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-card-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.voice-card:hover .voice-card-actions {
    opacity: 1;
}

.voice-action-btn {
    width: 22px;
    height: 22px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 11px;
}

.voice-action-btn:hover {
    background: #667eea;
    color: white;
}

/* 当前选择的主播 */
.current-voice {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border: 1px solid #667eea;
    border-radius: 8px;
    margin: 0 16px 16px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.current-voice-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.voice-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.voice-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.current-voice-avatar-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    user-select: none;
}

.voice-info {
    flex: 1;
    min-width: 0;
}

.voice-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.voice-desc {
    font-size: 12px;
    color: #666;
}

/* 语种选择器样式 */
.language-selector {
    margin-top: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.language-selector .section-header h4 {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    text-align: center;
}

.language-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 8px;
}

.language-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 80px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

.language-card:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.language-card:hover::before {
    left: 100%;
}

.language-card.selected {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
}

.language-card.selected .language-icon,
.language-card.selected .language-name {
    color: white;
}

.language-icon {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #475569;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.language-name {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .language-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .language-card {
        padding: 14px 10px;
        min-height: 70px;
    }
    
    .language-icon {
        font-size: 16px;
    }
    
    .language-name {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .language-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .language-card {
        padding: 12px 8px;
        min-height: 65px;
    }
    
    .language-icon {
        font-size: 15px;
    }
    
    .language-name {
        font-size: 10px;
    }
}
#language-selector {
    margin-top: 12px;
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
}

.language-selector-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    display: block;
}

#language-select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

#language-select:hover {
    border-color: #667eea;
}

#language-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.voice-actions {
    display: flex;
    gap: 8px;
}

.voice-play-btn,
.voice-favorite-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.voice-play-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

/* 收藏按钮样式 */
.voice-favorite-btn {
    color: #666; /* 未收藏状态灰色 */
    border-color: #ddd;
    transition: all 0.3s ease;
}

.voice-favorite-btn:hover {
    border-color: #ff4757;
    color: #ff4757;
    background-color: #fff5f5;
    transform: scale(1.05);
}

.voice-favorite-btn.active {
    color: #ff4757; /* 收藏状态红色 */
    border-color: #ff4757;
    background-color: #fff5f5;
}

.voice-favorite-btn.active:hover {
    color: #e63946;
    border-color: #e63946;
    background-color: #ffe6e6;
    transform: scale(1.05);
}

/* 音色卡片中的收藏按钮样式 */
.voice-action-btn.voice-favorite-btn {
    color: #666; /* 未收藏状态灰色，提高可见度 */
    background: white; /* 确保背景是纯白色 */
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.voice-action-btn.voice-favorite-btn:hover {
    color: #ff4757;
    background: #fff5f5;
    border-color: #ff4757;
    transform: scale(1.1);
}

.voice-action-btn.voice-favorite-btn.active {
    color: #ff4757;
    background: #fff5f5;
    border-color: #ff4757;
}

.voice-action-btn.voice-favorite-btn.active:hover {
    color: #e63946;
    background: #ffe6e6;
    border-color: #e63946;
    transform: scale(1.1);
}

/* 主播设置 */
.voice-settings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.setting-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.setting-value {
    font-weight: 500;
    color: #667eea;
}

.slider-container {
    position: relative;
}

.setting-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #f0f0f0 0%, #e0e0e0 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: all 0.2s;
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(102, 126, 234, 0.3);
    transition: all 0.2s;
}

.setting-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.setting-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-marks {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

/* 底部状态栏 */
.voices-page .app-container {
    padding-bottom: calc(50px + env(safe-area-inset-bottom));
}

.voices-page .bottom-status {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 50px;
    background: rgba(44, 62, 80, 0.98);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 14px;
    z-index: 1200;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.18);
}

.status-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-center {
    display: flex;
    align-items: center;
    gap: 20px;
}

.char-limit-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.daily-usage-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e74c3c;
    animation: pulse 2s infinite;
}

.status-indicator.daily {
    background: #3498db;
}

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

.char-limit-display {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Courier New', monospace;
}

.daily-usage-display {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Courier New', monospace;
}

.separator {
    opacity: 0.7;
}

.status-right {
    display: flex;
    align-items: center;
}

.quota-info {
    font-size: 12px;
    opacity: 0.9;
}

.vip-only-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 11px;
    line-height: 1.4;
    border-radius: 999px;
    background: #f39c12;
    color: #fff;
    vertical-align: middle;
    white-space: nowrap;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .right-panel {
        width: 280px;
    }
    
    .voice-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .right-panel {
        width: 100%;
        max-height: 40vh;
    }
    
    .toolbar-left {
        overflow-x: auto;
    }
    
    .tool-btn {
        flex-shrink: 0;
    }

    .voices-page .app-container {
        padding-bottom: calc(74px + env(safe-area-inset-bottom));
    }

    .voices-page .bottom-status {
        height: auto;
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .voices-page .status-left,
    .voices-page .status-center,
    .voices-page .status-right {
        flex: 1 1 auto;
        width: 100%;
        justify-content: space-between;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 提示消息样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* 加载和错误消息样式 */
.loading-message, .error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    font-size: 16px;
    color: #666;
    min-height: 200px;
}

.error-message {
    color: #e74c3c;
    flex-direction: column;
    gap: 10px;
}

.loading-message::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* 禁用状态样式 */
.voice-favorite-btn:disabled,
.current-voice-favorite:disabled {
    pointer-events: none;
    cursor: not-allowed;
}

.voice-favorite-btn:disabled i,
.current-voice-favorite:disabled i {
    opacity: 0.6;
}

/* 多音字标注样式 */
.phoneme-marked {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    color: #2e7d32;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    margin: 0 1px;
}

.phoneme-marked:hover {
    background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
    color: #1b5e20;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(46, 125, 50, 0.2);
}

.phoneme-pinyin {
    font-size: 0.8em;
    color: #4caf50;
    font-weight: 500;
    margin-left: 2px;
}

/* 文本显示区域样式 */
.text-display {
    width: 100%;
    height: 100%;
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    background: white;
    border: none;
    outline: none;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.text-display.hidden {
    display: none;
}

#text-input.hidden {
    display: none;
}

/* 风格选择器样式 */
.voice-style-selector {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.voice-style-selector .section-header {
    margin-bottom: 16px;
}

.voice-style-selector .section-header h3 {
    font-size: 16px;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.style-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 8px 0;
}

.style-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 50px;
    height: 50px;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.style-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.style-card:hover::before {
    opacity: 1;
}

.style-card:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
}

.style-card.active {
    border-color: transparent;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.style-card.active::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 1;
}

.style-card.active:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4c93 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.style-name {
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
    word-break: break-all;
    max-width: 100%;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.style-card.active .style-name {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 当前选择区域的风格信息样式 */
.voice-style {
    font-size: 12px;
    color: #667eea;
    margin-top: 4px;
    font-weight: 500;
}

/* 紧凑工具栏样式 */
.toolbar.compact {
    height: 60px;
    padding: 0 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
}

.toolbar.compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b);
}

.tool-btn.compact {
    width: 72px;
    height: 48px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 11px;
}

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

.tool-btn.compact:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
    border-color: #3b82f6;
}

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

.tool-btn.compact:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.tool-btn.compact i {
    font-size: 18px;
    margin-bottom: 4px;
    transition: all 0.3s;
}

.tool-btn.compact:hover i {
    transform: scale(1.1);
}

.tool-btn.compact span {
    font-size: 11px;
    line-height: 1;
    font-weight: 500;
    transition: all 0.3s;
}

/* 音频结果容器样式 */
.audio-result-container {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    margin: 1rem;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.1);
    animation: slideDown 0.3s ease-out;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

.audio-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
}

.audio-result-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-result-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

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

.audio-result-content {
    padding: 1.25rem;
}

.audio-player-wrapper {
    margin-bottom: 1rem;
}

#result-audio-player {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    outline: none;
}

.audio-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.download-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.download-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.replay-btn {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

.replay-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* 响应式设计 - 风格选择器 */
@media (max-width: 768px) {
    .voice-style-selector {
        padding: 16px;
        margin-top: 16px;
    }
    
    .style-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .style-card {
        min-height: 60px;
        padding: 10px 6px;
        border-radius: 16px;
    }
    
    .style-name {
        font-size: 12px;
    }
    
    .audio-result-container {
        margin: 0.5rem;
    }
    
    .audio-actions {
        flex-direction: column;
    }
    
    .action-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .voice-style-selector {
        padding: 12px;
        margin-top: 12px;
        border-radius: 12px;
    }
    
    .style-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .style-card {
        min-height: 50px;
        padding: 8px 4px;
        border-radius: 12px;
    }
    
    .style-card:hover {
        transform: translateY(-2px) scale(1.01);
    }
    
    .style-card.active:hover {
        transform: translateY(-2px) scale(1.01);
    }
    
    .style-name {
        font-size: 11px;
    }
    
    .audio-result-header {
        padding: 0.75rem 1rem;
    }
    
    .audio-result-content {
        padding: 1rem;
    }
}

/* 帮助弹窗样式 */
.help-modal {
    max-width: 900px;
    width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.help-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: linear-gradient(135deg, #fafbff 0%, #f8f9ff 100%);
}

.help-content {
    padding: 2rem 2.5rem;
    background: white;
    margin: 1rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.help-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.help-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h3 {
    color: #2d3748;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.help-section h3 i {
    color: #667eea;
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.help-section p {
    color: #4a5568;
    font-size: 15px;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-weight: 500;
}

.help-section ul {
    margin: 0;
    padding-left: 0;
    color: #2d3748;
    list-style: none;
}

.help-section li {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    color: #4a5568;
}

.help-section li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
    font-size: 12px;
}

.help-section li:last-child {
    margin-bottom: 0;
}

/* 响应式设计 - 帮助弹窗 */
@media (max-width: 768px) {
    .help-modal {
        width: 98%;
        max-height: 90vh;
    }
    
    .help-content {
        padding: 1.5rem 1.75rem;
        margin: 0.75rem;
    }
    
    .help-section {
        margin-bottom: 1.5rem;
        padding: 1.25rem;
    }
    
    .help-section h3 {
        font-size: 16px;
        gap: 10px;
        margin-bottom: 0.75rem;
    }
    
    .help-section h3 i {
        font-size: 14px;
        width: 20px;
        height: 20px;
    }
    
    .help-section p {
        font-size: 14px;
        margin-bottom: 0.75rem;
    }
    
    .help-section li {
        font-size: 13px;
        margin-bottom: 0.5rem;
        padding-left: 1.25rem;
    }
}

@media (max-width: 480px) {
    .help-modal {
        width: 100%;
        max-height: 95vh;
        margin: 0;
        border-radius: 0;
    }
    
    .help-content {
        padding: 1rem 1.25rem;
        margin: 0.5rem;
        border-radius: 12px;
    }
    
    .help-section {
        margin-bottom: 1rem;
        padding: 1rem;
        border-radius: 8px;
    }
    
    .help-section h3 {
        font-size: 15px;
        gap: 8px;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .help-section h3 i {
        font-size: 13px;
        width: 18px;
        height: 18px;
    }
    
    .help-section p {
        font-size: 13px;
        margin-bottom: 0.5rem;
    }
    
    .help-section li {
        font-size: 12px;
        margin-bottom: 0.4rem;
        padding-left: 1rem;
        line-height: 1.6;
    }
    
    .help-section li:before {
        font-size: 10px;
    }
}

/* 自定义命名弹窗样式 */
.custom-name-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.custom-name-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15), 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.custom-name-modal .modal-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
}

.custom-name-modal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1976d2, #3b82f6, #1976d2);
}

.custom-name-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-name-modal .modal-header h3::before {
    content: '\2665';
    color: #1976d2;
    font-size: 20px;
}

.custom-name-modal .modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-name-modal .modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
    transform: scale(1.1);
}

.custom-name-modal .modal-body {
    padding: 28px;
}

.custom-name-modal .modal-body label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.custom-name-modal .modal-body input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 12px;
    background: #fafbff;
    box-sizing: border-box;
}

.custom-name-modal .modal-body input:focus {
    outline: none;
    border-color: #1976d2;
    background: white;
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.08);
    transform: translateY(-1px);
}

.custom-name-modal .modal-body input::placeholder {
    color: #9ca3af;
}

.custom-name-modal .modal-note {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #1976d2;
}

.custom-name-modal .modal-footer {
    padding: 20px 28px 28px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #fafbfc;
}

.custom-name-modal .btn-cancel {
    padding: 12px 24px;
    border: 1px solid #d1d5db;
    background: white;
    color: #6b7280;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.custom-name-modal .btn-cancel:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.custom-name-modal .btn-confirm {
    padding: 12px 24px;
    border: none;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.custom-name-modal .btn-confirm:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.4);
}

.custom-name-modal .btn-confirm:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

@media (max-width: 480px) {
    .custom-name-modal {
        width: 95%;
        max-width: none;
    }
    
    .custom-name-modal .modal-header,
    .custom-name-modal .modal-body,
    .custom-name-modal .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* 语速控制样式 */
.speed-control-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.speed-preset-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.speed-preset-btn {
    flex: 1;
    min-width: 60px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.speed-preset-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.speed-preset-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.speed-slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.speed-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
    transition: all 0.2s ease;
}

.speed-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.speed-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

.speed-value-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}

.speed-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.speed-value {
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
}

.speed-range-info {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    padding: 0 5px;
}

/* 全局侧边栏样式 */
.global-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.global-sidebar.active .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

.sidebar-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 400px;
    max-width: 90%;
    height: 100%;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
}

.global-sidebar.active .sidebar-content {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e8e8e8;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar-close:hover {
    transform: rotate(90deg);
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.qrcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.qrcode-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qrcode-loading {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.qrcode-empty {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.qrcode-empty i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

/* 侧边栏触发按钮 */
.sidebar-toggle-btn {
    position: fixed;
    bottom: 80px;
    left: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

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

@media (max-width: 768px) {
    .sidebar-content {
        width: 100%;
        max-width: 100%;
    }

    .sidebar-toggle-btn {
        bottom: 70px;
        left: 20px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}
