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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    background-color: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    padding: 30px;
    margin: 20px 0;
}

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

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #4fd1c5;
    text-shadow: 0 0 5px rgba(79, 209, 197, 0.5);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #81e6d9;
}

p {
    color: #a0a0a0;
}

.upload-section {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.upload-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #2d3748, #1a202c);
    color: #81e6d9;
    border: 2px solid #4fd1c5;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(79, 209, 197, 0.3);
}

.upload-button:hover {
    background: linear-gradient(145deg, #2c5282, #2a4365);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(79, 209, 197, 0.5);
}

.button-text {
    margin-right: 10px;
    font-weight: 600;
}

.button-icon {
    font-size: 1.2rem;
}

.preview-section, .controls-section, .result-section {
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hidden {
    display: none;
}

.visible {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.preview-container {
    background-color: #2d3748;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#original-preview, #resized-canvas {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.preview-info {
    font-size: 0.9rem;
    color: #a0a0a0;
}

.dimension-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 8px;
    color: #81e6d9;
    font-weight: 500;
}

input[type="number"] {
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #4fd1c5;
    background-color: #2d3748;
    color: #e0e0e0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: #81e6d9;
    box-shadow: 0 0 10px rgba(79, 209, 197, 0.5);
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.action-button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #2d3748, #1a202c);
    color: #81e6d9;
    border: 2px solid #4fd1c5;
    box-shadow: 0 0 10px rgba(79, 209, 197, 0.3);
}

.action-button:hover {
    background: linear-gradient(145deg, #2c5282, #2a4365);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(79, 209, 197, 0.5);
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #2d3748;
    color: #a0a0a0;
}

@media (max-width: 600px) {
    .dimension-inputs {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
}