.webp-converter-container {
    max-width: 1080px;
    margin: 40px auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.converter-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 6px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.converter-header {
    text-align: center;
    margin-bottom: 30px;
}

.converter-header .icon-wrap {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.converter-header .icon-wrap svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.converter-header h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.3px;
}

.converter-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

/* Drag & Drop Zone */
.drop-zone {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fafbfc, #f1f5f9);
    margin-bottom: 20px;
}

.drop-zone:hover {
    border-color: #6366f1;
    background: linear-gradient(135deg, #f0f0ff, #eef2ff);
}

.drop-zone.dragover {
    border-color: #6366f1;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    transform: scale(1.01);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.drop-zone .drop-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: #94a3b8;
    transition: color 0.3s ease;
}

.drop-zone:hover .drop-icon {
    color: #6366f1;
}

.drop-zone.dragover .drop-icon {
    color: #6366f1;
}

.drop-zone .drop-text {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 4px;
}

.drop-zone .drop-subtext {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

.drop-zone .file-types {
    display: inline-flex;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.drop-zone .file-types span {
    padding: 3px 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drop-zone .file-types .max-label {
    background: #eef2ff;
    border-color: #6366f1;
    color: #6366f1;
}

/* File selected state */
.drop-zone.has-file {
    border-style: solid;
    border-color: #6366f1;
    background: linear-gradient(135deg, #eef2ff, #f0f0ff);
    padding: 24px;
}

.drop-zone.has-file .drop-icon {
    color: #6366f1;
}

/* Hidden file input */
#file-input {
    display: none;
}

/* Submit Button */
.submit-wrap {
    text-align: center;
}

.submit-btn {
    width: 100%;
    padding: 14px 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.35);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-btn .btn-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

.submit-btn.loading .btn-text {
    visibility: hidden;
}

.submit-btn.loading .btn-spinner {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Message */
.message {
    display: none;
    margin: 20px 0 0;
    padding: 14px 18px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    animation: fadeSlideIn 0.3s ease;
}

.message.success {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message.info {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Preview */
.preview {
    display: none;
    margin-top: 24px;
    animation: fadeSlideIn 0.4s ease;
}

.preview-card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
}

.preview-card h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
}

/* Results grid */
.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.result-card {
    background: white;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.result-img-wrap {
    background: #f8fafc;
    padding: 16px;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #f1f5f9;
}

.result-img-wrap img {
    max-width: 100%;
    max-height: 220px;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.result-body {
    padding: 14px 16px 16px;
}

.result-name {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.result-stat {
    text-align: center;
    padding: 8px 4px;
    background: #f8fafc;
    border-radius: 8px;
}

.result-stat .rs-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.result-stat .rs-value {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.result-stat .rs-value.reduction {
    color: #059669;
}

.result-stat .rs-value.enlarged {
    color: #dc2626;
}

.result-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.result-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    color: white;
}

.result-download svg {
    fill: currentColor;
    flex-shrink: 0;
}

/* ZIP download */
.zip-download {
    margin-bottom: 12px;
}

.zip-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
    border: none;
    cursor: pointer;
    width: 100%;
}

.zip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
    color: white;
}

.zip-btn svg {
    fill: currentColor;
    flex-shrink: 0;
}

.zip-btn.loading {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

/* Convert another button */
.convert-another {
    display: none;
    margin-top: 12px;
    padding: 10px 20px;
    background: transparent;
    color: #6366f1;
    border: 2px solid #6366f1;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.convert-another:hover {
    background: #6366f1;
    color: white;
}

/* Progress bar */
.progress-bar-wrap {
    display: none;
    margin-top: 16px;
}

.progress-bar-wrap.active {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar .progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Responsive */
@media (min-width: 600px) {
    .results-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .converter-card {
        padding: 24px 18px;
    }

    .drop-zone {
        padding: 32px 16px;
    }

    .result-stats {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .drop-zone .file-types span {
        font-size: 10px;
        padding: 2px 8px;
    }

    .file-item {
        flex-wrap: wrap;
        gap: 6px;
    }

    .file-item .file-name {
        width: 100%;
        order: 3;
    }
}
