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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #764ba2;
    background: #f0f2ff;
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
}

.upload-content p {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.upload-hint {
    color: #888 !important;
    font-size: 0.9rem !important;
}

.editor-section {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.preview-panel,
.sizes-panel {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
}

.preview-panel h3,
.sizes-panel h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.original-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 10px;
    padding: 20px;
    min-height: 200px;
    border: 1px solid #e0e0e0;
}

.original-preview img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
}

.image-info {
    margin-top: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #666;
    border: 1px solid #e0e0e0;
}

.size-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.size-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.size-checkbox:hover {
    border-color: #667eea;
}

.size-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.size-checkbox span {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

.size-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
}

.size-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.size-preview-item img {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.size-preview-item span {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.result-section {
    margin-top: 30px;
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-radius: 15px;
    color: white;
}

.result-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.btn-download {
    display: inline-block;
    background: white;
    color: #11998e;
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .editor-section {
        grid-template-columns: 1fr;
    }

    .size-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
