/* Reset dan dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #f0f0f0;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #4cc9f0, #4361ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

h1 i {
    margin-right: 15px;
}

.subtitle {
    font-size: 1.1rem;
    color: #b0b0b0;
    max-width: 600px;
    margin: 0 auto;
}

/* App container */
.app-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.controls-section {
    flex: 1;
    min-width: 300px;
}

/* Upload area */
.upload-area {
    background: rgba(255, 255, 255, 0.08);
    border: 2px dashed #4361ee;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #4cc9f0;
    transform: translateY(-2px);
}

.upload-area i {
    font-size: 3.5rem;
    color: #4cc9f0;
    margin-bottom: 15px;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #f0f0f0;
}

.upload-area p {
    color: #b0b0b0;
    margin-bottom: 5px;
}

.format-info {
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
}

#fileInput {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Controls */
.controls {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e0e0e0;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #1a1a2e, #4361ee);
    border-radius: 10px;
    outline: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4cc9f0;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(76, 201, 240, 0.7);
    transition: all 0.2s;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4cc9f0;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(76, 201, 240, 0.7);
    border: none;
}

.slider-container span {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
    color: #4cc9f0;
}

/* Buttons */
.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 30px 0;
}

.btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(90deg, #4361ee, #3a0ca3);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(90deg, #3a0ca3, #4361ee);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.btn-success {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

/* Presets */
.presets {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.presets h4 {
    margin-bottom: 15px;
    color: #e0e0e0;
    font-size: 1.1rem;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preset-btn {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 100px;
    font-size: 0.9rem;
}

.preset-btn:hover {
    background: rgba(67, 97, 238, 0.3);
    transform: translateY(-2px);
}

/* Image section */
.image-section {
    flex: 2;
    min-width: 300px;
}

.image-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.image-box {
    flex: 1;
    min-width: 250px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.image-box h3 {
    margin-bottom: 15px;
    color: #e0e0e0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.image-placeholder {
    height: 250px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
}

.image-placeholder p {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.image-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #b0b0b0;
}

.image-info p {
    display: flex;
    flex-direction: column;
}

.image-info span {
    color: #f0f0f0;
    font-weight: 600;
    margin-top: 3px;
}

/* Comparison slider */
.comparison-slider {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.slider-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    margin-bottom: 10px;
}

.slider-thumb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(90deg, #4361ee, #4cc9f0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    box-shadow: 0 0 15px rgba(67, 97, 238, 0.7);
    z-index: 10;
    transition: transform 0.2s;
}

.slider-thumb:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.slider-thumb:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(0.95);
}

.slider-thumb i {
    font-size: 1.2rem;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    color: #b0b0b0;
    font-size: 0.9rem;
}

/* Features */
.features {
    margin-top: 60px;
    margin-bottom: 40px;
}

.features h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(76, 201, 240, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4361ee, #4cc9f0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: #e0e0e0;
    font-size: 1.3rem;
}

.feature-card p {
    color: #b0b0b0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 25px 0;
    color: #888;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
}

.footer-info {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2ecc71;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 1000;
    max-width: 350px;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.error {
    background: #e74c3c;
}

.notification.info {
    background: #3498db;
}

.notification.warning {
    background: #f39c12;
}

/* Responsive design */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        padding: 20px;
    }
    
    .image-container {
        flex-direction: column;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .btn {
        min-width: 100%;
    }
    
    .slider-thumb {
        width: 35px;
        height: 35px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-area i {
        font-size: 2.8rem;
    }
    
    .buttons {
        flex-direction: column;
    }
}