      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }

      body {
        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
        background: #f8f9fa;
        min-height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        color: #1a202c;
        padding: 0;
      }

      .container {
        width: 100%;
        max-width: 900px;
        background: rgba(255, 255, 255, 0.96);
        border-radius: 20px;
        padding: 32px;
        box-shadow: 0 20px 60px rgba(67, 56, 202, 0.18);
      }

      header {
        text-align: center;
        margin-bottom: 24px;
      }

      header h1 {
        font-size: 2.2rem;
        color: #2d3748;
        margin-bottom: 8px;
      }

      header p {
        color: #4a5568;
      }

      .status-panel {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
        margin-bottom: 24px;
      }

      .status-card {
        background: #f1f5f9;
        border-radius: 14px;
        padding: 18px;
        border: 1px solid #cbd5f5;
      }

      .status-card h2 {
        font-size: 1rem;
        color: #2b6cb0;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.06em;
      }

      .status-value {
        font-size: 1.2rem;
        font-weight: 600;
      }

      .status-value.online {
        color: #2f855a;
      }

      .status-value.offline {
        color: #c53030;
      }

      .status-value.idle {
        color: #b7791f;
      }

      .controls {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        margin-bottom: 24px;
        justify-content: center;
      }

      button {
        padding: 12px 28px;
        border: none;
        border-radius: 999px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.25s ease;
        color: #fff;
      }

      button.primary {
        background: #4f46e5;
      }

      button.primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
      }

      button.danger {
        background: #dc2626;
      }

      button.danger:disabled {
        opacity: 0.6;
        cursor: not-allowed;
      }

      /* 连接按钮特定样式 */
      .connect-app-button {
        margin: 4px;
        padding: 10px 12px;
        font-size: 0.85rem;
        min-width: 0;
        white-space: nowrap;
      }

      .override-panel {
        margin-bottom: 20px;
      }

      .override-panel details {
        background: #f7fafc;
        border: 1px solid #d6e0ef;
        border-radius: 12px;
        padding: 10px 14px;
      }

      .override-panel summary {
        cursor: pointer;
        color: #2d3748;
        font-weight: 700;
        user-select: none;
      }

      .override-content {
        margin-top: 12px;
      }

      .override-tip {
        color: #4a5568;
        font-size: 0.9rem;
        margin-bottom: 10px;
      }

      .override-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 12px;
      }

      .override-block {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 10px;
      }

      .override-block h3 {
        color: #2b6cb0;
        font-size: 0.9rem;
        margin-bottom: 8px;
      }

      .override-block label,
      .override-advanced-label {
        display: block;
        color: #4a5568;
        font-size: 0.85rem;
        margin-bottom: 6px;
      }

      .override-block input,
      .override-block select,
      .override-panel textarea {
        width: 100%;
        border: 1px solid #cbd5e0;
        border-radius: 8px;
        padding: 8px 10px;
        font-size: 0.85rem;
        color: #1a202c;
        background: #fff;
        margin-bottom: 8px;
      }

      .override-panel textarea {
        min-height: 96px;
        resize: vertical;
        font-family: "Consolas", "Monaco", monospace;
      }

      .override-hidden {
        display: none;
      }

      .override-note {
        color: #2d3748;
        font-size: 0.82rem;
        line-height: 1.5;
        background: #f7fafc;
        border: 1px dashed #cbd5e0;
        border-radius: 8px;
        padding: 8px;
        margin-top: 8px;
      }

      .override-footnote {
        color: #718096;
        font-size: 0.8rem;
        margin-top: 2px;
      }

      .override-actions {
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
      }

      .override-action {
        border: 1px solid #38a169;
        background: #38a169;
        color: #fff;
        border-radius: 8px;
        padding: 8px 12px;
        font-size: 0.85rem;
      }

      .override-action.secondary {
        border-color: #718096;
        background: #718096;
      }

      .override-status {
        font-size: 0.85rem;
        color: #2d3748;
      }

      .override-status.error {
        color: #c53030;
      }

      /* 一个没用的注释，触发重启 */
      .meter {
        background: #edf2f7;
        border-radius: 14px;
        padding: 12px 18px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 0.95rem;
        color: #4a5568;
      }

      .meter span {
        font-weight: 600;
        color: #2d3748;
      }

      .meter-bar {
        margin-top: 8px;
        width: 180px;
        height: 10px;
        background: #e2e8f0;
        border-radius: 999px;
        overflow: hidden;
      }

      .meter-fill {
        height: 100%;
        width: 0%;
        background: #4f46e5;
        transition: width 0.1s ease;
      }

      .volume-control {
        display: flex;
        align-items: center;
        gap: 12px;
        justify-content: center;
        margin-top: 8px;
      }

      .volume-control label {
        font-weight: 600;
        color: #2d3748;
      }

      .volume-control input {
        width: 220px;
      }

      .conversation-log {
        background: #f7fafc;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 16px;
        margin: 24px 0;
        max-height: 300px;
        overflow-y: auto;
        font-family: "Consolas", "Monaco", monospace;
        font-size: 0.9rem;
      }

      .log-entry {
        margin-bottom: 8px;
        padding: 8px;
        border-radius: 6px;
        background: white;
        border-left: 4px solid #cbd5e0;
      }

      .log-entry.stt {
        border-left-color: #4299e1;
        background: #ebf8ff;
      }

      .log-entry.llm {
        border-left-color: #48bb78;
        background: #f0fff4;
      }

      .log-entry.waiting {
        border-left-color: #cbd5e0;
        background: linear-gradient(135deg, rgba(247, 250, 252, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
        opacity: 0;
        transform: translateY(4px);
        animation: waitingFadeIn 0.18s ease-out forwards;
      }

      .waiting-indicator {
        display: inline-flex;
        align-items: center;
        gap: 14px;
        color: #718096;
        font-weight: 500;
      }

      .waiting-indicator-label {
        letter-spacing: 0.01em;
      }

      .waiting-indicator-dots {
        display: inline-flex;
        align-items: center;
        gap: 6px;
      }

      .waiting-indicator-dot {
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: #a0aec0;
        box-shadow: 0 0 0 1px rgba(160, 174, 192, 0.12);
        animation: waitingWave 1.2s infinite ease-in-out;
      }

      .waiting-indicator-dot:nth-child(2) {
        animation-delay: 0.16s;
      }

      .waiting-indicator-dot:nth-child(3) {
        animation-delay: 0.32s;
      }

      @keyframes waitingFadeIn {
        from {
          opacity: 0;
          transform: translateY(4px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }

      @keyframes waitingWave {
        0%,
        80%,
        100% {
          transform: translateY(0);
          opacity: 0.3;
        }
        40% {
          transform: translateY(-3px);
          opacity: 1;
        }
      }

      @media (prefers-reduced-motion: reduce) {
        .log-entry.waiting {
          animation: none;
          opacity: 1;
          transform: none;
        }

        .waiting-indicator-dot {
          animation: none;
          opacity: 0.7;
        }
      }

      .log-entry.error {
        border-left-color: #f56565;
        background: #fed7d7;
        color: #c53030;
      }

      /* === TTS 指令专用样式（与普通回复区分） === */
      .log-entry.tts-cmd {
        border-left-color: #9f7aea; /* 紫色边框 */
        background: #faf5ff; /* 浅紫背景 */
      }
      .log-entry .source.tts-cmd {
        color: #805ad5; /* 深紫文字 */
        font-weight: 700;
      }

      .log-entry time {
        font-size: 0.8rem;
        color: #718096;
        margin-right: 8px;
      }

      .log-entry .source {
        font-weight: 600;
        margin-right: 8px;
      }

      .log-entry .source.stt {
        color: #2b6cb0;
      }

      .log-entry .source.llm {
        color: #2f855a;
      }

      .log-entry .source.waiting {
        color: #2c5282;
      }

      .log-entry .source.error {
        color: #c53030;
      }

      .error-popup {
        position: fixed;
        top: 20px;
        right: 20px;
        background: #fed7d7;
        border: 1px solid #feb2b2;
        border-radius: 8px;
        padding: 16px;
        max-width: 400px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        animation: slideIn 0.3s ease-out;
      }

      .error-popup .error-title {
        font-weight: 600;
        color: #c53030;
        margin-bottom: 8px;
      }

      .error-popup .error-message {
        color: #742a2a;
        font-size: 0.9rem;
      }

      .error-popup .close-btn {
        position: absolute;
        top: 8px;
        right: 8px;
        background: none;
        border: none;
        font-size: 1.2rem;
        color: #c53030;
        cursor: pointer;
        padding: 4px;
      }

      @keyframes slideIn {
        from {
          transform: translateX(100%);
          opacity: 0;
        }
        to {
          transform: translateX(0);
          opacity: 1;
        }
      }

      .websocket-status {
        display: inline-block;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        margin-right: 8px;
      }

      .websocket-status.connected {
        background: #48bb78;
      }

      .websocket-status.disconnected {
        background: #f56565;
      }

      .websocket-status.connecting {
        background: #ed8936;
        animation: pulse 1s infinite;
      }

      @keyframes pulse {
        0%,
        100% {
          opacity: 1;
        }
        50% {
          opacity: 0.5;
        }
      }

      footer {
        margin-top: 24px;
        text-align: center;
        font-size: 0.85rem;
        color: #4a5568;
      }

      footer code {
        background: #edf2f7;
        padding: 2px 6px;
        border-radius: 6px;
      }

      .control-button.active { background: #48bb78; color: white; font-weight: bold; }
      .status-value { font-size: 0.95rem; }
      .control-row { display: flex; gap: 8px; flex-wrap: nowrap; }
      .status-card .control-button {
        padding: 6px 14px; font-size: 0.82rem; border-radius: 8px;
        border: 1px solid #cbd5e0; background: #f1f5f9; color: #475569;
        cursor: pointer; white-space: nowrap;
      }
      /* 外放模式提示文案（默认隐藏，匹配外放时显示） */
      .speaker-hint {
        margin-top: 6px;
        color: #718096; /* slate-500 */
        font-size: 0.85rem;
        display: none;
      }
      .speaker-hint.visible {
        display: block;
      }
      /* ===== 问题反馈与浏览器端混音 ===== */
      .feedback-open-button {
        background: linear-gradient(135deg, #5a67d8, #805ad5);
        color: #fff;
      }

      .feedback-modal {
        position: fixed;
        inset: 0;
        z-index: 10002;
        display: none;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        transition: opacity 0.2s ease;
        padding: 16px;
      }

      .feedback-modal.open {
        display: flex;
        opacity: 1;
      }

      .feedback-panel {
        position: relative;
        width: min(560px, calc(100vw - 28px));
        max-height: calc(100vh - 32px);
        overflow-y: auto;
        background: rgba(255, 255, 255, 0.98);
        border-radius: 20px;
        padding: 24px;
        box-shadow: 0 20px 60px rgba(67, 56, 202, 0.22);
      }

      .feedback-head,
      .feedback-actions,
      .feedback-audio-actions {
        display: flex;
        align-items: center;
        gap: 12px;
      }

      .feedback-head {
        justify-content: space-between;
        margin-bottom: 16px;
      }

      .feedback-head h2 {
        margin: 0;
        font-size: 1.25rem;
        color: #2d3748;
      }

      .feedback-icon-button {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        border: none;
        background: #edf2f7;
        color: #4a5568;
        font-size: 1.3rem;
        line-height: 1;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
      }

      .feedback-icon-button:hover:not(:disabled) {
        background: #e2e8f0;
      }

      .feedback-field {
        display: grid;
        gap: 7px;
        margin-bottom: 14px;
      }

      .feedback-field span {
        font-weight: 600;
        color: #4a5568;
        font-size: 0.9rem;
      }

      .feedback-field textarea,
      .feedback-field select {
        width: 100%;
        box-sizing: border-box;
        padding: 10px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #fff;
        color: #2d3748;
        font-size: 0.95rem;
        font-family: inherit;
      }

      .feedback-field textarea:focus,
      .feedback-field select:focus {
        outline: none;
        border-color: #805ad5;
        box-shadow: 0 0 0 3px rgba(128, 90, 213, 0.12);
      }

      .feedback-field textarea {
        min-height: 116px;
        resize: vertical;
      }

      .feedback-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
      }

      .feedback-audio {
        margin-top: 16px;
        border-top: 1px solid #e2e8f0;
        padding-top: 14px;
      }

      .feedback-audio-title {
        color: #4a5568;
        font-size: 0.86rem;
        font-weight: 600;
        margin-bottom: 8px;
      }

      .feedback-audio-actions {
        flex-wrap: wrap;
      }

      .feedback-audio-actions button {
        padding: 8px 14px;
        border-radius: 999px;
        border: none;
        font-weight: 600;
        cursor: pointer;
        color: #fff;
      }

      .feedback-record {
        background: linear-gradient(135deg, #f56565, #e53e3e);
      }

      .feedback-record:hover:not(:disabled) {
        background: linear-gradient(135deg, #fc8181, #f56565);
      }

      .feedback-audio-actions button:disabled {
        cursor: not-allowed;
        opacity: 0.48;
      }

      .feedback-hint,
      .feedback-status {
        color: #4a5568;
        font-size: 0.82rem;
      }

      .feedback-status {
        margin-left: 4px;
      }

      .feedback-actions {
        justify-content: flex-start;
        margin-top: 18px;
      }

      .feedback-actions button {
        background: linear-gradient(135deg, #48bb78, #38a169);
        color: #fff;
      }

      @media (max-width: 520px) {
        .feedback-grid {
          grid-template-columns: 1fr;
        }
        .feedback-panel {
          padding: 16px;
        }
      }
    
