/* Brightness & Contrast Specific Styles */

.tool-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.tool-header {
    text-align: center;
    margin-bottom: 30px;
}

.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-header p {
    color: #6b7280;
    font-size: 1.1rem;
}

/* Upload Card */
.upload-card {
    background: white;
    border-radius: 30px;
    border: 1px solid #e5e7eb;
    padding: 30px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.dark-mode .upload-card {
    background: #1f2937;
    border-color: #374151;
}

.upload-area {
    border: 2px dashed #e5e7eb;
    border-radius: 30px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-area:hover {
    border-color: #3b82f6;
    background: #f9fafb;
}

.dark-mode .upload-area:hover {
    background: #2d3748;
}

.upload-area i {
    font-size: 4rem;
    color: #3b82f6;
    margin-bottom: 15px;
}

.upload-area h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #111827;
}

.dark-mode .upload-area h3 {
    color: #f9fafb;
}

.upload-area p {
    color: #6b7280;
    margin-bottom: 5px;
}

.upload-area .supported-formats {
    font-size: 0.85rem;
    color: #9ca3af;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    border-radius: 20px;
    padding: 20px;
}

.dark-mode .file-info {
    background: #111827;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-details i {
    font-size: 2rem;
    color: #3b82f6;
}

.file-name {
    font-size: 1rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 5px;
}

.dark-mode .file-name {
    color: #f9fafb;
}

.file-size {
    font-size: 0.85rem;
    color: #6b7280;
}

.change-file-btn {
    padding: 10px 20px;
    background: #e5e7eb;
    border: none;
    border-radius: 60px;
    color: #111827;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dark-mode .change-file-btn {
    background: #374151;
    color: #f9fafb;
}

.change-file-btn:hover {
    background: #3b82f6;
    color: white;
}

/* Editor Container */
.editor-container {
    background: white;
    border-radius: 30px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.dark-mode .editor-container {
    background: #1f2937;
    border-color: #374151;
}

.editor-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 600px;
}

/* Controls Panel */
.controls-panel {
    background: #f9fafb;
    padding: 25px;
    border-right: 1px solid #e5e7eb;
}

.dark-mode .controls-panel {
    background: #111827;
    border-right-color: #374151;
}

.controls-panel h3 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: #111827;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.dark-mode .controls-panel h3 {
    color: #f9fafb;
    border-bottom-color: #374151;
}

.control-group {
    margin-bottom: 30px;
}

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.control-header label {
    color: #111827;
    font-weight: 500;
}

.dark-mode .control-header label {
    color: #f9fafb;
}

.value-display {
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    border-radius: 60px;
    font-size: 0.9rem;
    font-weight: 600;
}

.control-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(to right, #3b82f6, #ef4444);
    border-radius: 3px;
    outline: none;
    margin: 10px 0;
}

.control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    color: #6b7280;
    font-size: 0.8rem;
}

/* Preset Buttons */
.preset-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.preset-btn {
    flex: 1;
    padding: 12px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 60px;
    color: #111827;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dark-mode .preset-btn {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

.preset-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

#resetBtn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

#autoEnhanceBtn:hover {
    border-color: #10b981;
    color: #10b981;
}

/* Export Section */
.export-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.dark-mode .export-section {
    border-top-color: #374151;
}

.export-section label {
    display: block;
    color: #111827;
    font-weight: 500;
    margin-bottom: 8px;
}

.dark-mode .export-section label {
    color: #f9fafb;
}

.export-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 60px;
    font-size: 0.95rem;
    background: white;
    color: #111827;
    cursor: pointer;
    margin-bottom: 15px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.dark-mode .export-select {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

.quality-control {
    margin-bottom: 20px;
}

.quality-control label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.quality-control span {
    color: #3b82f6;
    font-weight: 600;
}

.quality-control input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: #3b82f6;
    border-radius: 3px;
}

.quality-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    cursor: pointer;
}

.download-btn {
    width: 100%;
    padding: 14px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.download-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Preview Area */
.preview-area {
    padding: 25px;
    background: #f9fafb;
}

.dark-mode .preview-area {
    background: #111827;
}

.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 100%;
}

.preview-box {
    text-align: center;
}

.preview-label {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 10px;
}

.image-wrapper {
    background: #e5e7eb;
    border-radius: 20px;
    padding: 20px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
    overflow: hidden;
}

.dark-mode .image-wrapper {
    background: #1f2937;
    border-color: #374151;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* Info Section */
.info-section {
    background: #f9fafb;
    border-radius: 30px;
    padding: 30px;
    margin: 30px 0;
    border: 1px solid #e5e7eb;
}

.dark-mode .info-section {
    background: #111827;
    border-color: #374151;
}

.info-section h3 {
    font-size: 1.3rem;
    margin: 20px 0 15px;
    color: #111827;
}

.dark-mode .info-section h3 {
    color: #f9fafb;
}

.info-section h3:first-child {
    margin-top: 0;
}

.info-section p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 15px;
}

.dark-mode .info-section p {
    color: #9ca3af;
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section ul li {
    padding: 8px 0;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-mode .info-section ul li {
    color: #9ca3af;
}

.tip-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #f0f9ff;
    border-radius: 20px;
    margin-top: 20px;
    border: 1px solid #bae6fd;
}

.dark-mode .tip-box {
    background: #1e3a5f;
    border-color: #2563eb;
}

.tip-box i {
    font-size: 1.5rem;
    color: #f59e0b;
    margin-top: 2px;
}

.tip-box div {
    color: #0369a1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.dark-mode .tip-box div {
    color: #bae6fd;
}

.tip-box strong {
    color: #111827;
}

.dark-mode .tip-box strong {
    color: #f9fafb;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .image-wrapper {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .editor-layout {
        grid-template-columns: 1fr;
    }
    
    .controls-panel {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .dark-mode .controls-panel {
        border-bottom-color: #374151;
    }
    
    .preview-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .image-wrapper {
        height: 250px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}