.hex-image-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    padding: 20px;
}

.input-section {
    display: flex;
    gap: 20px;
}

.hex-input, .image-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hex-example-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hex-example-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 12px;
    border: 1px solid #c5d8ef;
    border-radius: 8px;
    background: #fff;
    color: #1971c2;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.hex-example-btn:hover,
.hex-example-btn.active {
    background: #e7f5ff;
    border-color: #1971c2;
    box-shadow: 0 1px 4px rgba(25, 113, 194, 0.15);
}

.hex-example-btn .ex-title {
    font-size: 0.85em;
    font-weight: 700;
    line-height: 1.2;
}

.hex-example-btn .ex-hint {
    font-size: 0.72em;
    color: #64748b;
    font-weight: 500;
}

.hex-example-swatch {
    width: 28px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    margin-top: 2px;
    image-rendering: pixelated;
    background-size: cover;
    background-position: center;
}

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

.input-group label {
    font-weight: bold;
    color: #495057;
}

textarea {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    resize: vertical;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
}

.drop-zone {
    width: 100%;
    height: 200px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: #1971c2;
    background-color: #f8f9fa;
}

.drop-zone i {
    font-size: 48px;
    color: #adb5bd;
}

.drop-zone p {
    color: #868e96;
    margin: 0;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    display: none;
}

.buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.download-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
}

.download-panel[hidden] {
    display: none;
}

.download-meta {
    font-size: 0.85em;
    color: #495057;
    font-weight: 600;
}

.download-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.download-row label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
}

.download-row select {
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    min-width: 180px;
    background: #fff;
}

.download-button {
    background-color: #0f766e;
    color: white;
}

.download-button:hover {
    background-color: #0d9488;
}

.download-hint {
    margin: 0;
    font-size: 0.78em;
    color: #868e96;
    line-height: 1.4;
}

.action-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.convert-button {
    background-color: #1971c2;
    color: white;
}

.convert-button:hover {
    background-color: #1864ab;
}

.clear-button {
    background-color: #e9ecef;
    color: #495057;
}

.clear-button:hover {
    background-color: #dee2e6;
}

.error-message {
    color: #e03131;
    font-size: 0.9em;
    display: none;
}

#fileInput {
    display: none;
}
