/* Settings Panel Styles */
#settings-toggle-btn {
    cursor: pointer;
}

#settings-panel {
    max-height: 400px;
    overflow-y: auto;
}

.setting-item {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.setting-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #a1a1aa;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.setting-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e4e4e7;
}

.setting-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #818cf8;
}

.setting-btn svg {
    flex-shrink: 0;
}

/* Settings Notification */
.settings-notification {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: rgba(99, 102, 241, 0.95);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    font-size: 0.875rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.settings-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Scrollbar for settings panel */
#settings-panel::-webkit-scrollbar {
    width: 6px;
}

#settings-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

#settings-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

#settings-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* =========================================
   LIGHT THEME OVERRIDES
   ========================================= */
html.light #settings-toggle-btn {
    background: #f4f4f5;
    border-color: #e4e4e7;
    color: #52525b;
}

html.light #settings-toggle-btn:hover {
    background: #e4e4e7;
    color: #18181b;
}

html.light #settings-panel {
    background: #ffffff;
    border-color: #e4e4e7;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

html.light #settings-panel h3 {
    color: #18181b;
}

html.light #settings-panel label {
    color: #3f3f46;
}

html.light #settings-panel span[id$="-value"] {
    color: #71717a;
}

html.light .setting-item {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

html.light .setting-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: #52525b;
}

html.light .setting-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
    color: #18181b;
}

html.light .setting-btn.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: #4f46e5;
}

html.light #settings-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
}

html.light #settings-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

html.light #settings-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Copy Speed Toggle Styles */
#copy-speed-toggle-btn {
    cursor: pointer;
}

/* Format and Mode Buttons */
.format-btn,
.mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #a1a1aa;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.format-btn:hover,
.mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e4e4e7;
}

.format-btn.active,
.mode-btn.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    color: #818cf8;
}

/* Light Mode for format and mode buttons */
html.light .format-btn,
html.light .mode-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #52525b;
}

html.light .format-btn:hover,
html.light .mode-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #18181b;
}

html.light .format-btn.active,
html.light .mode-btn.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    color: #4f46e5;
}

/* Settings Toggle Button */
#settings-toggle-btn {
    cursor: pointer;
}

html.light #settings-toggle-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: #e4e4e7;
    color: #52525b;
}

html.light #settings-toggle-btn:hover {
    background: #f4f4f5;
    color: #18181b;
}

/* Settings Panel Light Mode */
html.light #settings-panel {
    background: rgba(255, 255, 255, 0.95);
    border-color: #e4e4e7;
}

html.light #settings-panel h3 {
    color: #18181b;
}

html.light #settings-panel label {
    color: #71717a;
}

html.light #language-select {
    background: #f4f4f5;
    border-color: #e4e4e7;
    color: #18181b;
}