/* TTS Reader Styles */

.tts-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #dc3545;
    border-radius: 50%;
    display: none;
}

.tts-indicator.active {
    display: block;
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Control Panel */
.tts-control-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 320px;
    background: #1a1a2e;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 9998;
    overflow: hidden;
    color: white;
}

.tts-control-panel.hidden {
    display: none;
}

.tts-panel-header {
    background: linear-gradient(135deg, #198754, #20c997);
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tts-panel-header h3 {
    margin: 0;
    font-size: 14px;
}

.tts-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.tts-panel-body {
    padding: 14px;
}

/* Controls */
.tts-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 5px;
}

.tts-ctrl-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #2d2d44;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.tts-ctrl-btn:hover {
    background: #3d3d54;
}

.tts-play-btn {
    background: #198754 !important;
    width: 44px;
    height: 44px;
    font-size: 12px;
}

.tts-play-btn:hover {
    background: #157347 !important;
}

/* Progress */
.tts-progress {
    margin-bottom: 16px;
}

.tts-progress-bar {
    height: 6px;
    background: #2d2d44;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.tts-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #198754, #20c997);
    width: 0%;
    transition: width 0.3s;
}

#tts-progress-text {
    font-size: 12px;
    color: #888;
}

/* Settings */
.tts-setting {
    margin-bottom: 12px;
}

.tts-setting label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #ccc;
}

.tts-setting select,
.tts-setting input[type="range"] {
    width: 100%;
}

.tts-setting select {
    padding: 8px;
    border-radius: 8px;
    border: none;
    background: #2d2d44;
    color: white;
}

.tts-setting input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    background: #2d2d44;
    border-radius: 3px;
}

.tts-setting input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #198754;
    border-radius: 50%;
    cursor: pointer;
}

/* Highlight */
.tts-highlight {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.3), rgba(32, 201, 151, 0.2)) !important;
    border-left: 3px solid #198754 !important;
    padding-left: 12px !important;
    border-radius: 4px;
    transition: all 0.3s;
}

.tts-read {
    opacity: 0.5;
}

/* Next Chapter Modal */
.tts-next-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.tts-next-content {
    background: #1a1a2e;
    padding: 24px 32px;
    border-radius: 16px;
    text-align: center;
    color: white;
}

.tts-next-content p {
    margin-bottom: 16px;
    font-size: 18px;
}

.tts-next-content button {
    padding: 10px 24px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}