* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #000000;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

header {
    background-color: white;
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
}

h1 {
    font-size: 28px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    color: #000000;
    font-size: 16px;
    opacity: 0.8;
    text-align: center;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
}

.upload-section {
    flex: 1;
    min-width: 300px;
    padding: 30px;
    background-color: #f8f9fa;
}

.preview-section {
    flex: 2;
    min-width: 500px;
    padding: 30px;
    background-color: white;
}

.upload-area {
    border: 2px dashed #d1d8e0;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s;
    background-color: white;
    cursor: pointer;
    margin-bottom: 25px;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #3498db;
    background-color: #f0f7ff;
}

.upload-icon {
    font-size: 48px;
    color: #000000;
    margin-bottom: 15px;
    opacity: 0.7;
}

.upload-text {
    margin-bottom: 20px;
    color: #000000;
    opacity: 0.8;
    font-size: 16px;
}

/* BUTTON FIXES - CENTERED AND VISIBLE TEXT */
.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    width: 100%;
    margin: 5px 0;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.btn-success {
    background-color: #2ecc71;
}

.btn-success:hover {
    background-color: #27ae60;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.file-input {
    display: none;
}

.settings-panel {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    border: 1px solid #f1f3f4;
}

.resize-dimensions-section {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.section-title {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: #000000;
    font-size: 18px;
}

.dimension-inputs {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.dimension-input {
    flex: 1;
}

.dimension-input label {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    color: #000000;
    font-weight: 600;
}

/* FIXED: WIDTH/HEIGHT INPUT BOXES - BIGGER AND BETTER */
.input-with-unit {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-with-unit input {
    flex: 1;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #000000;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    background-color: white;
    min-height: 55px;
}

.input-with-unit input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.input-with-unit input::placeholder {
    color: #95a5a6;
    font-weight: 400;
}

.input-with-unit select {
    padding: 16px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background-color: white;
    color: #000000;
    font-size: 16px;
    font-weight: 500;
    min-width: 90px;
    transition: all 0.3s;
    min-height: 55px;
}

.input-with-unit select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.aspect-ratio-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.aspect-ratio-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #3498db;
}

.aspect-ratio-group label {
    font-weight: 600;
    color: #000000;
    cursor: pointer;
    font-size: 16px;
}

/* FIXED: OUTPUT FORMAT SECTION - BIGGER AND BETTER */
.output-format-section {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.format-select-container {
    width: 100%;
}

.format-select {
    width: 100%;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background-color: white;
    color: #000000;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    min-height: 55px;
    cursor: pointer;
}

.format-select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.format-select option {
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
}

.preset-sizes-section {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.preset-btn {
    padding: 14px;
    background-color: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #000000;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    min-height: 50px;
}

.preset-btn:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    display: none;
}

.preview-box {
    flex: 1;
    min-width: 250px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.preview-header {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    color: #000000;
    text-align: center;
    font-size: 17px;
}

.preview-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 10px;
}

.file-info {
    padding: 15px;
    background-color: white;
    font-size: 15px;
    color: #000000;
    opacity: 0.9;
}

.size-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.size-info span {
    font-weight: 500;
}

/* ACTION BUTTONS FIXED - PROPER CENTERING */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.action-buttons .btn {
    flex: 1;
    min-width: 180px;
    max-width: 220px;
    margin: 0;
}

.image-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: white;
}

.image-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    color: #000000;
    transition: background-color 0.2s;
}

.image-item:hover {
    background-color: #f8f9fa;
}

.image-item:last-child {
    border-bottom: none;
}

.image-item.selected {
    background-color: #e3f2fd;
    border-left: 4px solid #3498db;
}

.image-thumb {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
}

.image-details {
    flex: 1;
}

.image-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #000000;
    font-size: 15px;
}

.image-size {
    font-size: 13px;
    color: #000000;
    opacity: 0.8;
    font-weight: 500;
}

.remove-btn {
    color: #e74c3c;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    transition: background-color 0.2s;
    font-weight: bold;
}

.remove-btn:hover {
    background-color: #ffebee;
}

.no-images {
    text-align: center;
    padding: 40px;
    color: #000000;
    opacity: 0.7;
    font-size: 16px;
}

#downloadButtons {
    display: none;
}

/* HEADING FIXES */
.preview-section h2 {
    color: #000000;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .upload-section, .preview-section {
        min-width: 100%;
    }
    
    .preview-container {
        flex-direction: column;
    }
    
    .dimension-inputs {
        flex-direction: column;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-buttons .btn {
        min-width: 100%;
        max-width: 100%;
    }
    
    .btn {
        min-height: 50px;
        padding: 14px 20px;
    }
    
    .input-with-unit input,
    .input-with-unit select,
    .format-select {
        min-height: 50px;
        padding: 14px;
    }
}