* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== TOOL HEADER STYLES ===== */
.tool-header {
    background: linear-gradient(135deg, #1e293b, var(--primary-color));
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.tool-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tool-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.security-badge {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    color: #22c55e;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Dark mode tool header */
body.dark-mode .tool-header {
    background: linear-gradient(135deg, var(--bg-dark), var(--primary-color));
}

body.dark-mode .security-badge {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
}

/* Main content adjustments */
.main-content {
    background: var(--bg-light, #f8f9fa);
    padding: 2rem 0;
    min-height: calc(100vh - 300px);
    transition: background-color 0.4s ease;
}

body.dark-mode .main-content {
    background: var(--bg-dark, #0f172a);
}

.main-content .container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    text-align: center;
    padding: 40px 20px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.upload-section {
    padding: 40px 20px;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-area:hover, .upload-area.drag-over {
    border-color: #4facfe;
    background: #f0f8ff;
    transform: translateY(-2px);
}

.upload-content .upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.upload-content h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.upload-content p {
    color: #666;
    margin-bottom: 5px;
}

.size-limit {
    font-size: 0.9em;
    color: #999 !important;
}

.processing-section {
    padding: 60px 20px;
    text-align: center;
}

.processing-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4facfe;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing-indicator p {
    font-size: 1.2em;
    color: #666;
}

.result-section {
    padding: 40px 20px;
}

.image-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.image-container {
    text-align: center;
}

.image-container h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
}

.image-container img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    object-fit: contain;
}

.transparent-bg {
    background-image:
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border-radius: 10px;
    padding: 10px;
}

.download-section {
    text-align: center;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn, .secondary-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.download-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3);
}

.secondary-btn {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #ddd;
}

.secondary-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.info-section {
    background: #f8f9fa;
    padding: 60px 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.info-card {
    background: white;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.info-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.info-card p {
    color: #666;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }

    .header p {
        font-size: 1em;
    }

    .image-comparison {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .download-section {
        flex-direction: column;
        align-items: center;
    }

    .download-btn, .secondary-btn {
        width: 100%;
        max-width: 300px;
    }

    .upload-area {
        padding: 40px 15px;
    }

    .upload-content .upload-icon {
        font-size: 3em;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}