.speech-control {
    position: fixed;
    left: 24px;
    bottom: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.speech-toggle-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFB800 0%, #FF8F00 100%);
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 184, 0, 0.4);
}

.speech-toggle-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 184, 0, 0.5);
}

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

.speech-panel {
    width: 280px;
    background: rgba(26, 27, 58, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-20px) translateY(10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.speech-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) translateY(0);
}

[ data-theme="light"] .speech-panel {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 184, 0, 0.3);
}

.speech-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.1) 0%, rgba(255, 143, 0, 0.1) 100%);
    border-bottom: 1px solid rgba(255, 184, 0, 0.15);
}

[ data-theme="light"] .speech-panel-header {
    background: rgba(255, 184, 0, 0.08);
    border-bottom: 1px solid rgba(255, 184, 0, 0.2);
}

.speech-panel-title {
    font-size: 15px;
    font-weight: 600;
    color: #FFB800;
}

[ data-theme="light"] .speech-panel-title {
    color: #c9a227;
}

.speech-panel-close {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

[ data-theme="light"] .speech-panel-close {
    background: rgba(0, 0, 0, 0.08);
    color: #666;
}

.speech-panel-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #FCA5A5;
}

.speech-panel-body {
    padding: 16px;
}

.speech-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin-bottom: 12px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

[ data-theme="light"] .speech-status {
    color: #666;
    background: rgba(0, 0, 0, 0.05);
}

.speech-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 14px;
    overflow: hidden;
}

[ data-theme="light"] .speech-progress-bar {
    background: rgba(0, 0, 0, 0.1);
}

.speech-progress {
    height: 100%;
    background: linear-gradient(90deg, #FFB800 0%, #FF8F00 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.speech-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.speech-btn {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 184, 0, 0.2);
    background: rgba(255, 184, 0, 0.08);
    color: #FFB800;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

[ data-theme="light"] .speech-btn {
    background: rgba(255, 184, 0, 0.06);
    border-color: rgba(255, 184, 0, 0.3);
    color: #c9a227;
}

.speech-btn:hover {
    background: rgba(255, 184, 0, 0.15);
    border-color: rgba(255, 184, 0, 0.4);
    transform: translateY(-1px);
}

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

.speech-settings {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[ data-theme="light"] .speech-settings {
    border-top-color: rgba(0, 0, 0, 0.08);
}

.speech-setting-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.speech-setting-item label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

[ data-theme="light"] .speech-setting-item label {
    color: #666;
}

#speech-lang-select {
    flex: 1;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

[ data-theme="light"] #speech-lang-select {
    background: #fff;
    border-color: #ddd;
    color: #333;
}

#speech-lang-select option {
    background: #1A1B3A;
    color: #fff;
}

[ data-theme="light"] #speech-lang-select option {
    background: #fff;
    color: #333;
}

#speech-rate-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

[ data-theme="light"] #speech-rate-slider {
    background: rgba(0, 0, 0, 0.1);
}

#speech-rate-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFB800 0%, #FF8F00 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 184, 0, 0.4);
    transition: transform 0.2s;
}

#speech-rate-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#speech-rate-value {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 36px;
    text-align: right;
}

[ data-theme="light"] #speech-rate-value {
    color: #666;
}

.speech-tip {
    margin-top: 12px;
    padding: 10px;
    background: rgba(255, 184, 0, 0.08);
    border-radius: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

[ data-theme="light"] .speech-tip {
    background: rgba(255, 184, 0, 0.06);
    color: #888;
}

@media (max-width: 768px) {
    .speech-control {
        left: 12px;
        bottom: 80px;
        gap: 8px;
    }
    
    .speech-toggle-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .speech-panel {
        width: calc(100vw - 48px);
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .speech-control {
        left: 8px;
        bottom: 60px;
    }
    
    .speech-toggle-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .speech-panel {
        width: calc(100vw - 32px);
        max-width: 260px;
    }
    
    .speech-panel-body {
        padding: 12px;
    }
    
    .speech-controls {
        gap: 6px;
    }
    
    .speech-btn {
        padding: 8px;
        font-size: 11px;
    }
    
    .speech-tip {
        font-size: 10px;
        padding: 8px;
    }
}