/* 基础样式 */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

body {
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 顶部标题栏 */
.header-btn {
    color: var(--gray-300);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background-color: rgba(75, 85, 99, 0.3);
}

.header-btn:hover {
    background-color: rgba(75, 85, 99, 0.5);
    color: white;
}

/* 控制按钮样式 */
.control-btn {
    background-color: rgba(75, 85, 99, 0.7);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.control-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 50% 50% 0 0;
}

.control-btn:hover {
    background-color: rgba(55, 65, 81, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.control-btn.active {
    background-color: var(--primary);
}

.control-btn.recording {
    background-color: var(--danger);
    animation: pulse 1.5s infinite;
}

/* 控制组样式 */
.control-groups {
    background-color: rgba(31, 41, 55, 0.4);
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin: 0.5rem 0;
}

.control-group-item {
    background-color: rgba(55, 65, 81, 0.4);
    border: 1px solid rgba(75, 85, 99, 0.4);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s;
    flex: 1;
    min-width: 200px;
}

.control-group-item:hover {
    background-color: rgba(55, 65, 81, 0.6);
    border-color: rgba(75, 85, 99, 0.6);
}

.control-group-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-group-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    min-width: 80px;
}

.control-group-label i {
    font-size: 0.875rem;
    width: 16px;
    text-align: center;
}

/* 调整滑动条容器样式 */
.slider-container {
    flex: 1;
    min-width: 100px;
}

/* 现代滑块样式 */
.modern-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(75, 85, 99, 0.5);
    outline: none;
    margin: 0;
}

.modern-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.modern-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.modern-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    border: none;
}

.modern-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

/* 提词器文本容器 */
#text-container {
    position: relative;
    overflow: hidden;
    will-change: transform;
    padding: 100px 0;
}

#prompter-text {
    word-wrap: break-word;
    white-space: pre-wrap;
    transition: font-size 0.3s;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 侧边面板 */
.side-panel {
    position: fixed;
    top: 0;
    height: 100%;
    width: 85%;
    max-width: 400px;
    background-color: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    z-index: 50;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border-radius: 0;
}

.left-panel {
    left: 0;
    transform: translateX(-100%);
    border-right: 1px solid var(--gray-700);
}

.right-panel {
    right: 0;
    transform: translateX(100%);
    border-left: 1px solid var(--gray-700);
}

.side-panel.active {
    transform: translateX(0);
}

/* 面板内部样式 */
.panel-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    background-color: rgba(75, 85, 99, 0.2);
    transition: all 0.2s;
}

.panel-close-btn:hover {
    background-color: rgba(75, 85, 99, 0.4);
    color: white;
}

/* 添加面板操作按钮样式 */
.panel-action-btn {
    padding: 0.375rem 0.75rem;
    background-color: rgba(75, 85, 99, 0.5);
    color: white;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
    white-space: nowrap;
}

.panel-action-btn:hover {
    background-color: rgba(75, 85, 99, 0.7);
}

.panel-action-btn:active {
    transform: translateY(1px);
}

.panel-action-btn i {
    margin-right: 0.25rem;
}

.panel-select {
    background-color: rgba(55, 65, 81, 0.5);
    border: 1px solid var(--gray-600);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    outline: none;
    transition: all 0.2s;
    font-size: 14px;
}

.panel-select:focus {
    border-color: var(--primary);
}

/* 设置组样式 */
.setting-group {
    background-color: rgba(31, 41, 55, 0.5);
    border: 1px solid var(--gray-700);
    border-radius: 8px;
    padding: 16px;
}

.setting-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--gray-200);
    display: flex;
    align-items: center;
}

.setting-label {
    display: block;
    font-size: 14px;
    color: var(--gray-300);
    margin-bottom: 6px;
}

/* 颜色选择器 */
.color-picker-container {
    display: flex;
    align-items: center;
}

.color-picker {
    -webkit-appearance: none;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background-color: transparent;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.color-picker::-moz-color-swatch {
    border: none;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.color-value {
    margin-left: 10px;
    font-size: 12px;
    color: var(--gray-400);
    font-family: monospace;
}

/* 开关样式 */
.toggle-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    background-color: var(--gray-600);
    border-radius: 10px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s;
}

input:checked + .toggle-slider {
    background-color: var(--primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-label {
    margin-left: 10px;
    font-size: 14px;
    color: var(--gray-300);
}

/* 录音指示器 */
.recording-dot {
    width: 12px;
    height: 12px;
    background-color: var(--danger);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 提词器指示器 */
.prompter-indicator {
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 40;
    top: var(--indicator-position, 50%);
    transform: translateY(-50%);
    transition: top 0.3s ease;
}

/* 中心指示区 */
.center-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, 
        transparent 0%, 
        rgba(59, 130, 246, 0.3) 20%, 
        rgba(59, 130, 246, 0.5) 50%, 
        rgba(59, 130, 246, 0.3) 80%, 
        transparent 100%
    );
}

/* 指示箭头 */
.indicator-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-color: rgba(59, 130, 246, 0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.indicator-arrow i {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

.indicator-arrow.right {
    right: 30px;
}

.indicator-arrow:not(.right) {
    left: 30px;
}

/* 移除箭头动画，改为悬停效果 */
.indicator-arrow:hover {
    background-color: rgba(59, 130, 246, 0.25);
}

.indicator-arrow:hover i {
    color: rgba(255, 255, 255, 0.9);
}

/* 当前行高亮效果 */
.current-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    transform: translateY(-50%);
    background-color: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    pointer-events: none;
    z-index: 35;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.05);
    top: var(--indicator-position, 50%);
    transition: top 0.3s ease;
}

/* 进度条动画 */
@keyframes progress-glow {
    0% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    }
    100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.3);
    }
}

#progress-bar {
    animation: progress-glow 2s infinite;
}

/* 移除响应式布局中的相关样式 */
@media (max-width: 640px) {
    #control-panel {
        padding: 12px 8px;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
    }
    
    #prompter-text {
        font-size: 40px !important;
    }
    
    .slider-container {
        width: 100px;
    }
    
    .side-panel {
        width: 100%;
        max-width: none;
    }
    
    .control-groups {
        padding: 0.5rem;
    }
    
    .control-group-item {
        width: 100%;
        min-width: 0;
    }
    
    .control-group-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .slider-container {
        width: 100%;
    }
}

/* 修改浮动提示框样式 */
.value-tooltip {
    position: fixed;
    background-color: rgba(31, 41, 55, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    transform: translateX(-50%);
    margin-top: -25px; /* 调整到滑动条上方 */
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.value-tooltip::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid rgba(31, 41, 55, 0.9);
}

.value-tooltip.show {
    opacity: 1;
}

/* 帮助按钮悬停效果 */
#help-btn {
    transition: transform 0.3s, background-color 0.3s;
}

#help-btn:hover {
    transform: scale(1.1);
}

/* 帮助面板动画 */
#help-panel.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* 帮助面板内容样式 */
#help-panel h4 {
    font-size: 0.95rem;
}

#help-panel p {
    margin-bottom: 0.5rem;
    color: #d1d5db;
}

#help-panel i.fas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
} 