body.font-small {
    font-size: 13px;
    --cdp-font-scale: 0.87;
}
body.font-small .cdp-settings-header h3,
body.font-small .cdp-settings-label-text,
body.font-small .cdp-settings-label-desc,
body.font-small .cdp-settings-section-title {
    font-size: 15px;
}
body.font-small .cdp-fontsize-btn {
    font-size: 12px;
}
body.font-small .cdp-settings-panel,
body.font-small .cdp-settings-item,
body.font-small .cdp-theme-btn,
body.font-small .cdp-music-btn,
body.font-small .cdp-sound-btn {
    font-size: 13px;
}

body.font-medium {
    font-size: 15px;
    --cdp-font-scale: 1;
}
body.font-medium .cdp-settings-header h3,
body.font-medium .cdp-settings-label-text,
body.font-medium .cdp-settings-label-desc,
body.font-medium .cdp-settings-section-title {
    font-size: 17px;
}
body.font-medium .cdp-fontsize-btn {
    font-size: 14px;
}
body.font-medium .cdp-settings-panel,
body.font-medium .cdp-settings-item,
body.font-medium .cdp-theme-btn,
body.font-medium .cdp-music-btn,
body.font-medium .cdp-sound-btn {
    font-size: 15px;
}

body.font-large {
    font-size: 17px;
    --cdp-font-scale: 1.13;
}
body.font-large .cdp-settings-header h3,
body.font-large .cdp-settings-label-text,
body.font-large .cdp-settings-label-desc,
body.font-large .cdp-settings-section-title {
    font-size: 20px;
}
body.font-large .cdp-fontsize-btn {
    font-size: 16px;
}
body.font-large .cdp-settings-panel,
body.font-large .cdp-settings-item,
body.font-large .cdp-theme-btn,
body.font-large .cdp-music-btn,
body.font-large .cdp-sound-btn {
    font-size: 17px;
}
body.dark-mode {
    background: #181A20 !important;
    color: #fff !important;
}
body.dark-mode .cdp-settings-panel,
body.dark-mode .cdp-settings-header,
body.dark-mode .cdp-settings-section,
body.dark-mode .cdp-settings-item,
body.dark-mode .cdp-theme-toggle,
body.dark-mode .cdp-fontsize-toggle {
    background: #23262F !important;
    color: #fff !important;
}
body.dark-mode .cdp-settings-header h3,
body.dark-mode .cdp-settings-label-text,
body.dark-mode .cdp-settings-label-desc,
body.dark-mode .cdp-settings-section-title {
    color: #fff !important;
}
body.dark-mode .cdp-theme-btn {
    color: #fff !important;
}
body.dark-mode .cdp-theme-btn.active[data-theme="dark"] {
    background: #d9a300 !important;
    color: #fff !important;
}
body.dark-mode .cdp-theme-btn.active[data-theme="light"] {
    background: #fff !important;
    color: #d9a300 !important;
}
/* ===================================
   SETTINGS PANEL STYLES
   =================================== */

.cdp-settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.cdp-settings-panel[data-visible="true"] {
    transform: translateX(0);
}

.cdp-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.cdp-settings-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cdp-settings-header h3 i {
    color: #ffffff;
    background: #d9a300;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.cdp-settings-close {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.cdp-settings-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.cdp-settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.cdp-settings-section {
    margin-bottom: 32px;
}

.cdp-settings-section:last-child {
    margin-bottom: 0;
}

.cdp-settings-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.cdp-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.cdp-settings-item:last-child {
    border-bottom: none;
}

.cdp-settings-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cdp-settings-label-text {
    font-size: 15px;
    font-weight: 500;
    color: #111827;
}

.cdp-settings-label-desc {
    font-size: 13px;
    color: #6b7280;
}

/* Theme Toggle */
.cdp-theme-toggle {
    display: flex;
    gap: 8px;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 8px;
}

.cdp-theme-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cdp-theme-btn:hover {
    color: #111827;
}

