/**
 * Novel Player TTS - Frontend Styles
 * WordPress Plugin
 */

/* CSS Variables */
.novel-player-wrapper {
    --novel-primary: #8B5CF6;
    --novel-primary-dark: #7C3AED;
    --novel-accent: #F59E0B;
    --novel-bg-dark: #0F0F23;
    --novel-bg-card: rgba(30, 30, 60, 0.8);
    --novel-text: #E2E8F0;
    --novel-text-muted: rgba(255, 255, 255, 0.5);
    --novel-glass: rgba(255, 255, 255, 0.08);
    --novel-glass-border: rgba(255, 255, 255, 0.12);
    --novel-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --novel-radius: 16px;

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin-bottom: 30px;
}

.novel-player-wrapper * {
    box-sizing: border-box;
}

.novel-player-container {
    width: 100%;
    max-width: 100%;
    background: var(--novel-bg-card);
    border-radius: var(--novel-radius);
    position: relative;
    overflow: hidden;
    box-shadow: var(--novel-shadow);
    border: 1px solid var(--novel-glass-border);
    backdrop-filter: blur(20px);
}

.novel-player-background-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    filter: blur(2px);
}

.novel-player-background-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(15, 15, 35, 0.6) 0%,
            rgba(15, 15, 35, 0.85) 100%);
    z-index: 2;
}

.novel-player-center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--novel-primary) 0%, var(--novel-primary-dark) 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.4);
}

.novel-player-center-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 15px 50px rgba(139, 92, 246, 0.5);
}

.novel-player-center-play-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.8);
}

.novel-player-center-play-btn::before {
    content: '';
    border-left: 22px solid white;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    margin-left: 5px;
}

/* Controls */
.novel-player-controls-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: linear-gradient(0deg, rgba(15, 15, 35, 0.95) 0%, rgba(15, 15, 35, 0.8) 70%, transparent 100%);
    padding: 40px 20px 20px;
    transition: opacity 0.3s ease;
}

.novel-player-progress-bar-container {
    width: 100%;
    height: 5px;
    background: var(--novel-glass);
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 15px;
    position: relative;
    transition: height 0.2s ease;
}

.novel-player-progress-bar-container:hover {
    height: 8px;
}

.novel-player-progress-filled {
    height: 100%;
    background: linear-gradient(90deg, var(--novel-primary) 0%, var(--novel-accent) 100%);
    border-radius: 3px;
    width: 0%;
    position: relative;
    transition: width 0.1s linear;
}

.novel-player-progress-thumb {
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.novel-player-progress-bar-container:hover .novel-player-progress-thumb {
    opacity: 1;
}

.novel-player-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.novel-player-controls-left,
.novel-player-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.novel-player-control-btn {
    background: transparent;
    border: none;
    color: var(--novel-text);
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.novel-player-control-btn:hover {
    background: var(--novel-glass);
    transform: scale(1.05);
}

.novel-player-control-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.novel-player-play-pause-btn svg {
    width: 26px;
    height: 26px;
}

.novel-player-time-display {
    color: var(--novel-text-muted);
    font-size: 13px;
    font-weight: 500;
    padding: 0 8px;
}

/* Volume */
.novel-player-volume-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.novel-player-volume-slider {
    width: 0;
    height: 4px;
    background: var(--novel-glass);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
    transition: width 0.3s ease;
}

.novel-player-volume-container:hover .novel-player-volume-slider {
    width: 70px;
}

.novel-player-volume-filled {
    height: 100%;
    background: var(--novel-primary);
    width: 100%;
    border-radius: 2px;
}

/* Loading */
.novel-player-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 80px;
    background: rgba(15, 15, 35, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 20;
    backdrop-filter: blur(10px);
}

.novel-player-loading-overlay.active {
    display: flex;
}

.novel-player-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--novel-glass);
    border-top-color: var(--novel-primary);
    border-radius: 50%;
    animation: novel-player-spin 1s linear infinite;
}

@keyframes novel-player-spin {
    to {
        transform: rotate(360deg);
    }
}

