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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 640px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    text-decoration: none;
    color: #51607a;
    font-size: 14px;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #86868b;
    font-size: 14px;
    margin-top: 4px;
    margin-bottom: 24px;
}

.drop-zone {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 2px dashed #d2d2d7;
    border-radius: 12px;
    background: #fafafa;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
}

.drop-zone.dragover {
    border-color: #0071e3;
    background: #f0f4ff;
}

.drop-zone.has-image {
    border-style: solid;
    border-color: #d2d2d7;
    cursor: default;
}

.drop-hint {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #86868b;
}

.drop-hint svg {
    opacity: 0.5;
}

.drop-hint span {
    font-size: 15px;
}

.drop-sub {
    font-size: 12px !important;
    opacity: 0.6;
}

.drop-zone.has-image .drop-hint {
    display: none;
}

#canvas {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.drop-zone.has-image #canvas {
    display: block;
}

.controls {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

label {
    font-size: 14px;
    color: #1d1d1f;
}

#colorPicker {
    width: 36px;
    height: 36px;
    border: 2px solid #d2d2d7;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    background: none;
}

#colorHex {
    font-size: 13px;
    color: #86868b;
    font-family: monospace;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #d2d2d7;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn:hover:not(:disabled) {
    background: #f5f5f7;
}

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

.btn-primary {
    background: #0071e3;
    color: #fff;
    border-color: #0071e3;
}

.btn-primary:hover:not(:disabled) {
    background: #0077ed;
}
