/**
 * Theatre Rehearsal - Frontend Styles
 * Karaoke-style script reader with beautiful typography
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

.theatre-rehearsal {
    /* Dark Theme (Default) */
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: rgba(26, 26, 46, 0.9);
    --text-primary: #fff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.5);
    --accent: #e94560;
    --accent-glow: rgba(233, 69, 96, 0.4);
    --accent-secondary: #00d9ff;
    --border: rgba(255, 255, 255, 0.1);
    --success: #4caf50;
    --spotlight-bg: linear-gradient(180deg, rgba(233, 69, 96, 0.15) 0%, rgba(15, 15, 26, 0.95) 100%);

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Sizing */
    --radius: 12px;
    --radius-lg: 20px;
}

.theatre-rehearsal.theme-light {
    --bg-primary: #f5f5f5;
    --bg-secondary: #fff;
    --bg-tertiary: #e8e8e8;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #1a1a2e;
    --text-secondary: rgba(26, 26, 46, 0.8);
    --text-muted: rgba(26, 26, 46, 0.5);
    --border: rgba(0, 0, 0, 0.1);
    --spotlight-bg: linear-gradient(180deg, rgba(233, 69, 96, 0.1) 0%, rgba(245, 245, 245, 0.95) 100%);
}

/* ==========================================================================
   Base Container
   ========================================================================== */

.theatre-rehearsal {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 600px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

/* ==========================================================================
   Setup Phase
   ========================================================================== */

.theatre-setup {
    padding: 40px;
    max-width: 700px;
    margin: 0 auto;
}

.theatre-header {
    text-align: center;
    margin-bottom: 40px;
}

.theatre-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--text-primary);
}

.theatre-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

.theatre-section {
    margin-bottom: 30px;
}

.theatre-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.theatre-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 15px;
}

/* Scene Search Container */
.scene-search-container {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.category-filter {
    flex: 0 0 180px;
}

.autocomplete-wrapper {
    flex: 1;
    min-width: 300px;
    position: relative;
}

/* Category Filter Select */
.theatre-select-category {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    font-family: var(--font-body);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23e94560' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    transition: all 0.3s ease;
}

.theatre-select-category:hover {
    border-color: var(--accent);
}

.theatre-select-category:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Scene Search Input */
.theatre-input-search {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    font-family: var(--font-body);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.theatre-input-search:hover {
    border-color: var(--accent);
}

.theatre-input-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.theatre-input-search::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Search Results Dropdown */
.theatre-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.2s ease;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

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

.search-result-item:hover {
    background: var(--bg-tertiary);
}

.result-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.result-meta {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.result-author {
    font-style: italic;
}

.result-category {
    padding: 2px 8px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 4px;
    font-weight: 500;
}

.result-year {
    opacity: 0.8;
}

.result-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 6px;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* Scene Select (hidden by default now) */
.theatre-select {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    font-family: var(--font-body);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23e94560' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    transition: all 0.3s ease;
}

.theatre-select:hover {
    border-color: var(--accent);
}

.theatre-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Scene Info Card */
.theatre-scene-info {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

.theatre-scene-info h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin: 0 0 12px;
    color: var(--text-primary);
}

.theatre-scene-info p {
    color: var(--text-secondary);
    margin: 0 0 16px;
    line-height: 1.6;
}

.scene-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.meta-divider {
    margin: 0 10px;
    opacity: 0.5;
}

/* Character Selection */
.theatre-character-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.character-option {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
}

.character-option:hover {
    border-color: var(--accent);
    background: var(--bg-tertiary);
}

.theatre-rehearsal .character-option.selected {
    border-color: var(--accent) !important;
    background: rgba(233, 69, 96, 0.15) !important;
}

.character-option input {
    display: none;
}

.character-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 6px;
    margin-right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theatre-rehearsal .character-option.selected .character-checkbox {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
}

.character-checkbox::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.theatre-rehearsal .character-option.selected .character-checkbox::after {
    opacity: 1 !important;
}

.character-name {
    font-weight: 600;
    font-size: 1rem;
}

/* Buttons */
.theatre-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.theatre-btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #c73e54 100%);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.theatre-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.theatre-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.theatre-btn-secondary:hover {
    border-color: var(--accent);
    background: var(--bg-tertiary);
}

.theatre-btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.2rem;
}

.btn-icon {
    font-size: 1.3rem;
}

#theatre-start-section {
    text-align: center;
    margin-top: 40px;
}

/* ==========================================================================
   Rehearsal Stage
   ========================================================================== */

.theatre-stage {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 600px;
}

.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.stage-header h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin: 0;
    color: var(--text-primary);
}