.novel-player-loading-text {
    color: var(--novel-text);
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Lyrics */
.novel-player-lyrics-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 100px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 5;
    padding: 10px;
    text-align: left;
    display: none;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.novel-player-lyrics-container::-webkit-scrollbar {
    display: none;
}

.novel-player-lyrics-container.active {
    display: block;
}

.novel-player-lyric-line {
    color: var(--novel-text-muted);
    font-size: 26px;
    margin: 10px 0;
    transition: color 0.3s ease;
    font-weight: 500;
    line-height: 1.7;
    text-align: left;
}

.novel-player-lyric-line.active {
    color: var(--novel-text);
}

.novel-player-lyric-line .word {
    display: inline;
    padding: 0 3px;
    transition: all 0.3s ease;
    color: var(--novel-text-muted);
}

.novel-player-lyric-line .word.active {
    color: var(--novel-accent);
    font-weight: 600;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.novel-player-lyric-line .word.read {
    color: var(--novel-primary);
    opacity: 0.8;
}

/* TTS Status */
.novel-player-tts-status {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 15;
    font-size: 11px;
    color: var(--novel-text-muted);
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(4px);
}

.novel-player-tts-status:empty {
    display: none;
}

.novel-player-tts-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid var(--novel-glass);
    border-top-color: var(--novel-primary);
    border-radius: 50%;
    animation: novel-player-spin 0.8s linear infinite;
}

.novel-player-tts-status.ready .novel-player-tts-spinner {
    display: none;
}

.novel-player-tts-status.ready::before {
    content: '✓';
    color: #22c55e;
}

/* Settings Popup */
.novel-player-settings-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    display: none;
}

.novel-player-settings-popup-overlay.active {
    display: block;
}

.novel-player-settings-popup {
    position: absolute;
    bottom: 70px;
    right: 10px;
    background: rgba(20, 20, 40, 0.98);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
    width: 400px;
    max-height: none;
    overflow: visible;
    display: none;
    border: 1px solid var(--novel-glass-border);
}

.novel-player-settings-popup::-webkit-scrollbar {
    display: none;
}

.novel-player-settings-popup.active {
    display: block;
    animation: novel-player-dropUp 0.2s ease;
}

@keyframes novel-player-dropUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.novel-player-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--novel-glass-border);
}

.novel-player-settings-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--novel-text);
}

