html,
body {
    margin: 0;
    padding: 0;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.main-content {
    padding: 20px 40px 100px;
}

.step-container {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 15px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
}

.diagram-container {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
}

.hidden {
    display: none !important;
}

.step-container[open] {
    background-color: #fafafa;
}

.step-container summary {
    font-size: 1.1em;
    font-weight: 500;
    padding: 15px 15px 15px 40px;
    cursor: pointer;
    outline: none;
    user-select: none;
    position: relative;
    list-style: none;
}

.step-container summary::-webkit-details-marker {
    display: none;
}

.step-container summary::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 18px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-chevron-right'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.2s ease-in-out;
}

.step-container[open]>summary:before {
    transform: rotate(90deg);
}

.step-content {
    padding: 0 15px 15px 15px;
}

.step-1-layout {
    display: flex;
    gap: 30px;
}

.input-area {
    flex: 2;
    min-width: 0;
}

.suggestions-area {
    flex: 1;
    min-width: 0;
}

.suggestions-area h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1em;
    color: #555;
    font-weight: 500;
}

.suggestions-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prompt-pill {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    background-color: #e9f3f8;
    color: #0277bd;
    border: 1px solid #d1e6f0;
    border-radius: 16px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-align: left;
}

.prompt-pill:hover {
    background-color: #d1e6f0;
    transform: translateY(-1px);
}

h1 {
    margin-top: 0;
}

textarea {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 10px;
    resize: vertical;
    min-height: 120px;
    height: 20vh;
}

.controls {
    margin-top: 10px;
    display: flex;
    align-items: center;
}

button.analyze-btn,
button.confirm-btn {
    background: #0288d1;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 170px;
    text-align: center;
    white-space: nowrap;
}

button.analyze-btn:hover,
button.confirm-btn:hover {
    background: #027abc;
}

.error-text {
    color: #d32f2f;
    font-weight: 500;
    margin-top: 10px;
}

.export-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.export-btn {
    background: #0288d1;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.export-btn:hover {
    background: #027abc;
}

.json-data-title {
    margin-top: 0;
    margin-bottom: 10px;
}

@media (max-width: 900px) {
    .step-1-layout {
        flex-direction: column;
    }

    .suggestions-area {
        margin-bottom: 20px;
    }

    textarea {
        height: 30vh;
    }
}

@media (min-height: 900px) {

    textarea.user-input,
    textarea.rephrased-text {
        height: 17vh;
    }
}

.export-hint {
    color: #6c757d;
    margin-top: 10px;
    font-size: 0.9em;
}

.path-arrow {
    font-weight: bold;
    margin: 0 5px;
}

.json-editor {
    height: 250px;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
}

.dhx_demo-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #2d333f;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    max-height: 60px;
    z-index: 1000;
    font-family: Roboto, sans-serif;
}

.dhx_demo-footer .dhx_layout-cell-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    width: 100%;
}

.dhx_demo-footer .dhx_slider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    border-radius: 50%;
    border: 2px solid #fff;
    height: 36px;
    width: 36px;
    min-width: 36px;
    text-decoration: none;
    transition: border-color 0.3s, fill 0.3s;
}

.dhx_demo-footer .dhx_slider-btn:hover {
    border-color: #03a9f4;
}

.dhx_demo-footer .dhx_slider-btn:hover path {
    fill: #03a9f4;
}

.dhx_demo-footer .dhx_slider-btn path {
    transition: fill 0.3s;
}

.dhx_demo-footer .dhx_slider-btn--prev {
    transform: rotate(180deg);
    margin-right: 12px;
}

.dhx_demo-footer-text {
    flex: 1 1 auto;
    padding: 0 20px;
    text-align: center;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.8);
}

.dhx_demo-footer-text h1,
.dhx_demo-footer-text p {
    display: inline;
    margin: 0;
    padding: 0;
    color: inherit;
}

.dhx_demo-footer-text h1 {
    font-size: inherit;
    font-weight: inherit;
}

.dhx_demo-footer-text a {
    color: #03a9f4;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
    padding-left: 4px;
}

.dhx_demo-footer-text a:hover {
    text-decoration: underline;
}

.dhx_demo-footer .dhx_sample-btn {
    flex-shrink: 0;
    border: none;
    outline: none;
    padding: 6px 28px;
    font-family: Roboto, Arial, Tahoma, Verdana, sans-serif;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    display: flex;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.dhx_demo-footer .dhx_sample-btn--cta {
    background: #0288d1;
    color: #fff;
    border-radius: 32px;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}

.dhx_demo-footer .dhx_sample-btn--cta:hover {
    background: #027abc;
}