.csbtn-container {
    max-width: 100%;
    margin: 24px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.csbtn-container h3 {
    margin: 0 0 6px 0;
    font-size: 22px;
}

.csbtn-container > p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ── Пресеты ── */
.csbtn-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 24px;
    padding: 14px 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.csbtn-presets-label {
    font-weight: 700;
    font-size: 14px;
    margin-right: 4px;
    color: #333;
}

.csbtn-preset-btn {
    padding: 6px 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #4886d3;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.csbtn-preset-btn:hover {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* ── Раскладка ── */
.csbtn-layout {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.csbtn-controls {
    flex: 1;
    min-width: 300px;
    background: #f8f9fa;
    padding: 18px;
    border-radius: 8px;
}

.csbtn-preview-area {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.csbtn-preview-box {
    text-align: center;
}

.csbtn-live {
    cursor: pointer;
    border: none;
    outline: none;
    background: #2271b1;
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    transition: background-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.csbtn-preview-hint {
    margin-top: 16px;
    color: #666;
    font-size: 13px;
    text-align: center;
}

/* ── Элементы управления ── */
.csbtn-group {
    margin-bottom: 16px;
}

.csbtn-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    color: #333;
}

.csbtn-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.csbtn-color {
    width: 100%;
    height: 36px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px;
    cursor: pointer;
    box-sizing: border-box;
}

.csbtn-row {
    display: flex;
    gap: 12px;
}

.csbtn-half {
    flex: 1;
}

.csbtn-divider {
    height: 1px;
    background: #d0d0d0;
    margin: 18px 0;
}

.csbtn-section-title {
    font-size: 15px;
    margin: 0 0 14px 0;
    color: #333;
}

.csbtn-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.csbtn-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ── Блок кода ── */
.csbtn-code-section {
    margin-top: 32px;
}

.csbtn-code-section h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
}

.csbtn-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: "Courier New", monospace;
    font-size: 13px;
    line-height: 1.4;
    resize: vertical;
    min-height: 280px;
    box-sizing: border-box;
    background: #1e1e1e;
    color: #d4d4d4;
}

.csbtn-action {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 12px;
}

.csbtn-action:hover {
    background: #135e96;
}

.csbtn-copied {
    display: none;
    color: #28a745;
    margin-left: 10px;
    font-size: 14px;
    font-weight: 600;
}

/* ── Мобильная адаптация ── */
@media (max-width: 768px) {
    .csbtn-layout {
        flex-direction: column;
    }
    .csbtn-row {
        flex-direction: column;
        gap: 0;
    }
    .csbtn-preview-area {
        min-height: 200px;
    }
}
