/* ── Card ─────────────────────────────────────── */
.cpg-wrapper {
    width: 100%;
    font-family: inherit;
}

.cpg-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ── Form ─────────────────────────────────────── */
.cpg-form {
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cpg-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cpg-label {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.cpg-optional {
    font-size: 13px;
    color: #666;
    font-weight: 400;
    font-style: italic;
}

.cpg-input {
    width: 100%;
    padding: 12px 16px !important;
    font-size: 18px !important;
    color: black !important;
    background-color: white !important;
    border: 2px solid lightgray !important;
    border-radius: 12px !important;
    outline: none !important;
    box-shadow: none !important;
    line-height: 1.5 !important;
    height: unset !important;
}

.cpg-input:focus {
    border: 2px solid black !important;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* ── Actions ──────────────────────────────────── */
.cpg-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}

.cpg-generate-btn,
.cpg-generate-btn:focus {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 18px;
    background: rgb(13, 29, 173);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.01em;
    outline: none;
    white-space: nowrap;
}

.cpg-generate-btn:hover {
    background: #1d4ed8;
    color: #fff;
}

.cpg-generate-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* ── Result ───────────────────────────────────── */
.cpg-result {
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.cpg-result-label {
    padding: 16px 28px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: rgb(13, 29, 173);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cpg-result-body {
    padding: 0 28px 16px;
}

.cpg-name {
    font-size: 24px;
    font-weight: 800;
    color: #111;
    line-height: 1.25;
}

.cpg-archetype {
    margin-top: 3px;
    font-size: 16px;
    font-weight: 600;
    color: rgb(13, 29, 173);
}

.cpg-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.cpg-trait {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    color: rgb(13, 29, 173);
    background: #eceefb;
    border-radius: 999px;
}

.cpg-section {
    margin-top: 16px;
}

.cpg-section-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 3px;
}

.cpg-section p {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    color: #333;
}

.cpg-loading,
.cpg-empty {
    font-size: 16px;
    color: #555;
    margin: 0;
}

.cpg-result-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px 20px;
    border-top: 1px solid #e8e8e8;
}

.cpg-action-btn,
.cpg-action-btn:focus {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none !important;
    outline: none;
    line-height: 1;
}

.cpg-action-btn:hover {
    color: rgb(13, 29, 173);
    border-color: rgb(13, 29, 173);
    background: #eceefb;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 480px) {
    .cpg-form {
        padding: 20px 18px 18px;
    }

    .cpg-result-label,
    .cpg-result-body,
    .cpg-result-actions {
        padding-left: 18px;
        padding-right: 18px;
    }

    .cpg-generate-btn {
        flex: 1;
        justify-content: center;
    }
}
