/* Dark Mode Previewer Styles */
.dark-mode-previewer {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 100%;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* Preview Container */
.preview-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

/* URL Input */
.url-input-group {
    display: flex;
    gap: 10px;
}

.url-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
}

.load-btn {
    padding: 10px 20px;
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.load-btn:hover {
    background: #0b5ed7;
}

.load-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Preview Frame */
.preview-frame-container {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    height: 500px;
    background: white;
}

.preview-frame {
    width: 100%;
    height: 100%;
    border: none;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #0d6efd;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Controls Section */
.controls-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .controls-section {
        grid-template-columns: 1fr;
    }
}

/* Color Scheme Controls */
.scheme-controls {
    margin-bottom: 20px;
}

.scheme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.scheme-option {
    padding: 10px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-size: 14px;
}

.scheme-option:hover {
    border-color: #0d6efd;
}

.scheme-option.active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.scheme-option.preset-1 {
    background: #1a1a1a;
    color: #ffffff;
}

.scheme-option.preset-2 {
    background: #121212;
    color: #e0e0e0;
}

.scheme-option.preset-3 {
    background: #0d1117;
    color: #c9d1d9;
}

.scheme-option.preset-4 {
    background: #2d3748;
    color: #f7fafc;
}

.scheme-option.preset-5 {
    background: #1e1e1e;
    color: #d4d4d4;
}

.scheme-option.preset-6 {
    background: #000000;
    color: #ffffff;
}

/* Custom Color Controls */
.custom-colors {
    margin-bottom: 20px;
}

.color-pickers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.color-picker-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.color-picker-label {
    font-size: 14px;
    color: #495057;
}

.color-picker {
    width: 100%;
    height: 40px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    cursor: pointer;
}

/* Intensity Controls */
.intensity-control {
    margin-bottom: 20px;
}

.intensity-slider {
    width: 100%;
    margin-top: 10px;
}

.intensity-value {
    text-align: center;
    font-size: 14px;
    color: #495057;
    margin-top: 5px;
}

/* CSS Output */
.output-section {
    grid-column: 1 / -1;
    background: #f1f3f5;
    padding: 15px;
    border-radius: 6px;
}

.output-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: #495057;
    font-weight: 600;
}

.css-output {
    width: 100%;
    padding: 10px;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    resize: none;
    min-height: 120px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.action-btn {
    padding: 8px 15px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn.copy-btn {
    background: #6c757d;
}

.action-btn.copy-btn:hover {
    background: #5c636a;
}

.action-btn.copy-btn.copied {
    background: #198754;
}

.action-btn.apply-btn {
    background: #0d6efd;
}

.action-btn.apply-btn:hover {
    background: #0b5ed7;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #0d6efd;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 14px;
    color: #495057;
}