body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background: #F5F5F5;
}
header {
    background: #fff;
    border-bottom: 1px solid #E0E0E0;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
}
.logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}
.logo-text {
    font-size: 16px;
    font-weight: 600;
}
.logo-text span {
    color: #7f8c8d;
    font-weight: 400;
    margin-left: 4px;
}
.container {
    max-width: 800px;
    margin: 24px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
}
h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}
h5, h6 {
    margin-top: 20px;
    margin-bottom: 10px;
}
.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}
.tab {
    padding: 10px 20px;
    cursor: pointer;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    border-radius: 6px 6px 0 0;
    outline: none;
    transition: background 0.15s, color 0.15s;
}
.tab.active {
    background: white;
    border-bottom: 1px solid white;
    margin-bottom: -1px;
    color: #2c3e50;
    font-weight: 600;
}
.tab:hover:not(.active) {
    background: #eef2f5;
    color: #333;
}
.tab-content {
    display: none;
    padding: 20px 0;
}
.tab-content.active {
    display: block;
}
.tab-description {
    background: #eef6fb;
    border-left: 3px solid #3498db;
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    color: #2c3e50;
    margin-bottom: 32px;
    font-size: 0.9rem;
    line-height: 1.6;
}
.tab-description p {
    margin: 0 0 4px 0;
}
.tab-description p:last-child {
    margin-bottom: 0;
}
textarea, select, input[type="file"], input[type="number"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
button {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
    margin-bottom: 5px;
}
button:hover {
    background: #2980b9;
}
.btn-secondary {
    background: #95a5a6;
}
.btn-secondary:hover {
    background: #7f8c8d;
}
.btn-success {
    background: #2ecc71;
}
.btn-success:hover {
    background: #27ae60;
}
.btn-danger {
    background: #e74c3c;
}
.btn-danger:hover {
    background: #c0392b;
}
.form-group {
    margin-bottom: 15px;
}
label {
    display: block;
    margin-bottom: 5px;
}
.field-annotation {
    font-size: 12px;
    font-weight: 500;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.field-annotation.collapsible {
    cursor: pointer;
    user-select: none;
}
.field-annotation.collapsible:hover {
    color: #3498db;
}
.collapse-arrow {
    display: inline-block;
    font-size: 10px;
    margin-right: 4px;
}
.collapse-arrow::before {
    content: '▲';
}
.collapse-arrow.open::before {
    content: '▼';
}
.help-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #555;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
    position: relative;
}
.help-link:hover {
    background: #3498db;
    color: #fff;
}
.help-link .help-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 0;
    white-space: normal;
    width: 260px;
    pointer-events: none;
    z-index: 20;
}
.help-link .help-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
}
.help-link:hover .help-tooltip {
    display: block;
}
.bg-light {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}
#streamResults {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    min-height: 250px;
    max-height: 500px;
    overflow-y: auto;
    padding: 20px 24px;
    font-size: 1.25rem;
    line-height: 1.8;
}
#streamResults p {
    display: block;
    margin: 0 0 4px 0;
    padding: 0;
    border: none;
    font-weight: normal;
}
#finalText {
    color: #222;
}
#finalText .stream-final {
    color: #222;
    font-weight: normal;
    margin: 0;
    padding: 0;
    border: none;
    padding-left: 16px !important;
    position: relative;
}
#finalText .stream-final::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2ecc71;
}
#finalText .stream-separator {
    border: none !important;
    border-top: 1px dashed #ddd !important;
    margin: 12px 0 !important;
    padding: 0 !important;
}
#partialText {
    color: #bbb;
    font-style: italic;
    font-weight: normal;
    font-size: 1.4rem !important;
    transition: opacity 0.2s ease;
    margin-top: 8px !important;
    padding-left: 16px !important;
}
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: monospace;
    margin: 0;
}
.spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
    margin-right: 5px;
    vertical-align: middle;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.hidden {
    display: none;
}
.text-monospace {
    font-family: monospace;
}
.text-break {
    word-break: break-word;
}
#charCount {
    font-size: 0.8em;
    color: #7f8c8d;
    margin-bottom: 10px;
}
#resultStt, #resultSttTagOne, #resultSttTagTwo {
    font-size: 0.75rem;
    position: relative;
}
#processing, #processingStt {
    display: none;
    vertical-align: middle;
}
.copy-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e0e0e0;
    color: #555;
    border: none;
    border-radius: 4px;
    padding: 4px 6px;
    margin-top: 15px;
    margin-right: 15px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s, background 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.copy-btn:hover {
    opacity: 1;
    background: #ccc;
}
.copy-btn.copied {
    opacity: 1;
    background: #2ecc71;
    color: white;
}
.result-container {
    position: relative;
}
.json-key {
    color: #881391;
}
.json-string {
    color: #1A1AA6;
}
.json-number {
    color: #1A1AA6;
}
.json-boolean {
    color: #1A1AA6;
}
.json-null {
    color: #1A1AA6;
}
.dialogue-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
    max-height: 500px;
    overflow-y: auto;
}
.dialogue-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    word-break: break-word;
    clear: both;
    position: relative;
}
.dialogue-bubble.left {
    background: #e3e8ed;
    color: #333;
    float: left;
    border-bottom-left-radius: 2px;
}
.dialogue-bubble.right {
    background: #3498db;
    color: white;
    float: right;
    border-bottom-right-radius: 2px;
}
.bubble-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 6px;
    pointer-events: none;
}
.dialogue-bubble.right .bubble-tooltip {
    left: auto;
    right: 0;
}
.dialogue-bubble:hover .bubble-tooltip {
    display: block;
}
.tooltip-row {
    margin-bottom: 2px;
}
.tooltip-label {
    color: #aaa;
    margin-right: 4px;
}
.dialogue-clearfix {
    clear: both;
}
.stream-only {
    display: none;
}
.stream-enabled .stream-only {
    display: block;
}
.analysis-section {
    display: none;
    margin-top: 10px;
}
.analysis-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 10px;
}
.analysis-card.stream-summary {
    background: #f0faf4;
    border-color: #b7e4c7;
}
.analysis-card h6 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #2c3e50;
}
.analysis-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.analysis-table th,
.analysis-table td {
    text-align: left;
    padding: 4px 8px;
    border-bottom: 1px solid #eee;
}
.analysis-table th {
    color: #7f8c8d;
    font-weight: 600;
}
.analysis-table td {
    color: #333;
}
.interrupts-list {
    font-size: 0.8rem;
    margin-top: 6px;
}
.interrupts-list .interrupt-item {
    background: #fff3cd;
    border-radius: 4px;
    padding: 4px 8px;
    margin-bottom: 4px;
    display: inline-block;
    margin-right: 4px;
}
.sliders-section {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 6px;
}
.slider-group {
    margin-bottom: 10px;
}
.slider-group:last-child {
    margin-bottom: 0;
}
.slider-group label {
    font-size: 0.85rem;
    margin-bottom: 4px;
}
.slider-group input[type="range"] {
    width: 100%;
    margin: 0;
    padding: 0;
}
.custom-dropdown {
    position: relative;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    max-height: 200px;
    overflow-y: auto;
}
.dropdown-content a {
    color: black;
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    cursor: pointer;
}
.dropdown-content a:hover {
    background-color: #f1f1f1;
}
.show {
    display: block;
}
.stream-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-left: 16px;
    margin-bottom: 8px;
}
.stream-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: 1.4;
    white-space: nowrap;
}
.stream-badge.badge-red {
    background: #fde8e8;
    color: #c0392b;
}
.stream-badge.badge-green {
    background: #e8f8f0;
    color: #27ae60;
}
.stream-badge.badge-blue {
    background: #e8f0fd;
    color: #2471a3;
}
.stream-badge.badge-grey {
    background: #f0f0f0;
    color: #666;
}
footer {
    text-align: center;
    padding: 16px 24px;
    font-size: 13px;
    color: #7f8c8d;
}
footer a {
    color: #7f8c8d;
    text-decoration: none;
    margin: 0 12px;
}
footer a:hover {
    color: #3498db;
    text-decoration: underline;
}
