/* Dark/Light Mode Toggle */
.theme-toggle {
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #3498db, #2980b9);
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.toggle-icon {
    font-size: 20px;
    color: #ecf0f1;
}

/* Light Mode Styles */
body.light-mode {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2c3e50;
}

body.light-mode .container {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

body.light-mode .form-section,
body.light-mode .preview-section {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

body.light-mode .form-group label {
    color: #2c3e50;
}

body.light-mode .form-group input,
body.light-mode .form-group textarea,
body.light-mode .form-group select {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: #2c3e50;
}

body.light-mode .upload-area {
    background: rgba(255, 255, 255, 0.8);
    border: 2px dashed rgba(0, 0, 0, 0.1);
}

body.light-mode .style-option {
    background: rgba(255, 255, 255, 0.8);
}

body.light-mode .history-item {
    background: rgba(255, 255, 255, 0.8);
}

body.light-mode .modal-content {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .cropper-toolbar button {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #2c3e50;
}

/* Preview card adjustments for light mode */
body.light-mode #cardPreview {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Header adjustments for light mode */
body.light-mode .header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

/* Toggle icon color in light mode */
body.light-mode .toggle-icon {
    color: #2c3e50;
}