:root {
    --primary-color: #7c3aed;
    --secondary-color: #39d9ff;
    --accent-color: #ff4ecf;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --bg-dark: #07050a;
    --bg-dark-2: #0b0b0f;
    --bg-light: #f8f9fc;
    --bg-light-2: #f0f2f8;
    --text-dark: #e6e6ee;
    --text-light: #0d1117;
    --border-dark: rgba(255, 255, 255, 0.04);
    --border-light: rgba(124, 58, 237, 0.1);
    --glass-dark: rgba(255, 255, 255, 0.02);
    --glass-light: rgba(124, 58, 237, 0.02);
}

body.light-mode .cleaner-wrapper {
    color: var(--text-light);
}

.cleaner-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== Upload Section ===== */
.section {
    background: linear-gradient(180deg, rgba(20, 14, 28, 0.48), rgba(12, 8, 18, 0.6));
    backdrop-filter: blur(10px) saturate(140%);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

body.light-mode .section {
    background: linear-gradient(180deg, #ffffff, #f9f7ff);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h3 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
    color: var(--text-dark);
}

body.light-mode .section-header h3 {
    color: var(--text-light);
}

.section-header p {
    margin: 0;
    color: var(--text-dark);
    opacity: 0.7;
}

body.light-mode .section-header p {
    color: var(--text-light);
    opacity: 0.6;
}

/* ===== Upload Area ===== */
.upload-area {
    border: 2px dashed rgba(124, 58, 237, 0.3);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(124, 58, 237, 0.02);
}

body.light-mode .upload-area {
    border-color: rgba(124, 58, 237, 0.2);
    background: rgba(124, 58, 237, 0.03);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(124, 58, 237, 0.08);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.15);
}

body.light-mode .upload-area.dragover {
    background: rgba(124, 58, 237, 0.1);
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--primary-color);
    opacity: 0.9;
}

.upload-text {
    margin: 0;
    color: var(--text-dark);
    font-size: 1rem;
}

body.light-mode .upload-text {
    color: var(--text-light);
}

.click-here {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* ===== Images Grid ===== */
.images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.image-container {
    background: linear-gradient(180deg, rgba(20, 14, 28, 0.48), rgba(12, 8, 18, 0.6));
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 1.5rem;
    overflow: hidden;
}

body.light-mode .image-container {
    background: linear-gradient(180deg, #ffffff, #f9f7ff);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08);
}

.container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.container-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

body.light-mode .container-header h4 {
    color: var(--text-light);
}

.badge {
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.image-preview-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

body.light-mode .image-preview-wrapper {
    background: rgba(124, 58, 237, 0.05);
}

.image-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.image-info {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 1rem;
}

body.light-mode .image-info {
    background: rgba(124, 58, 237, 0.04);
}

.image-info p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-dark);
}

body.light-mode .image-info p {
    color: var(--text-light);
}

.metadata-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.metadata-list li {
    padding: 0.35rem 0;
    font-size: 0.9rem;
    margin: 0;
}

.metadata-list li.present {
    color: var(--warning-color);
    font-weight: 600;
}

.metadata-list li.clean {
    color: var(--success-color);
    font-weight: 600;
}

.exif-present {
    color: var(--warning-color);
    font-weight: 700;
}

.exif-clean {
    color: var(--success-color);
    font-weight: 700;
}

/* ===== Stats Section ===== */
.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    animation: slideUp 0.4s ease 0.1s both;
}

.stat-item {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(57, 217, 255, 0.1));
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

body.light-mode .stat-item {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(57, 217, 255, 0.08));
    border: 1px solid var(--border-light);
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-dark);
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

body.light-mode .stat-label {
    color: var(--text-light);
    opacity: 0.6;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-value.success {
    color: var(--success-color);
}

/* ===== Actions Section ===== */
.actions-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    animation: slideUp 0.4s ease 0.2s both;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.15);
}

.btn-action.primary {
    background: linear-gradient(90deg, var(--primary-color), #8b5cf6);
    color: white;
}

.btn-action.primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(124, 58, 237, 0.25);
}

.btn-action.primary:active {
    transform: translateY(-2px);
}

.btn-action.secondary {
    background: linear-gradient(90deg, var(--secondary-color), #06b6d4);
    color: white;
}

.btn-action.secondary:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(57, 217, 255, 0.25);
}

.btn-action.secondary:active {
    transform: translateY(-2px);
}

.btn-action.ghost {
    background: transparent;
    border: 2px solid rgba(124, 58, 237, 0.3);
    color: var(--primary-color);
}

body.light-mode .btn-action.ghost {
    border-color: rgba(124, 58, 237, 0.2);
    color: var(--primary-color);
}

.btn-action.ghost:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--primary-color);
}

/* ===== Message Section ===== */
.message-section {
    margin-bottom: 1.5rem;
    animation: slideUp 0.4s ease;
}

.message {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success-color);
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error-color);
}

.message.info {
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: var(--primary-color);
}

body.light-mode .message {
    border-color: rgba(124, 58, 237, 0.2);
}

/* ===== Theme Toggle ===== */
#themeToggle {
    cursor: pointer;
    font-size: 1.2rem;
    background: transparent;
    border: none;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

#themeToggle:hover {
    transform: rotate(20deg);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .cleaner-wrapper {
        padding: 1rem;
    }

    .section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .images-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .image-preview-wrapper {
        height: 250px;
    }

    .actions-section {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
        justify-content: center;
    }

    .section-header h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .section-header h3 {
        font-size: 1rem;
    }

    .image-preview-wrapper {
        height: 200px;
    }

    .stats-section {
        gap: 1rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .btn-action {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}

/* Ensure brand header matches global site style (gradient clipped text) */
header nav .brand h1,
header .brand h1 {
    background: var(--accent-mid);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
    font-size: 1.05rem;
}
