* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1rem;
}

main {
    display: grid;
    gap: 30px;
}

.upload-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.drop-zone {
    border: 3px dashed #3498db;
    border-radius: 10px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.drop-zone:hover {
    border-color: #2980b9;
    background-color: #f0f8ff;
}

.drop-zone.drag-over {
    border-color: #27ae60;
    background-color: #f0fff4;
}

.drop-zone p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 20px;
}

#fileInput {
    display: none;
}

.file-input-label {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.file-input-label:hover {
    background-color: #2980b9;
}

.edit-options {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.edit-options h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.option-group {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.option-group h3 {
    color: #34495e;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.replace-section,
.numbering-section,
.case-section,
.extension-section,
.remove-section {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

input[type="text"],
input[type="number"],
select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

input[type="text"] {
    flex: 1;
    min-width: 150px;
}

input[type="number"] {
    width: 100px;
}

select {
    padding: 8px 12px;
}

.action-btn {
    padding: 8px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.action-btn:hover {
    background-color: #2980b9;
}

.control-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.reset-btn {
    padding: 10px 20px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.reset-btn:hover {
    background-color: #c0392b;
}

.undo-btn {
    padding: 10px 20px;
    background-color: #95a5a6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.undo-btn:not(:disabled):hover {
    background-color: #7f8c8d;
}

.undo-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.file-list-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.file-list-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.file-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
    background-color: #f8f9fa;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.file-item:hover {
    background-color: #e9ecef;
}

.file-item.changed {
    background-color: #d4edda;
}

.original-name {
    color: #6c757d;
    font-size: 0.9em;
}

.new-name {
    font-weight: 500;
    color: #28a745;
}

.file-size {
    color: #6c757d;
    font-size: 0.9em;
    margin-left: auto;
    margin-right: 10px;
}

.download-section {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.download-btn {
    padding: 12px 24px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #229954;
}

.copy-btn {
    padding: 12px 24px;
    background-color: #8e44ad;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.copy-btn:hover {
    background-color: #7d3c98;
}

footer {
    text-align: center;
    margin-top: 60px;
    padding: 20px;
    color: #7f8c8d;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .replace-section,
    .numbering-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    input[type="text"],
    input[type="number"] {
        width: 100%;
    }
    
    .action-btn {
        width: 100%;
    }
}