/**
 * MB to KB Image Compressor - Clean Styles
 */

.mbkb-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Drop Zone */
.mbkb-drop-zone {
    border: 3px dashed #6366f1;
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f1ff 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 25px;
}

.mbkb-drop-zone:hover {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #f0f1ff 0%, #e8e9ff 100%);
}

.mbkb-drag-over {
    border-color: #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    transform: scale(1.01);
}

.mbkb-upload-icon {
    font-size: 60px;
    margin-bottom: 15px;
    color: #6366f1;
}

.mbkb-drop-zone h3 {
    color: #1e293b;
    font-size: 24px;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.mbkb-drop-zone p {
    color: #64748b;
    font-size: 15px;
    margin: 0 0 20px 0;
}

.mbkb-file-input {
    display: none;
}

.mbkb-choose-btn {
    background: #6366f1;
    color: white;
    padding: 14px 35px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mbkb-choose-btn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
}

/* Format Pills */
.mbkb-format-pills {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.mbkb-format-pill {
    background: #6366f1;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Target Size */
.mbkb-target-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.mbkb-target-label {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.mbkb-target-size,
.mbkb-target-unit {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    background: white;
}

.mbkb-target-size {
    width: 120px;
}

.mbkb-target-unit {
    width: 90px;
    cursor: pointer;
}

.mbkb-target-size:focus,
.mbkb-target-unit:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Action Buttons */
.mbkb-actions {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.mbkb-btn {
    flex: 1;
    padding: 16px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mbkb-compress-btn {
    background: #10b981;
    color: white;
}

.mbkb-compress-btn:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
}

.mbkb-compress-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.mbkb-clear-btn {
    background: #ef4444;
    color: white;
}

.mbkb-clear-btn:hover {
    background: #dc2626;
}

/* Results */
.mbkb-results {
    display: none;
    margin-top: 25px;
}

.mbkb-files-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.mbkb-file-item {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.mbkb-file-item:last-child {
    border-bottom: none;
}

.mbkb-file-item:hover {
    background: #f8fafc;
}

.mbkb-file-info {
    flex: 1;
    min-width: 0;
}

.mbkb-file-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 5px;
}

.mbkb-file-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mbkb-original-size {
    color: #64748b;
    font-size: 14px;
}

.mbkb-file-type {
    background: #6366f1;
    color: white;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
}

.mbkb-file-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.mbkb-status-text {
    color: #64748b;
    font-size: 14px;
}

.mbkb-result-info {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.mbkb-compressed-size {
    color: #1e293b;
    font-weight: 600;
    font-size: 15px;
}

.mbkb-savings {
    background: #10b981;
    color: white;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
}

/* Download Button */
.mbkb-download-btn {
    background: #6366f1;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.mbkb-download-btn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
}

/* Summary */
.mbkb-summary {
    display: none;
    margin-top: 25px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    padding: 25px;
    border-radius: 12px;
    color: white;
}

.mbkb-summary-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.mbkb-summary-item {
    text-align: center;
}

.mbkb-summary-label {
    display: block;
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.mbkb-summary-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mbkb-container {
        padding: 20px 15px;
        margin: 20px 10px;
    }
    
    .mbkb-drop-zone {
        padding: 40px 20px;
    }
    
    .mbkb-drop-zone h3 {
        font-size: 20px;
    }
    
    .mbkb-upload-icon {
        font-size: 50px;
    }
    
    .mbkb-format-pills {
        gap: 8px;
    }
    
    .mbkb-format-pill {
        padding: 6px 15px;
        font-size: 12px;
    }
    
    .mbkb-target-section {
        flex-direction: column;
        padding: 15px;
    }
    
    .mbkb-target-size,
    .mbkb-target-unit {
        width: 100%;
        max-width: 200px;
    }
    
    .mbkb-actions {
        flex-direction: column;
    }
    
    .mbkb-btn {
        width: 100%;
    }
    
    /* Mobile File Items - Stack */
    .mbkb-file-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .mbkb-file-name {
        white-space: normal;
        word-break: break-word;
    }
    
    .mbkb-file-status {
        align-items: stretch;
    }
    
    .mbkb-result-info {
        justify-content: space-between;
    }
    
    .mbkb-download-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .mbkb-summary-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 400px) {
    .mbkb-container {
        padding: 15px 10px;
    }
    
    .mbkb-drop-zone {
        padding: 30px 15px;
    }
    
    .mbkb-file-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
