* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #2c3e50;
}

p {
    text-align: center;
    margin-bottom: 30px;
    color: #7f8c8d;
}

.upload-section {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.file-input {
    display: none;
}

.upload-btn {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: #2980b9;
}

.file-name {
    margin-left: 10px;
    color: #7f8c8d;
}

.crop-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-container {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border: 1px dashed #bdc3c7;
    border-radius: 5px;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

#imageToCrop {
    max-width: 100%;
    max-height: 500px;
}

#imageToCrop.hidden {
    display: none;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.aspect-ratios, .zoom-controls, .output-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

button {
    padding: 8px 15px;
    background-color: #ecf0f1;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    background-color: #bdc3c7;
}

button:disabled {
    background-color: #ecf0f1;
    color: #bdc3c7;
    cursor: not-allowed;
}

.aspect-ratios button {
    background-color: #2ecc71;
    color: white;
}

.aspect-ratios button:hover {
    background-color: #27ae60;
}

.zoom-controls button {
    background-color: #f39c12;
    color: white;
}

.zoom-controls button:hover {
    background-color: #d35400;
}

.output-controls button {
    background-color: #3498db;
    color: white;
}

.output-controls button:hover {
    background-color: #2980b9;
}

#cropBtn {
    background-color: #9b59b6;
}

#cropBtn:hover {
    background-color: #8e44ad;
}

.result-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.result-section.hidden {
    display: none;
}

.result-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

#croppedResult {
    max-width: 100%;
    max-height: 400px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .aspect-ratios, .zoom-controls, .output-controls {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
}