.novel-player-settings-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.novel-player-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.novel-player-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.novel-player-settings-label {
    font-size: 12px;
    color: var(--novel-text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.novel-player-settings-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.novel-player-settings-btn-control {
    width: 28px;
    height: 28px;
    background: var(--novel-primary);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.novel-player-settings-btn-control:hover:not(:disabled) {
    background: var(--novel-primary-dark);
}

.novel-player-settings-btn-control:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.novel-player-settings-input {
    width: 50px;
    height: 28px;
    background: var(--novel-glass);
    border: 1px solid var(--novel-glass-border);
    border-radius: 6px;
    color: var(--novel-text);
    font-size: 12px;
    text-align: center;
    padding: 0 4px;
    outline: none;
}

.novel-player-settings-select {
    flex: 1;
    height: 30px;
    background: var(--novel-glass);
    border: 1px solid var(--novel-glass-border);
    border-radius: 6px;
    color: var(--novel-text);
    font-size: 12px;
    padding: 0 8px;
    outline: none;
    cursor: pointer;
}

.novel-player-settings-select option {
    background: #1e1e3c;
    color: var(--novel-text);
}

.novel-player-color-palette {
    display: flex;
    gap: 6px;
}

.novel-player-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.novel-player-color-swatch:hover {
    transform: scale(1.1);
}

.novel-player-color-swatch.selected {
    border-color: var(--novel-primary);
}

.novel-player-settings-default-btn {
    background: var(--novel-glass);
    border: 1px solid var(--novel-glass-border);
    border-radius: 6px;
    color: var(--novel-text-muted);
    font-size: 11px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.novel-player-settings-default-btn:hover {
    background: var(--novel-primary);
    color: white;
}

/* ===========================================
   RESPONSIVE BREAKPOINTS
   =========================================== */

/* Desktop Large - min-width: 1200px */
@media (min-width: 1200px) {
    .novel-player-wrapper {
        max-width: 1140px;
        margin-left: auto;
        margin-right: auto;
    }

    .novel-player-container {
        height: 600px;
    }

    .novel-player-center-play-btn {
        width: 100px;
        height: 100px;
    }

    .novel-player-center-play-btn::before {
        border-left: 26px solid white;
        border-top: 16px solid transparent;
        border-bottom: 16px solid transparent;
    }

    .novel-player-lyric-line {
        font-size: 28px;
        padding: 0 40px;
    }

    .novel-player-lyrics-container {
        padding: 20px 30px;
    }

    .novel-player-controls-container {
        padding: 50px 30px 25px;
    }

    .novel-player-control-btn {
        padding: 12px;
    }

    .novel-player-control-btn svg {
        width: 24px;
        height: 24px;
    }

    .novel-player-play-pause-btn svg {
        width: 28px;
        height: 28px;
    }

    .novel-player-time-display {
        font-size: 14px;
    }

    .novel-player-settings-popup {
        width: 420px;
        padding: 15px;
    }

    .novel-player-settings-label {
        font-size: 13px;
    }

    .novel-player-settings-btn-control {
        width: 32px;
        height: 32px;
    }

    .novel-player-settings-input {
        width: 55px;
        height: 32px;
        font-size: 13px;
    }

    .novel-player-settings-select {
        height: 34px;
        font-size: 13px;
    }

    .novel-player-color-swatch {
        width: 32px;
        height: 32px;
    }
}

/* Desktop - max-width: 1199px and min-width: 992px */
@media (max-width: 1199px) and (min-width: 992px) {
    .novel-player-wrapper {
        max-width: 960px;
        margin-left: auto;
        margin-right: auto;
    }

    .novel-player-container {
        height: 540px;
    }

    .novel-player-center-play-btn {
        width: 90px;
        height: 90px;
    }

    .novel-player-lyric-line {
        font-size: 26px;
        padding: 0 30px;
    }

    .novel-player-lyrics-container {
        padding: 15px 25px;
    }

    .novel-player-controls-container {
        padding: 45px 25px 20px;
    }

    .novel-player-settings-popup {
        width: 400px;
    }
}

/* Tablet - max-width: 991px and min-width: 768px */
@media (max-width: 991px) and (min-width: 768px) {
    .novel-player-wrapper {
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }

    .novel-player-container {
        height: 480px;
    }

    .novel-player-center-play-btn {
        width: 80px;
        height: 80px;
    }

    .novel-player-center-play-btn::before {
        border-left: 20px solid white;
        border-top: 12px solid transparent;
        border-bottom: 12px solid transparent;
    }

    .novel-player-lyric-line {
        font-size: 24px;
        padding: 0 20px;
    }

    .novel-player-lyrics-container {
        padding: 12px 20px;
        bottom: 90px;
    }

    .novel-player-controls-container {
        padding: 40px 20px 18px;
    }

    .novel-player-controls-left,
    .novel-player-controls-right {
        gap: 6px;
    }

    .novel-player-control-btn {
        padding: 9px;
    }

    .novel-player-control-btn svg {
        width: 20px;
        height: 20px;
    }

    .novel-player-play-pause-btn svg {
        width: 24px;
        height: 24px;
    }

    .novel-player-time-display {
        font-size: 12px;
        padding: 0 6px;
    }

    .novel-player-settings-popup {
        width: 380px;
        right: 10px;
    }

    .novel-player-settings-row {
        gap: 6px;
    }

    .novel-player-volume-container:hover .novel-player-volume-slider {
        width: 60px;
    }
}

/* Mobile Large - max-width: 767px and min-width: 580px */
@media (max-width: 767px) and (min-width: 580px) {
    .novel-player-wrapper {
        max-width: 100%;
        padding: 0 15px;
    }

    .novel-player-container {
        height: 420px;
        border-radius: 12px;
    }

    .novel-player-center-play-btn {
        width: 70px;
        height: 70px;
    }

    .novel-player-center-play-btn::before {
        border-left: 18px solid white;
        border-top: 11px solid transparent;
        border-bottom: 11px solid transparent;
        margin-left: 4px;
    }

    .novel-player-lyric-line {
        font-size: 20px;
        padding: 0 15px;
        margin: 8px 0;
    }

    .novel-player-lyrics-container {
        padding: 10px 15px;
        bottom: 85px;
    }

    .novel-player-controls-container {
        padding: 35px 15px 15px;
    }

    .novel-player-controls-left,
    .novel-player-controls-right {
        gap: 4px;
    }

    .novel-player-control-btn {
        padding: 8px;
    }

    .novel-player-control-btn svg {
        width: 18px;
        height: 18px;
    }

    .novel-player-play-pause-btn svg {
        width: 22px;
        height: 22px;
    }

    .novel-player-time-display {
        font-size: 11px;
        padding: 0 5px;
    }

    .novel-player-settings-popup {
        width: 340px;
        right: 5px;
        bottom: 65px;
        padding: 10px;
    }

    .novel-player-settings-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .novel-player-settings-item {
        width: 100%;
        justify-content: space-between;
    }

    .novel-player-settings-btn-control {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    .novel-player-settings-input {
        width: 45px;
        height: 26px;
        font-size: 11px;
    }

    .novel-player-settings-select {
        height: 28px;
        font-size: 11px;
        max-width: 180px;
    }

    .novel-player-color-swatch {
        width: 26px;
        height: 26px;
    }

    .novel-player-volume-container:hover .novel-player-volume-slider {
        width: 50px;
    }

    .novel-player-tts-status {
        font-size: 10px;
        padding: 5px 10px;
    }

    .novel-player-loading-spinner {
        width: 40px;
        height: 40px;
    }

    .novel-player-loading-text {
        font-size: 13px;
    }
}

/* Mobile - max-width: 579px and min-width: 337px */
@media (max-width: 579px) and (min-width: 337px) {
    .novel-player-wrapper {
        max-width: 100%;
        padding: 0 10px;
        margin-bottom: 20px;
    }

    .novel-player-container {
        height: 380px;
        border-radius: 10px;
    }

    .novel-player-center-play-btn {
        width: 60px;
        height: 60px;
    }

    .novel-player-center-play-btn::before {
        border-left: 15px solid white;
        border-top: 9px solid transparent;
        border-bottom: 9px solid transparent;
        margin-left: 3px;
    }

    .novel-player-lyric-line {
        font-size: 17px;
        padding: 0 10px;
        margin: 6px 0;
        line-height: 1.6;
    }

    .novel-player-lyrics-container {
        padding: 8px 10px;
        bottom: 80px;
    }

    .novel-player-controls-container {
        padding: 30px 12px 12px;
    }

    .novel-player-progress-bar-container {
        height: 4px;
        margin-bottom: 12px;
    }

    .novel-player-progress-thumb {
        width: 12px;
        height: 12px;
        right: -6px;
    }

    .novel-player-controls-row {
        gap: 8px;
    }

    .novel-player-controls-left,
    .novel-player-controls-right {
        gap: 2px;
    }

    .novel-player-control-btn {
        padding: 6px;
    }

    .novel-player-control-btn svg {
        width: 16px;
        height: 16px;
    }

    .novel-player-play-pause-btn svg {
        width: 20px;
        height: 20px;
    }

    .novel-player-time-display {
        font-size: 10px;
        padding: 0 4px;
    }

    /* Hide some controls on small screens */
    .novel-player-controls-right [id*="prevBtn"],
    .novel-player-controls-right [id*="nextBtn"] {
        display: none;
    }

    .novel-player-settings-popup {
        width: calc(100vw - 30px);
        max-width: 320px;
        right: 5px;
        left: auto;
        bottom: 60px;
        padding: 8px;
        border-radius: 10px;
    }

    .novel-player-settings-header {
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    .novel-player-settings-title {
        font-size: 13px;
    }

    .novel-player-settings-grid {
        gap: 5px;
    }

    .novel-player-settings-row {
        flex-wrap: wrap;
        gap: 5px;
    }

    .novel-player-settings-item {
        width: 100%;
        justify-content: space-between;
    }

    .novel-player-settings-label {
        font-size: 11px;
    }

    .novel-player-settings-btn-control {
        width: 24px;
        height: 24px;
        font-size: 13px;
    }

    .novel-player-settings-input {
        width: 42px;
        height: 24px;
        font-size: 10px;
    }

    .novel-player-settings-select {
        height: 26px;
        font-size: 10px;
        max-width: 160px;
    }

    .novel-player-color-palette {
        gap: 4px;
    }

    .novel-player-color-swatch {
        width: 24px;
        height: 24px;
        border-radius: 4px;
    }

    .novel-player-settings-default-btn {
        font-size: 10px;
        padding: 3px 8px;
    }

    .novel-player-volume-container:hover .novel-player-volume-slider {
        width: 40px;
    }

    .novel-player-tts-status {
        font-size: 9px;
        padding: 4px 8px;
        gap: 5px;
    }

    .novel-player-tts-spinner {
        width: 10px;
        height: 10px;
    }

    .novel-player-loading-spinner {
        width: 35px;
        height: 35px;
    }

    .novel-player-loading-text {
        font-size: 12px;
        margin-top: 15px;
    }
}

/* Mobile Small - max-width: 336px */
@media (max-width: 336px) {
    .novel-player-wrapper {
        max-width: 100%;
        padding: 0 5px;
        margin-bottom: 15px;
    }

    .novel-player-container {
        height: 320px;
        border-radius: 8px;
    }

    .novel-player-center-play-btn {
        width: 50px;
        height: 50px;
    }

    .novel-player-center-play-btn::before {
        border-left: 12px solid white;
        border-top: 7px solid transparent;
        border-bottom: 7px solid transparent;
        margin-left: 2px;
    }

    .novel-player-lyric-line {
        font-size: 14px;
        padding: 0 8px;
        margin: 5px 0;
        line-height: 1.5;
    }

    .novel-player-lyric-line .word {
        padding: 0 1px;
    }

    .novel-player-lyrics-container {
        padding: 6px 8px;
        bottom: 70px;
    }

    .novel-player-controls-container {
        padding: 25px 8px 10px;
    }

    .novel-player-progress-bar-container {
        height: 3px;
        margin-bottom: 10px;
    }

    .novel-player-progress-thumb {
        width: 10px;
        height: 10px;
        right: -5px;
    }

    .novel-player-controls-row {
        gap: 5px;
    }

    .novel-player-controls-left,
    .novel-player-controls-right {
        gap: 1px;
    }

    .novel-player-control-btn {
        padding: 5px;
    }

    .novel-player-control-btn svg {
        width: 14px;
        height: 14px;
    }

    .novel-player-play-pause-btn svg {
        width: 18px;
        height: 18px;
    }

    .novel-player-time-display {
        font-size: 9px;
        padding: 0 3px;
    }

    /* Hide more controls on very small screens */
    .novel-player-controls-left [id*="prevBtn"],
    .novel-player-controls-left [id*="nextBtn"] {
        display: none;
    }

    .novel-player-volume-container {
        display: none;
    }

    .novel-player-settings-popup {
        width: calc(100vw - 20px);
        max-width: 280px;
        right: 5px;
        bottom: 55px;
        padding: 6px;
        border-radius: 8px;
    }

    .novel-player-settings-header {
        margin-bottom: 6px;
        padding-bottom: 5px;
    }

    .novel-player-settings-title {
        font-size: 12px;
    }

    .novel-player-settings-grid {
        gap: 4px;
    }

    .novel-player-settings-row {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .novel-player-settings-item {
        width: 100%;
    }

    .novel-player-settings-label {
        font-size: 10px;
        min-width: 50px;
    }

    .novel-player-settings-controls {
        gap: 2px;
    }

    .novel-player-settings-btn-control {
        width: 22px;
        height: 22px;
        font-size: 12px;
        border-radius: 4px;
    }

    .novel-player-settings-input {
        width: 38px;
        height: 22px;
        font-size: 9px;
        border-radius: 4px;
    }

    .novel-player-settings-select {
        height: 24px;
        font-size: 9px;
        max-width: 140px;
        padding: 0 5px;
    }

    .novel-player-color-palette {
        gap: 3px;
        flex-wrap: wrap;
    }

    .novel-player-color-swatch {
        width: 20px;
        height: 20px;
        border-radius: 3px;
    }

    .novel-player-settings-default-btn {
        font-size: 9px;
        padding: 2px 6px;
    }

    .novel-player-tts-status {
        font-size: 8px;
        padding: 3px 6px;
        gap: 4px;
        top: 5px;
        left: 5px;
    }

    .novel-player-tts-spinner {
        width: 8px;
        height: 8px;
    }

    .novel-player-loading-overlay {
        bottom: 60px;
    }

    .novel-player-loading-spinner {
        width: 30px;
        height: 30px;
        border-width: 2px;
    }

    .novel-player-loading-text {
        font-size: 11px;
        margin-top: 12px;
    }
}

/* Toggle Switch */
.novel-player-settings-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.novel-player-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.novel-player-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.novel-player-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 24px;
}

.novel-player-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.novel-player-toggle-switch input:checked + .novel-player-toggle-slider {
    background: linear-gradient(135deg, var(--novel-primary) 0%, var(--novel-primary-dark) 100%);
}

.novel-player-toggle-switch input:checked + .novel-player-toggle-slider:before {
    transform: translateX(20px);
}

/* Disabled Navigation Buttons */
.novel-player-control-btn.nav-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.novel-player-control-btn.nav-disabled:hover {
    background: transparent;
}