.stage-controls {
    display: flex;
    gap: 10px;
}

/* Script Display */
.stage-script {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    max-height: 300px;
}

.script-line {
    display: flex;
    gap: 20px;
    padding: 16px 20px;
    margin-bottom: 8px;
    border-radius: var(--radius);
    transition: all 0.4s ease;
    opacity: 0.85;
}

.script-line.past {
    opacity: 0.5;
}

.script-line.current {
    opacity: 1;
    background: var(--spotlight-bg);
    transform: scale(1.02);
    box-shadow: 0 0 40px var(--accent-glow);
}

.script-line.upcoming {
    opacity: 0.85;
}

.script-line.user-line {
    border-left: 3px solid var(--accent-secondary);
}

.script-line.user-line.current {
    border-left: 3px solid var(--accent-secondary);
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.3);
}

.line-character {
    font-weight: 600;
    color: var(--accent);
    min-width: 120px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding-top: 3px;
}

.script-line.user-line .line-character {
    color: var(--accent-secondary);
}

.line-text {
    flex: 1;
    font-family: var(--font-display);
    font-size: 1.25rem;
    line-height: 1.6;
    font-style: italic;
}

/* Spotlight (Current Line Focus) */
.stage-spotlight {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 30px 40px;
    text-align: center;
}

.spotlight-character {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 12px;
}

.spotlight-text {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-style: italic;
    line-height: 1.5;
}

.spotlight-text .word {
    transition: color 0.3s ease, background 0.3s ease, text-shadow 0.3s ease;
    color: #666;
    padding: 6px 10px;
    margin: 3px;
    display: inline-block;
    border-radius: 6px;
    border: 2px solid transparent;
    font-size: 1.8rem;
}

.spotlight-text .word.highlight {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
    background: rgba(233, 69, 96, 0.1);
}

.spotlight-text .word.spoken {
    color: #00ff88 !important;
    font-weight: 700 !important;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.8) !important;
    background: rgba(0, 255, 136, 0.25) !important;
    border: 3px solid #00ff88 !important;
    transform: scale(1.1);
}

.spotlight-text .word.skipped {
    color: #ff9800 !important;
    font-weight: 400;
    text-decoration: line-through;
    opacity: 0.5;
    background: rgba(255, 152, 0, 0.15);
}

.spotlight-text .word.wrong-order {
    color: #ff4444 !important;
    font-weight: 600;
    text-shadow: 0 0 15px rgba(255, 68, 68, 0.6) !important;
    background: rgba(255, 68, 68, 0.2) !important;
    border: 2px dashed #ff4444 !important;
}

/* Word highlighting in script lines */
.script-line .line-text .word {
    transition: color 0.3s ease, background 0.3s ease, text-shadow 0.3s ease, opacity 0.3s ease, text-decoration 0.3s ease;
    padding: 2px 4px;
    margin: 0 1px;
    display: inline-block;
    border-radius: 4px;
    border: 2px solid transparent;
}

.script-line .line-text .word.spoken {
    color: #00ff88 !important;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.8) !important;
    background: rgba(0, 255, 136, 0.25) !important;
    border-color: #00ff88 !important;
}

.script-line .line-text .word.skipped {
    color: #ff9800 !important;
    text-decoration: line-through;
    opacity: 0.6;
    background: rgba(255, 152, 0, 0.15);
}

.script-line .line-text .word.highlight {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
    background: rgba(233, 69, 96, 0.1);
}

.spotlight-cue {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 15px;
}

/* Your Turn Prompt */
.stage-your-turn {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.2) 0%, var(--bg-secondary) 100%);
    border-top: 2px solid var(--accent-secondary);
    padding: 30px 40px;
    text-align: center;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: inset 0 0 30px rgba(0, 217, 255, 0.1);
    }

    50% {
        box-shadow: inset 0 0 50px rgba(0, 217, 255, 0.2);
    }
}

.your-turn-badge {
    display: inline-block;
    background: var(--accent-secondary);
    color: #000;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.your-turn-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

#your-turn-hint-text {
    color: var(--text-secondary);
}

/* Progress Bar */
.stage-progress {
    background: var(--bg-tertiary);
    padding: 20px 40px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-secondary) 100%);
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    min-width: 80px;
    text-align: right;
}

/* ==========================================================================
   Scene Complete
   ========================================================================== */

.theatre-complete {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    padding: 40px;
}

.complete-content {
    text-align: center;
    max-width: 500px;
}

.complete-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 0.6s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.complete-content h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    margin: 0 0 15px;
}

.complete-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0 0 30px;
}

.complete-accuracy {
    margin: 20px 0;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: inline-block;
}

