        * { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', monospace;
            background: #1e1e1e;
            color: #d4d4d4;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .container {
            background: #2d2d2d;
            padding: 28px;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.4);
            width: 500px;
            max-width: 95vw;
        }
        h1 {
            font-size: 20px;
            text-align: center;
            margin-bottom: 8px;
        }
        .badge-group {
            text-align: center;
            margin-bottom: 20px;
            display: flex;
            justify-content: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .badge-group .badge {
            background: #0e639c;
            padding: 3px 10px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: normal;
        }
        .info {
            background: #1e1e1e;
            padding: 12px 14px;
            margin: 10px 0;
            border-left: 3px solid #7c3aed;
            font-size: 13px;
            border-radius: 4px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .info .id-value {
            color: #4caf50;
            font-size: 18px;
            font-weight: bold;
            font-family: monospace;
        }
        .peer-info {
            background: #1e1e1e;
            padding: 12px 14px;
            margin: 10px 0;
            border-left: 3px solid #4caf50;
            font-size: 13px;
            border-radius: 4px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .peer-info .peer-id-value {
            color: #7c3aed;
            font-size: 18px;
            font-weight: bold;
            font-family: monospace;
        }
        .room-id-info {
            background: #1e1e1e;
            padding: 12px 14px;
            margin: 10px 0;
            border-left: 3px solid #ffa500;
            font-size: 13px;
            border-radius: 4px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .room-id-info .room-id-value {
            color: #ffa500;
            font-size: 18px;
            font-weight: bold;
            font-family: monospace;
        }
        .status {
            background: #1e1e1e;
            padding: 14px;
            text-align: center;
            font-weight: bold;
            border-radius: 6px;
            font-size: 15px;
            margin: 12px 0;
            min-height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .room-status-section {
            background: #1e1e1e;
            border-radius: 6px;
            padding: 12px 14px;
            margin: 10px 0;
            text-align: center;
        }
        .room-status-section h3 {
            font-size: 12px;
            color: #888;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        .room-status {
            font-size: 16px;
            font-weight: bold;
            padding: 8px 16px;
            border-radius: 8px;
            display: inline-block;
        }
        .room-status.waiting {
            color: #ffa500;
            background: rgba(255, 165, 0, 0.1);
        }
        .room-status.active {
            color: #4caf50;
            background: rgba(76, 175, 80, 0.1);
        }
        .room-status.full {
            color: #d16969;
            background: rgba(209, 105, 105, 0.1);
        }
        .peers-section {
            background: #1e1e1e;
            border-radius: 6px;
            padding: 12px 14px;
            margin: 10px 0;
        }
        .peers-section h3 {
            font-size: 12px;
            color: #888;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        .peers-list {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        .peer-item {
            background: #3d3d3d;
            padding: 6px 12px;
            border-radius: 16px;
            font-size: 13px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
        .btn-group {
            display: flex;
            gap: 8px;
            margin-top: 14px;
        }
        button {
            flex: 1;
            background: #0e639c;
            color: white;
            border: none;
            padding: 14px 20px;
            cursor: pointer;
            border-radius: 6px;
            font-size: 16px;
            transition: all 0.2s;
            font-weight: 500;
        }
        button:hover:not(:disabled) {
            background: #1177bb;
            transform: translateY(-1px);
        }
        button:disabled {
            background: #555;
            cursor: not-allowed;
            opacity: 0.6;
        }
        #leaveBtn {
            background: #d16969;
        }
        #leaveBtn:hover:not(:disabled) {
            background: #e07b7b;
        }
        #debugPanel {
            background: #1a1a1a;
            padding: 12px 14px;
            margin-top: 14px;
            border-radius: 6px;
            font-size: 12px;
            display: none;
        }
        #debugPanel h3 {
            font-size: 11px;
            color: #888;
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        #debugInfo {
            font-family: monospace;
            line-height: 1.8;
            color: #aaa;
        }
        .footer-note {
            text-align: center;
            font-size: 11px;
            color: #919191;
            margin-top: 14px;
            border-top: 1px solid #3d3d3d;
            padding-top: 12px;
        }
        #coep-status {
            font-size: 12px;
            text-align: center;
            padding: 8px;
            background: #2d2d2d;
            border-radius: 6px;
            margin-top: 10px;
        }
        .coep-ok { color: #4caf50; }
        .coep-fail { color: #d16969; }

        /* 讲话指示器 */
        .speaking-indicator {
            font-size: 11px;
            color: #4caf50;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            margin-left: 8px;
        }
        .speaking-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #555;
            display: inline-block;
            transition: all 0.15s;
        }
        .speaking-dot.active {
            background: #4caf50;
            box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
            animation: pulse 0.8s ease-in-out infinite;
        }
        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.3); opacity: 0.7; }
        }

        /* ===== 文字聊天区域 ===== */
        .chat-section {
            background: #1e1e1e;
            border-radius: 6px;
            padding: 12px 14px;
            margin-top: 14px;
        }
        .chat-section h3 {
            font-size: 12px;
            color: #888;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        .chat-messages {
            background: #2d2d2d;
            border-radius: 4px;
            padding: 10px;
            min-height: 120px;
            max-height: 200px;
            overflow-y: auto;
            font-size: 13px;
            line-height: 1.6;
            margin-bottom: 8px;
        }
        .chat-messages::-webkit-scrollbar {
            width: 6px;
        }
        .chat-messages::-webkit-scrollbar-track {
            background: #1e1e1e;
        }
        .chat-messages::-webkit-scrollbar-thumb {
            background: #555;
            border-radius: 3px;
        }
        .chat-placeholder {
            color: #666;
            text-align: center;
            padding: 30px 0;
            font-size: 13px;
        }
        .chat-msg {
            margin-bottom: 6px;
            padding: 4px 8px;
            border-radius: 4px;
            word-break: break-word;
        }
        .chat-msg-self {
            background: rgba(76, 175, 80, 0.1);
            border-left: 3px solid #4caf50;
        }
        .chat-msg-other {
            background: rgba(124, 58, 237, 0.1);
            border-left: 3px solid #7c3aed;
        }
        .chat-msg-system {
            color: #888;
            font-style: italic;
            font-size: 12px;
            text-align: center;
        }
        .chat-msg-header {
            font-size: 11px;
            color: #888;
            margin-bottom: 2px;
        }
        .chat-msg-header .chat-sender {
            font-weight: bold;
        }
        .chat-msg-header .chat-time {
            float: right;
        }
        .chat-msg-body {
            color: #d4d4d4;
        }
        .chat-input-row {
            display: flex;
            gap: 6px;
        }
        .chat-input {
            flex: 1;
            background: #2d2d2d;
            border: 1px solid #3d3d3d;
            color: #d4d4d4;
            padding: 10px 12px;
            border-radius: 4px;
            font-size: 13px;
            outline: none;
            transition: border-color 0.2s;
        }
        .chat-input:focus {
            border-color: #0e639c;
        }
        .chat-input:disabled {
            opacity: 0.5;
        }
        .chat-send-btn {
            flex: 0 0 auto;
            background: #0e639c;
            color: white;
            border: none;
            padding: 10px 18px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            transition: background 0.2s;
        }
        .chat-send-btn:hover:not(:disabled) {
            background: #1177bb;
        }
        .chat-send-btn:disabled {
            background: #555;
            cursor: not-allowed;
            opacity: 0.5;
        }
