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

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

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    padding: 40px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

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

.title {
    font-size: 2.4em;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.subtitle {
    color: #6b7280;
    font-size: 1.05em;
}

#drop-zone {
    border: 2px dashed #c4b5fd;
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    margin: 16px 0;
    background: #faf8ff;
}

#drop-zone.dragover {
    background: #ede9fe;
    border-color: #6558d3;
}

.file-list {
    margin: 16px 0;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 20px 0;
    padding: 20px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 16px;
}

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

.control-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.control-input {
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1em;
    background: white;
}

.control-input.color {
    height: 44px;
    padding: 4px;
}

button, .btn-primary, .btn-secondary {
    background-color: #6558d3;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 3px;
    font-size: 14px;
}

button:hover, .btn-primary:hover {
    background-color: #7365ea;
}

.btn-secondary {
    background-color: #6b7280;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.actions {
    margin: 12px 0 24px;
}

.preview-wrap {
    margin-top: 8px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

.preview-title {
    font-size: 1.1em;
    margin-bottom: 12px;
    color: #374151;
}

#preview {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 50% / 16px 16px;
}

.preview-hint {
    text-align: center;
    color: #6b7280;
    margin-top: 12px;
}

.preview-size {
    text-align: center;
    color: #374151;
    font-weight: 600;
    margin-top: 12px;
    font-variant-numeric: tabular-nums;
}

.size-fit,
.size-exact {
    display: none;
}

.site-footer {
    margin-top: 40px;
    margin-bottom: 8px;
    text-align: center;
}

.site-footer a {
    color: inherit;
}