.complete-accuracy .accuracy-label {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-right: 10px;
}

.complete-accuracy .accuracy-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.complete-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   Loading Overlay
   ========================================================================== */

.theatre-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 26, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.theatre-loading p {
    color: var(--text-secondary);
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .theatre-setup {
        padding: 24px;
    }

    .theatre-title {
        font-size: 1.8rem;
    }

    .character-option {
        min-width: 100%;
    }

    .stage-header {
        padding: 16px 20px;
    }

    .stage-script {
        padding: 20px;
    }

    .script-line {
        flex-direction: column;
        gap: 8px;
    }

    .line-character {
        min-width: auto;
    }

    .line-text {
        font-size: 1.1rem;
    }

    .spotlight-text {
        font-size: 1.4rem;
    }

    .stage-progress {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }

    .progress-text {
        text-align: center;
    }
}
/* ==========================================================================
   Modals & Import Features
   ========================================================================== */

.theatre-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.theatre-modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.theatre-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.theatre-modal-header h3 {
    margin: 0;
    font-family: var(--font-display);
    color: var(--text-primary);
    font-size: 1.5rem;
}

.theatre-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.2s ease;
}

.theatre-modal-close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.theatre-modal-body {
    padding: 30px;
    overflow-y: auto;
}

.theatre-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.theatre-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
}

.theatre-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.theatre-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    resize: vertical;
}

.theatre-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.gutenberg-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gutenberg-result-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gutenberg-result-item:hover {
    border-color: var(--accent);
    background: var(--bg-card);
    transform: translateY(-2px);
}

.gutenberg-result-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.gutenberg-result-author {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.gutenberg-result-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.theatre-import-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.theatre-loading-inline {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

/* ==========================================================================
   New Scene Settings Modal Styles
   ========================================================================== */

#theatre-start-section {
    display: flex;
    justify-content: center;
    gap: 15px;
}

#theatre-settings-modal .theatre-modal-body {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

#settings-character-voices {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.settings-char-voice-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.settings-char-voice-row label {
    flex: 1;
    font-weight: 600;
    color: var(--text-secondary);
}

.settings-char-voice-row .voice-select-container {
    flex: 2;
    display: flex;
    gap: 8px;
    align-items: center;
}

.settings-char-voice-row .theatre-select {
    flex: 1;
}

.settings-char-voice-row .voice-preview-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-char-voice-row .voice-preview-btn:hover {
    background: var(--accent-dark);
    transform: scale(1.05);
}

.settings-char-voice-row .voice-preview-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.settings-char-voice-row .voice-preview-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

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

.setting-item label {
    flex-basis: 120px;
    font-weight: 600;
    color: var(--text-secondary);
}

.setting-item input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
}

.setting-item input[type="range"]:hover {
    opacity: 1;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent);
    cursor: pointer;
    border-radius: 50%;
}

.setting-item input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent);
    cursor: pointer;
    border-radius: 50%;
}

.setting-item span {
    min-width: 50px;
    font-weight: 600;
}

.theatre-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================================
   Floating Controls Menu
   ========================================================================== */

.theatre-floating-menu {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(34, 34, 34, 0.9);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 15px;
    z-index: 1000;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theatre-floating-menu .theatre-btn-icon {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.theatre-floating-menu .theatre-btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.theatre-floating-menu .theatre-btn-icon:active {
    transform: translateY(0);
    background-color: rgba(255, 255, 255, 0.2);
}

.theatre-floating-menu .theatre-btn-icon .icon-pause,
.theatre-floating-menu .theatre-btn-icon .icon-play {
    display: block;
}

/* Timer status text */
.theatre-floating-menu #timer-status {
    font-size: 14px;
    font-weight: bold;
    color: #4CAF50;
    min-width: 30px;
    text-align: center;
}

.theatre-floating-menu #floating-timer-toggle-btn.timer-off #timer-status {
    color: #f44336;
}

/* Timer countdown display */
.timer-countdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    font-weight: bold;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
    z-index: 999;
    pointer-events: none;
}

/* Floating Accuracy Counter */
.theatre-accuracy-counter {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 15px 20px;
    min-width: 120px;
    text-align: center;
    z-index: 998;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.theatre-accuracy-counter .accuracy-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    transition: color 0.2s ease;
}

.theatre-accuracy-counter .accuracy-close:hover {
    color: var(--accent);
}

.theatre-accuracy-counter .accuracy-percentage {
    font-size: 32px;
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    margin-bottom: 5px;
}

.theatre-accuracy-counter .accuracy-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.theatre-accuracy-counter .accuracy-stats {
    font-size: 12px;
    color: var(--text-secondary);
}