.cdp-theme-btn.active {
    background: #ffffff;
    color: #d9a300;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Font Size Toggle */
.cdp-fontsize-toggle {
    display: flex;
    gap: 8px;
}

.cdp-fontsize-btn {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
    min-width: 60px;
    text-align: center;
}

.cdp-fontsize-btn:hover {
    border-color: #d9a300;
    color: #d9a300;
}

.cdp-fontsize-btn.active {
    background: #d9a300;
    border-color: #d9a300;
    color: #ffffff;
}

/* Dark Mode Styles - Pure Black */
body.dark-mode {
    background: #000000;
    color: #ffffff;
}


body.dark-mode .cdp-icon-btn {
    color: #ffffff;
}

body.dark-mode .cdp-icon-btn:hover:not(:disabled) {
    background: #333333;
    color: #ffffff;
}

body.dark-mode .cdp-main {
    background: #0a0a0a;
}

body.dark-mode .cdp-right-panel {
    background: #1a1a1a;
    border-left-color: #333333;
}

body.dark-mode .cdp-card {
    background: #000000;
    border-color: #333333;
}

body.dark-mode .cdp-card-header {
    background: #1a1a1a;
    border-bottom-color: #333333;
    color: #ffffff;
}

body.dark-mode .cdp-settings-panel {
    background: #1a1a1a;
}

body.dark-mode .cdp-settings-header {
    background: #000000;
    border-bottom-color: #333333;
    color: #ffffff;
}

body.dark-mode .cdp-settings-close {
    color: #ffffff;
}

body.dark-mode .cdp-settings-close:hover {
    background: #333333;
    color: #ffffff;
}

body.dark-mode .cdp-settings-label-text {
    color: #ffffff;
}

body.dark-mode .cdp-settings-label-desc {
    color: #cccccc;
}

body.dark-mode .cdp-settings-item {
    border-bottom-color: #333333;
}

body.dark-mode .cdp-theme-toggle {
    background: #333333;
}

body.dark-mode .cdp-theme-btn.active {
    background: #000000;
    color: #ffffff;
}

body.dark-mode .cdp-fontsize-btn {
    background: #181A20;
    border-color: #3b3b3b;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

body.dark-mode .cdp-fontsize-btn:hover {
    background: #23262F;
    border-color: #d9a300;
    color: #fff;
}

body.dark-mode .cdp-fontsize-btn.active {
    background: #d9a300;
    border-color: #d9a300;
    color: #fff;
    box-shadow: 0 2px 12px rgba(59,130,246,0.18);
}

/* Font Size Classes */
body.font-small {
    font-size: 13px;
}

body.font-small .cdp-card-header h2 {
    font-size: 16px;
}

body.font-small .cdp-label {
    font-size: 12px;
}

body.font-medium {
    font-size: 14px;
}

body.font-large {
    font-size: 16px;
}

body.font-large .cdp-card-header h2 {
    font-size: 20px;
}

body.font-large .cdp-label {
    font-size: 16px;
}

/* Music & Sound Toggles */
.cdp-music-toggle,
.cdp-sound-toggle {
    display: flex;
    gap: 8px;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 8px;
}

.cdp-music-btn,
.cdp-sound-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cdp-music-btn:hover,
.cdp-sound-btn:hover {
    color: #111827;
}

.cdp-music-btn.active,
.cdp-sound-btn.active {
    background: #ffffff;
    color: #10b981;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Music Select */
.cdp-music-select {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    min-width: 160px;
}

.cdp-music-select:hover {
    border-color: #d9a300;
}

.cdp-music-select:focus {
    border-color: #d9a300;
    box-shadow: 0 0 0 3px rgba(217, 163, 0, 0.1);
}

/* Volume Control */
.cdp-volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cdp-volume-control i {
    color: #6b7280;
    font-size: 16px;
}

.cdp-volume-control input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.cdp-volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d9a300;
    cursor: pointer;
    transition: all 0.2s;
}

.cdp-volume-control input[type="range"]::-webkit-slider-thumb:hover {
    background: #d9a300;
    transform: scale(1.1);
}

.cdp-volume-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d9a300;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.cdp-volume-control input[type="range"]::-moz-range-thumb:hover {
    background: #d9a300;
    transform: scale(1.1);
}

#cdpVolumeValue {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    min-width: 40px;
}

/* Dark Mode Audio Styles */
body.dark-mode .cdp-music-toggle,
body.dark-mode .cdp-sound-toggle {
    background: #374151;
}

body.dark-mode .cdp-music-btn.active,
body.dark-mode .cdp-sound-btn.active {
    background: #111827;
    color: #10b981;
}

body.dark-mode .cdp-music-select {
    background: #111827;
    border-color: #374151;
    color: #f3f4f6;
}

body.dark-mode .cdp-music-select:hover {
    border-color: #d9a300;
}

body.dark-mode .cdp-volume-control input[type="range"] {
    background: #374151;
}

body.dark-mode .cdp-volume-control i,
body.dark-mode #cdpVolumeValue {
    color: #9ca3af;
}

@media (max-width: 768px) {
    .cdp-settings-panel {
        width: 100vw;
        height: 100svh;
    }

    .cdp-settings-body {
        padding: 16px 14px calc(20px + env(safe-area-inset-bottom));
    }

    .cdp-settings-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .cdp-theme-toggle,
    .cdp-fontsize-toggle,
    .cdp-music-toggle,
    .cdp-sound-toggle {
        width: 100%;
        flex-wrap: wrap;
    }

    .cdp-theme-btn,
    .cdp-fontsize-btn,
    .cdp-music-btn,
    .cdp-sound-btn {
        flex: 1 1 120px;
        justify-content: center;
    }

    .cdp-music-select {
        min-width: 0;
        width: 100%;
    }

    .cdp-volume-control {
        width: 100%;
    }
}
