/* ========================================
   FMO 西南集群 - 组件样式
   包含：服务器卡片、日志表格、节点列表、弹窗、悬浮面板等
   ======================================== */

/* === 服务器卡片 === */
.server-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 220px;
    box-sizing: border-box;
}

.card-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.card-tab {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.card-tab:hover {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.05);
}

.card-tab.active {
    color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.08);
}

.card-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    border-radius: 1px;
}

.tab-icon {
    font-size: 16px;
}

.tab-badge {
    font-size: 11px;
    font-weight: 700;
    background: rgba(34, 211, 238, 0.2);
    color: var(--accent-cyan);
    padding: 1px 8px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

.card-tab:not(.active) .tab-badge {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-muted);
}

.server-list-wrap {
    flex: 1;
    max-height: 380px;
    overflow-y: auto;
    padding: 8px;
}

.server-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.server-item:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: var(--border-color);
    transform: translateX(4px);
}

.server-item.active {
    background: rgba(34, 211, 238, 0.12);
    border-color: rgba(34, 211, 238, 0.4);
}

.server-item-info {
    min-width: 0;
    flex: 1;
}

.server-item-name {
    font-size: 14px;
    font-weight: normal;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.server-item-name .pin-icon {
    color: #f59e0b;
    font-size: 12px;
}

.server-item-uid {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    font-family: monospace;
}

.server-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.badge-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-outline {
    padding: 5px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    transition: all var(--transition-fast);
}

.btn-outline:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.1);
}

.btn-outline:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-pin {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    transition: all var(--transition-fast);
}

.btn-pin:hover {
    background: rgba(245, 158, 11, 0.2);
    transform: scale(1.1);
}

.btn-pin.pinned {
    background: rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.empty-tip {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* === 通联记录表格 === */
.log-section {
    padding: 20px;
}

.log-table-wrap {
    max-height: 450px;
    overflow-y: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.log-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 0 0;
}

.page-btn {
    padding: 4px 14px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card, rgba(255,255,255,0.05));
    color: var(--text-secondary, #aaa);
    cursor: pointer;
    transition: all 0.2s;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--accent-cyan, #00d4ff);
    color: var(--accent-cyan, #00d4ff);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    font-size: 12px;
    color: var(--text-secondary, #888);
    min-width: 50px;
    text-align: center;
}

.log-table {
    width: 100%;
    font-size: 13px;
    border-collapse: separate;
    border-spacing: 0;
    font-family: "Microsoft YaHei", "微软雅黑", -apple-system, BlinkMacSystemFont, sans-serif;
}

.log-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--card-bg);
}

.log-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--accent-cyan);
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.5px;
    white-space: nowrap;
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.15), rgba(34, 211, 238, 0.05));
    backdrop-filter: blur(8px);
}

.log-table td {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.08);
    color: var(--text-secondary);
}

.log-table tbody tr {
    transition: background var(--transition-fast);
}

.log-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.08);
}

.log-table tbody tr:nth-child(even) {
    background: rgba(59, 130, 246, 0.03);
}

.log-table tbody tr:nth-child(even):hover {
    background: rgba(59, 130, 246, 0.08);
}

.log-table .call-col {
    font-weight: 700;
    color: var(--primary-light);
    font-family: "Microsoft YaHei", "微软雅黑", -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
}

.call-cell-content {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.call-name {
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.call-name:hover {
    color: var(--accent-cyan);
    text-decoration: underline;
}

.call-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(59, 130, 246, 0.1);
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.4;
}

.log-table .grid-col {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.log-table .time-col {
    font-family: monospace;
    font-size: 12px;
}

.log-table .mode-col {
    font-weight: 600;
    color: var(--accent-purple);
}

.log-table .freq-col {
    font-family: "Consolas", monospace;
    font-size: 12px;
    color: var(--accent-cyan, #00d4ff);
    white-space: nowrap;
}

.log-table .signal-col {
    font-family: monospace;
    color: var(--accent-green);
}

.log-table .station-col {
    font-size: 12px;
    color: var(--text-secondary);
}

.log-table .ago-col {
    font-size: 12px;
    color: var(--text-muted);
}

/* 新日志样式 */
.log-table .call-grid {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
    font-family: "Consolas", monospace;
}

.log-table .time-col {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

.log-table .time-date {
    color: #999;
}

.log-table .time-time {
    color: #aaa;
    font-family: "Consolas", monospace;
}

.log-table .msg-col {
    color: #bbb;
    font-size: 12px;
}

.log-table .mode-col {
    color: #888;
    font-size: 12px;
    text-align: center;
}

.log-table .station-col .station-name {
    color: #4a9eff;
    cursor: pointer;
}

.log-table .station-col .pin-icon {
    color: #ffb800;
    margin-right: 4px;
}

.new-badge {
    display: inline-block;
    padding: 0 5px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 3px;
    line-height: 16px;
    animation: newBadgePulse 2s ease-in-out infinite;
    vertical-align: middle;
}

@keyframes newBadgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.pin-icon {
    display: inline-block;
    margin-right: 4px;
    font-size: 12px;
    vertical-align: middle;
}

.empty-row td {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}
/* === 节点状态 === */
.node-section {
    padding: 0;
    overflow: hidden;
}

.node-section .section-title {
    margin: 0;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.node-list {
    padding: 20px 16px 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    transition: max-height var(--transition-normal);
}

.node-list.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.node-item {
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.02));
    border: 1px solid rgba(59, 130, 246, 0.15);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.node-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #22d3ee, #3b82f6);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.node-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    border-color: rgba(34, 211, 238, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.node-item:hover::before {
    opacity: 1;
}

.node-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-online {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e, 0 0 12px rgba(34, 197, 94, 0.5);
    animation: blinkGreen 2s ease-in-out infinite;
}

.dot-offline {
    background: #64748b;
    opacity: 0.5;
}

.node-item-name {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.node-version-inline {
    font-size: 11px;
    font-weight: 600;
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.12);
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
    font-family: 'Consolas', 'Monaco', monospace;
}

.node-status-inline {
    font-size: 12px;
    font-weight: 600;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.node-status-inline.status-online {
    color: #4ade80;
}

.node-status-inline.status-offline {
    color: #94a3b8;
}

.node-item-info {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.node-info-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.node-info-left span:not(:last-child)::after {
    content: '·';
    margin-left: 8px;
    color: #475569;
}

.node-version {
    color: #22d3ee;
    font-weight: 600;
}

.node-connections {
    color: #fbbf24;
    font-weight: 600;
}

.node-uptime {
    color: #4ade80;
}

/* 每个节点的呼吸动画延迟不同 */
.node-item:nth-child(1) .dot-online { animation-delay: 0s; }
.node-item:nth-child(2) .dot-online { animation-delay: 0.3s; }
.node-item:nth-child(3) .dot-online { animation-delay: 0.6s; }
.node-item:nth-child(4) .dot-online { animation-delay: 0.9s; }
.node-item:nth-child(5) .dot-online { animation-delay: 1.2s; }
.node-item:nth-child(6) .dot-online { animation-delay: 1.5s; }
.node-item:nth-child(7) .dot-online { animation-delay: 0.2s; }
.node-item:nth-child(8) .dot-online { animation-delay: 0.5s; }
.node-item:nth-child(9) .dot-online { animation-delay: 0.8s; }
.node-item:nth-child(10) .dot-online { animation-delay: 1.1s; }
.node-item:nth-child(11) .dot-online { animation-delay: 1.4s; }
.node-item:nth-child(12) .dot-online { animation-delay: 0.7s; }

/* === 弹窗 === */
.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

/* 全屏时弹窗确保在最上层 */
.main-display:fullscreen .modal-mask,
.main-display:-webkit-full-screen .modal-mask,
.main-display:fullscreen .station-modal,
.main-display:-webkit-full-screen .station-modal,
.main-display:fullscreen .call-detail-modal,
.main-display:-webkit-full-screen .call-detail-modal {
    z-index: 9999 !important;
    position: fixed !important;
}

.modal-mask.show {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    transition: all var(--transition-normal);
}

.modal-mask.show .modal-box {
    transform: translateY(0) scale(1);
}

.modal-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-hd h3 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.modal-title-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(59, 130, 246, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22d3ee;
    flex-shrink: 0;
}

.modal-title-icon svg {
    width: 18px;
    height: 18px;
}

.modal-title-text {
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    transform: rotate(90deg);
}

.modal-bd {
    padding: 20px 24px;
}

.modal-ft {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-primary {
    padding: 8px 20px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
}

/* === 服务器切换列表 === */
.server-switch-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.server-switch-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.server-switch-item:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: var(--accent-cyan);
}

.server-switch-item.current {
    background: rgba(34, 211, 238, 0.12);
    border-color: rgba(34, 211, 238, 0.4);
}

.server-switch-info {
    flex: 1;
}

.server-switch-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.server-switch-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* === 悬浮日志面板 === */
.float-log-panel {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 600px;
    max-height: 70vh;
    z-index: 500;
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.float-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 14px;
    color: var(--accent-cyan);
}

.float-log-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.float-log-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.float-log-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.float-log-body .log-table th {
    font-size: 11px;
    padding: 8px 10px;
}

.float-log-body .log-table td {
    font-size: 12px;
    padding: 6px 10px;
}

/* === 屏保时间 === */
.screen-time {
    font-size: 72px;
    font-weight: 200;
    font-family: 'Courier New', monospace;
    color: var(--text-primary);
    letter-spacing: 4px;
    display: none;
}

.screen-time.show {
    display: block;
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === LIVE 指示器 === */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    animation: livePulse 1.5s ease-in-out infinite;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444, 0 0 16px rgba(239, 68, 68, 0.4);
}

.live-text {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}


/* === 设置表单 === */
.settings-form {
    padding: 10px 0;
}

.settings-group {
    margin-bottom: 20px;
}

.settings-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.settings-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.05);
    color: var(--text-primary);
    font-size: 14px;
    font-family: monospace;
    transition: all var(--transition-fast);
}

.settings-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.08);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.settings-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

.settings-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 13px;
}

.settings-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.settings-actions .btn-primary {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 14px;
}

.settings-actions .btn-outline {
    padding: 12px 20px;
    font-size: 13px;
}



/* === WS 状态指示器 === */
.ws-status-btn {
    position: relative;
}

.ws-status-btn svg {
    transition: all var(--transition-fast);
}

/* 在线状态 - 绿色 */
.ws-status-btn.online svg {
    color: #22c55e;
    filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.6));
}

.ws-status-btn.online:hover svg {
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.8));
}

/* 连接中状态 - 黄色 */
.ws-status-btn.connecting svg {
    color: #eab308;
    filter: drop-shadow(0 0 4px rgba(234, 179, 8, 0.6));
    animation: wsPulse 1.5s ease-in-out infinite;
}

@keyframes wsPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 离线状态 - 灰色 */
.ws-status-btn.offline svg {
    color: #64748b;
    opacity: 0.6;
}

/* 状态小圆点 */
.ws-status-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--glass-bg);
}

.ws-status-btn.online .ws-status-dot {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: blinkGreen 2s ease-in-out infinite;
}

.ws-status-btn.connecting .ws-status-dot {
    background: #eab308;
    box-shadow: 0 0 6px #eab308;
    animation: wsPulse 1s ease-in-out infinite;
}

.ws-status-btn.offline .ws-status-dot {
    background: #64748b;
}


/* === 中继切换弹窗 === */
.station-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999; /* 调高 z-index，确保全屏时也能显示在最上层 */
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}

.station-modal.open {
    display: flex;
}

.station-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.station-modal-content {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 700px;
    max-width: 95vw;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.2s ease;
    z-index: 2;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.station-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.station-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.station-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.station-search-bar {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
}

.station-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.station-search-input:focus {
    border-color: var(--accent-color, #3b82f6);
    background: rgba(255, 255, 255, 0.08);
}

.station-search-input::placeholder {
    color: var(--text-secondary);
}

.station-modal-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

/* 两排网格布局 */
.station-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.station-item {
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.station-item:hover {
    border-color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.15);
}

.station-item.active {
    border-color: var(--accent-green);
    background: rgba(34, 197, 94, 0.08);
}

.station-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.station-name {
    font-size: 14px;
    font-weight: normal;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-uid {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: right;
}

.station-status {
    flex-shrink: 0;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-green {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.station-loading,
.station-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 当前节点可点击样式 */
.node-selector {
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.node-selector:hover {
    background: rgba(255, 255, 255, 0.08);
}

.node-selector::after {
    content: '▼';
    font-size: 10px;
    opacity: 0.6;
}







/* === 呼号详情弹窗 === */
.call-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.call-detail-modal.open {
    display: flex;
}

.call-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.call-detail-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    animation: callDetailFadeIn 0.3s ease;
}

@keyframes callDetailFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.call-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.call-detail-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.call-detail-callsign {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}

.call-detail-count-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(34, 211, 238, 0.15);
    padding: 4px 10px;
    border-radius: 12px;
}

.call-detail-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.call-detail-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    transform: rotate(90deg);
}

.call-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.call-detail-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.call-detail-card {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.call-detail-card:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.15);
}

.call-detail-row {
    display: flex;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.call-detail-row:last-child {
    margin-bottom: 0;
}

.call-detail-label {
    color: var(--text-muted);
    flex-shrink: 0;
    width: 50px;
}

.call-detail-value {
    color: var(--text-primary);
    flex: 1;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}

.call-detail-link {
    color: var(--accent-cyan);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.call-detail-link:hover {
    text-decoration: underline;
    color: #22d3ee;
}

.call-detail-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .call-detail-list {
        grid-template-columns: 1fr;
    }
    
    .call-detail-content {
        width: 95%;
        max-height: 75vh;
    }
}

/* 本地电台 + 活跃服务器 + 收藏服务器 三列排列 */
.station-info-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 20px;
}

.station-info-row .local-station-card {
    flex: 0 0 36%;
    margin-bottom: 0;
}

.station-info-row .server-card,
.station-info-row .pinned-card {
    flex: 1;
    margin-bottom: 0;
    min-width: 0;
}

/* === 本地电台信息卡片 === */
.local-station-card {
    margin-bottom: 20px;
    padding: 12px 16px;
    height: 220px;
    box-sizing: border-box;
}

.local-station-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.local-station-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.local-station-title .title-icon {
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.local-detail-btn {
    padding: 5px 16px;
    font-size: 12px;
    background: rgba(0, 200, 255, 0.1);
    border: 1px solid rgba(0, 200, 255, 0.3);
    color: var(--accent-cyan);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}

.local-detail-btn:hover {
    background: rgba(0, 200, 255, 0.2);
    border-color: rgba(0, 200, 255, 0.5);
}

.local-station-body {
    display: flex;
    gap: 12px;
}

.local-station-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.local-station-col-left {
    flex: 1.15;
}

.local-info-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    min-width: 0;
}

.local-info-icon {
    margin-right: 6px;
    font-size: 14px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan, #00d4ff);
    width: 16px;
    height: 16px;
}

.local-info-icon svg {
    display: block;
}

.local-info-label {
    color: var(--text-secondary);
    margin-right: 6px;
    min-width: 40px;
    flex-shrink: 0;
}

.local-info-value {
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.local-info-value.local-callsign {
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 14px;
}

.local-info-value.local-qth {
    color: #ffa726;
}

.local-info-divider {
    color: var(--text-secondary);
    margin: 0 8px;
}

.local-mode-item {
    margin-top: 4px;
}

.mode-badge {
    display: inline-block;
    padding: 3px 12px;
    font-size: 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 8px;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.mode-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.mode-badge:active {
    transform: translateY(0);
    transform: scale(0.95);
}

.mode-badge.mode-active {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.2);
}

.mode-badge.mode-active:hover {
    background: rgba(76, 175, 80, 0.25);
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.3);
}

/* 响应式 */
@media (max-width: 768px) {
    .station-info-row {
        flex-direction: column;
    }
    
    .station-info-row .local-station-card,
    .station-info-row .server-card {
        flex: none;
        width: 100%;
    }
    
    .local-station-body {
        flex-direction: column;
        gap: 12px;
    }
    
    .local-station-col {
        gap: 8px;
    }
}





.server-list-wrap {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 8px;
}

.server-list-wrap .empty-tip {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

/* 中继电台列表项（紧凑版） */
.station-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    border-radius: 6px;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 12px;
    min-height: 32px;
    gap: 6px;
}

.station-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(79, 140, 255, 0.3);
    transform: translateX(2px);
}

.station-item.active {
    background: rgba(79, 140, 255, 0.1);
    border-color: rgba(79, 140, 255, 0.4);
}

.station-info {
    flex: 1;
    min-width: 0;
}

.station-name {
    font-size: 14px;
    font-weight: normal;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pin-tag {
    font-size: 10px;
    color: #ffa726;
    font-weight: normal;
}

.station-uid {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: monospace;
}

.station-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.badge-green {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 4px;
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}

.btn-switch {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 4px;
    background: rgba(79, 140, 255, 0.1);
    color: #4f8cff;
    border: 1px solid rgba(79, 140, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}

.btn-switch:hover:not(:disabled) {
    background: rgba(79, 140, 255, 0.2);
    border-color: rgba(79, 140, 255, 0.5);
}

.btn-switch:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}



/* 活跃/收藏电台布局 */
.server-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.server-col {
    display: flex;
    flex-direction: column;
}
/* 收藏服务器卡片（在 station-info-row 里，和活跃服务器一样） */
.pinned-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 220px;
    box-sizing: border-box;
}

.pinned-card .server-list-wrap {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 8px;
}

.pinned-card .empty-tip {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px 0;
    color: var(--text-secondary);
    font-size: 13px;
}
/* 服务器卡片的标题样式 */
.server-card .section-title,
.pinned-card .section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}

.server-card .section-title .title-icon,
.pinned-card .section-title .title-icon {
    font-size: 16px;
}

.server-card .section-title .title-count,
.pinned-card .section-title .title-count {
    margin-left: auto;
    font-size: 12px;
    font-weight: normal;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
}

.col-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}

.col-title .title-icon {
    font-size: 16px;
}

.col-title .title-count {
    margin-left: auto;
    font-size: 12px;
    font-weight: normal;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
}











/* === 日志表格优化 === */
.log-table thead {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

.log-table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.95)) !important;
    backdrop-filter: blur(8px);
}

.log-table td {
    padding: 5px 12px !important;
    line-height: 1.4 !important;
}

.log-table .call-col {
    min-width: 120px;
}

.log-table .call-grid {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
    font-family: "Consolas", monospace;
}

.log-table .time-col {
    min-width: 90px;
    font-size: 12px;
    line-height: 1.4;
}

.log-table .time-date {
    color: #888;
    font-size: 11px;
}

.log-table .time-time {
    color: #aaa;
    font-family: "Consolas", monospace;
}

.log-table .msg-col {
    color: #999;
    font-size: 12px;
}

.log-table .mode-col {
    color: #888;
    font-size: 12px;
    text-align: center;
    min-width: 50px;
}

.log-table .station-col {
    min-width: 120px;
}

/* === WS 地址管理 === */
.settings-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.btn-add-addr {
    font-size: 12px;
    padding: 5px 12px;
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.btn-add-addr:hover {
    background: rgba(34, 211, 238, 0.25);
    border-color: #22d3ee;
}

.btn-test-conn {
    font-size: 12px;
    padding: 5px 12px;
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.btn-test-conn:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: #3b82f6;
}

.btn-test-conn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ws-address-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.ws-address-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ws-address-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(34, 211, 238, 0.3);
}

.ws-address-item.active {
    background: rgba(34, 211, 238, 0.1);
    border-color: #22d3ee;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
}

.ws-address-info {
    flex: 1;
    min-width: 0;
}

.ws-address-name {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 2px;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.ws-address-url {
    font-size: 12px;
    color: #94a3b8;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.ws-address-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ws-address-current {
    font-size: 11px;
    padding: 2px 8px;
    background: #22d3ee;
    color: #0f172a;
    border-radius: 10px;
    font-weight: 600;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.ws-address-delete {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s;
}

.ws-address-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.add-address-form {
    margin-top: 12px;
    padding: 12px;
    background: rgba(34, 211, 238, 0.05);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 8px;
}

.add-form-row {
    margin-bottom: 8px;
}

.add-form-row-inline {
    display: flex;
    gap: 6px;
}

.add-form-row-inline .settings-select {
    width: 80px;
    flex-shrink: 0;
}

.add-form-row-inline .settings-input-port {
    width: 80px;
    flex-shrink: 0;
}

.settings-select {
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.settings-select:focus {
    border-color: #22d3ee;
}

.add-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.add-form-actions .btn-primary,
.add-form-actions .btn-outline {
    font-size: 12px;
    padding: 6px 16px;
}

/* === 地址卡片用户信息（呼号+UID） === */
.ws-address-userinfo {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.ws-address-userinfo .user-callsign {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.ws-address-userinfo .user-callsign::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

/* ===================== 工具下载弹窗 ===================== */
.download-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(59, 130, 246, 0.08));
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 12px;
    margin-bottom: 16px;
}

.download-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(34, 211, 238, 0.3);
}

.download-hero-icon svg {
    width: 28px;
    height: 28px;
}

.download-hero-info h4 {
    margin: 0 0 6px 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.download-hero-info p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.download-hero-info strong {
    color: var(--accent-cyan);
    font-weight: 600;
}

.download-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    min-width: 0;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.download-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.download-btn span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.download-btn strong {
    font-size: 14px;
    font-weight: 700;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
    white-space: nowrap;
}

.download-btn small {
    font-size: 11px;
    opacity: 0.8;
    font-weight: 400;
    white-space: nowrap;
}

.download-btn.primary {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: #fff;
    border-color: rgba(34, 211, 238, 0.3);
}

.download-btn.primary:hover {
    background: linear-gradient(135deg, #0e7490, #155e75);
}

.download-btn.secondary {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.download-btn.secondary:hover {
    background: rgba(59, 130, 246, 0.2);
}

.download-section {
    margin-bottom: 20px;
}

.download-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.download-section-title svg {
    width: 18px;
    height: 18px;
    color: var(--accent-cyan);
}

.install-steps {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: start;
}

.step-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.step-label {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
    width: fit-content;
}

.step-col:first-child .step-label {
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
}

.step-col:last-child .step-label {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.step-divider {
    width: 1px;
    background: var(--border-color);
    align-self: stretch;
    margin: 8px 0;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.step-num {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.step-item code {
    background: var(--bg-card);
    padding: 1px 5px;
    border-radius: 3px;
    color: var(--accent-cyan);
    font-size: 11.5px;
    font-family: 'Courier New', monospace;
}

.download-tip {
    margin: 12px 0 0 0;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.download-tip code {
    background: var(--bg-card);
    padding: 1px 5px;
    border-radius: 3px;
    color: var(--accent-cyan);
    font-family: 'Courier New', monospace;
}

.usage-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.usage-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: 8px;
}

.usage-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.usage-item code {
    background: rgba(34, 211, 238, 0.1);
    padding: 1px 5px;
    border-radius: 3px;
    color: var(--accent-cyan);
    font-size: 12px;
    font-family: 'Courier New', monospace;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    padding: 10px 14px;
    background: var(--bg-card);
    border-radius: 8px;
    border-left: 3px solid var(--accent-cyan);
}

.faq-item strong {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 600;
}

/* === FMO 控制面板弹窗 === */
.fmo-admin-box {
    max-width: 420px;
    width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.fmo-admin-box .modal-hd {
    padding: 16px 20px;
    flex-shrink: 0;
}

.fmo-admin-bd {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.fmo-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    flex: 1;
}

.fmo-panel-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.fmo-panel-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.fmo-panel-btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.fmo-panel-btn-icon svg {
    width: 22px;
    height: 22px;
}

.fmo-panel-btn-text {
    font-size: 13px;
    font-weight: 500;
}

.fmo-panel-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.fmo-admin-newtab-btn {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fmo-admin-newtab-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 手机端控制面板 */
@media (max-width: 640px) {
    .fmo-admin-box {
        width: 92vw;
    }

    .fmo-panel-grid {
        gap: 10px;
    }

    .fmo-panel-btn {
        padding: 16px 8px;
        gap: 8px;
    }

    .fmo-panel-btn-icon {
        width: 32px;
        height: 32px;
    }

    .fmo-panel-btn-text {
        font-size: 13px;
    }
}

.faq-item span {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 响应式 */
@media (max-width: 560px) {
    .download-buttons {
        grid-template-columns: 1fr;
    }
    .download-two-col {
        grid-template-columns: 1fr !important;
    }
    .install-steps {
        grid-template-columns: 1fr;
    }
    .step-divider {
        width: 100%;
        height: 1px;
        margin: 4px 0;
    }
    .download-hero {
        flex-direction: column;
        text-align: center;
    }
}

/* === 悬浮守听弹窗 === */
.float-monitor-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    height: 48px;
    padding: 0 18px;
    border-radius: 24px;
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(8, 145, 178, 0.4);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Microsoft YaHei', sans-serif;
    animation: floatTogglePulse 2s infinite;
}
.float-monitor-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(8, 145, 178, 0.6);
}
.float-monitor-toggle.active {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    animation: none;
}
@keyframes floatTogglePulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(8, 145, 178, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(8, 145, 178, 0.7); }
}

.float-monitor {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 360px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    overflow: hidden;
}
.float-monitor.show {
    display: block;
    animation: floatMonitorIn 0.3s ease;
}
@keyframes floatMonitorIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.float-monitor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.2), rgba(14, 116, 144, 0.1));
    border-bottom: 1px solid rgba(34, 211, 238, 0.2);
    cursor: move;
    user-select: none;
}
.float-monitor-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #22d3ee;
    font-family: 'Microsoft YaHei', sans-serif;
}

/* 连接状态指示点 */
.float-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.float-status-dot.status-connected {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: statusPulse 2s infinite;
}
.float-status-dot.status-connecting {
    background: #eab308;
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.6);
    animation: statusPulse 1s infinite;
}
.float-status-dot.status-disconnected {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}
@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.float-monitor-actions {
    display: flex;
    gap: 4px;
}
.float-monitor-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.float-monitor-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}
.float-monitor-btn.muted {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.float-monitor-body {
    padding: 16px;
}

.float-callsign {
    font-size: 80px;
    font-weight: 800;
    text-align: center;
    color: #22d3ee;
    font-family: 'Consolas', 'Monaco', monospace;
    letter-spacing: 4px;
    margin-bottom: 12px;
    text-shadow: 0 0 30px rgba(34, 211, 238, 0.7);
    line-height: 1.1;
}
.float-callsign.inactive {
    color: #475569;
    text-shadow: none;
}

.float-qth {
    font-size: 12px;
    text-align: center;
    color: #94a3b8;
    margin-bottom: 12px;
    font-family: 'Microsoft YaHei', sans-serif;
}

.float-level-bar {
    display: flex;
    gap: 2px;
    height: 10px;
    margin-bottom: 14px;
    align-items: center;
}
.float-level-led {
    flex: 1;
    height: 100%;
    border-radius: 1px;
    background: rgba(255,255,255,0.08);
    transition: all 0.08s ease;
}
.float-level-led:nth-child(-n+24) { background: rgba(34,197,94,0.12); }
.float-level-led:nth-child(-n+24).on { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.float-level-led:nth-child(n+25):nth-child(-n+32) { background: rgba(249,115,22,0.12); }
.float-level-led:nth-child(n+25):nth-child(-n+32).on { background: #f97316; box-shadow: 0 0 6px #f97316; }
.float-level-led:nth-child(n+33) { background: rgba(239,68,68,0.12); }
.float-level-led:nth-child(n+33).on { background: #ef4444; box-shadow: 0 0 6px #ef4444; }

.float-compass-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.float-compass {
    position: relative;
}
.float-compass-ring {
    width: 50px;
    height: 50px;
    border: 2px solid rgba(34, 211, 238, 0.3);
    border-radius: 50%;
    position: relative;
    background: rgba(34, 211, 238, 0.05);
}
.compass-n, .compass-e, .compass-s, .compass-w {
    position: absolute;
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
}
.compass-n { top: 2px; left: 50%; transform: translateX(-50%); color: #ef4444; }
.compass-e { right: 4px; top: 50%; transform: translateY(-50%); }
.compass-s { bottom: 2px; left: 50%; transform: translateX(-50%); }
.compass-w { left: 4px; top: 50%; transform: translateY(-50%); }

.float-compass-pointer {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-bottom: 13px solid #ef4444;
    transform-origin: 50% 13px;
    z-index: 2;
    filter: drop-shadow(0 0 2px rgba(239, 68, 68, 0.5));
}

.float-bearing-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.float-bearing, .float-distance {
    font-size: 12px;
    color: #cbd5e1;
    font-family: 'Consolas', monospace;
    font-weight: 600;
}

/* 手机端悬浮弹窗适配 */
@media (max-width: 640px) {
    .float-monitor {
        width: calc(100vw - 32px);
        right: 16px;
        left: 16px;
        bottom: 76px;
    }
    .float-callsign {
        font-size: 48px;
    }
    .float-compass-ring {
        width: 75px;
        height: 75px;
    }
    .float-compass-pointer {
        top: 5px;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-bottom: 27px solid #ef4444;
        transform-origin: 50% 32.5px;
    }
    .float-monitor-toggle {
        height: 42px;
        padding: 0 14px;
        right: 16px;
        bottom: 16px;
        font-size: 13px;
    }
}

/* 设置弹窗里的扩展下载提示 */
.extension-download-tip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(59, 130, 246, 0.08));
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 8px;
}

.extension-download-tip span {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.extension-download-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.extension-download-link:hover {
    background: linear-gradient(135deg, #0e7490, #155e75);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.extension-download-link svg {
    width: 14px;
    height: 14px;
}

.ws-address-userinfo .user-uid {
    padding: 2px 8px;
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

.log-table .station-col .station-name {
    color: #4a9eff;
    cursor: pointer;
    font-size: 12px;
}

.log-table .station-col .pin-icon {
    color: #ffb800;
    margin-right: 4px;
}

/* 今日通联 ★ 标记 */
.today-star {
    color: #ffb800;
    font-size: 12px;
    margin-left: 4px;
    vertical-align: middle;
}

/* === 通联详情弹窗（官方风格） === */
.call-detail-modal .call-detail-content {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    min-width: 600px;
    max-width: 800px;
    max-height: 80vh;
    backdrop-filter: blur(10px);
}

.call-detail-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.call-detail-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.call-detail-callsign {
    font-size: 22px;
    font-weight: 700;
    color: #38bdf8;
    font-family: "Microsoft YaHei", sans-serif;
}

.call-detail-today-star {
    color: #ffb800;
    font-size: 18px;
}

.call-detail-count {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.call-detail-body {
    padding: 20px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

/* 两列网格布局 */
.call-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* 通联记录卡片 */
.qso-detail-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 14px 16px;
    font-family: "Microsoft YaHei", sans-serif;
}

/* 最新一条通联记录（绿色边框） */
.qso-detail-card-latest {
    border: 1px solid rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.08);
}

.qso-detail-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.qso-detail-row:last-child {
    margin-bottom: 0;
}

/* ========================================
   聊天室
   ======================================== */

/* 聊天室打开按钮（左下角） */
.chat-toggle-btn {
    position: fixed;
    left: 20px;
    bottom: 20px;
    height: 48px;
    padding: 0 18px;
    border-radius: 24px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
    z-index: 9997;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Microsoft YaHei', sans-serif;
    animation: chatTogglePulse 2s infinite;
}
.chat-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
}
.chat-toggle-btn.active {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    animation: none;
}
@keyframes chatTogglePulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(124, 58, 237, 0.7); }
}

/* 未读消息红点 */
.chat-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: badgePulse 1.5s infinite;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 聊天室窗口 */
.chat-window {
    position: fixed;
    left: 20px;
    bottom: 80px;
    width: 480px;
    height: 640px;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

/* 聊天内容区（左右布局） */
.chat-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* 守听区 */
.chat-monitor-section {
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    flex-shrink: 0;
}
.chat-monitor-section.collapsed .chat-monitor-body {
    display: none;
}
.chat-monitor-section.collapsed #chatMonitorCollapse svg {
    transform: rotate(180deg);
}
.chat-monitor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: move;
    background: rgba(124, 58, 237, 0.08);
}
.chat-monitor-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
}
.chat-monitor-actions {
    display: flex;
    gap: 4px;
}
.chat-monitor-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.chat-monitor-btn:hover {
    background: rgba(124, 58, 237, 0.2);
    color: #c4b5fd;
}
.chat-monitor-body {
    display: flex;
    padding: 10px 12px;
    gap: 12px;
    align-items: center;
}
.chat-monitor-info {
    flex: 1;
    min-width: 0;
    padding-right: 12px;
    border-right: 1px solid rgba(124, 58, 237, 0.2);
}
.chat-monitor-compass {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    min-width: 90px;
}
/* 守听区里的罗盘缩小一点 */
.chat-monitor-compass .float-compass {
    width: 56px;
    height: 56px;
}
.chat-monitor-compass .float-compass-ring {
    width: 56px;
    height: 56px;
}
.chat-monitor-compass .float-bearing-info {
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    line-height: 1.4;
}
.chat-monitor-compass .float-bearing,
.chat-monitor-compass .float-distance {
    margin: 0;
    white-space: nowrap;
}
/* 守听区罗盘指针缩小 */
.chat-monitor-compass .float-compass-pointer {
    top: 14px;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-bottom: 14px solid #ef4444;
    transform-origin: 50% 14px;
}

.chat-window.show {
    display: flex;
    animation: chatWindowIn 0.3s ease;
}
@keyframes chatWindowIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 左侧边栏：在线用户 */
.chat-sidebar {
    width: 150px;
    background: rgba(0, 0, 0, 0.25);
    border-right: 1px solid rgba(124, 58, 237, 0.2);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.chat-sidebar-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #34d399;
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    font-family: 'Microsoft YaHei', sans-serif;
    flex-shrink: 0;
}
.chat-sidebar-title span {
    color: #6ee7b7;
}
.chat-online-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chat-online-list::-webkit-scrollbar {
    width: 3px;
}
.chat-online-list::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 2px;
}
.online-user-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 11px;
    transition: background 0.15s;
}
.online-user-item:hover {
    background: rgba(124, 58, 237, 0.15);
    cursor: pointer;
}

/* @提及高亮 */
.chat-mention {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
    cursor: pointer;
}
.chat-mention:hover {
    background: rgba(96, 165, 250, 0.2);
    color: #93c5fd;
}
.online-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.6);
    flex-shrink: 0;
}
.online-callsign {
    color: #cbd5e1;
    font-family: 'Consolas', monospace;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.online-me-tag {
    color: #fbbf24;
    font-size: 9px;
    font-weight: 700;
    flex-shrink: 0;
}
.online-sign-tag {
    color: #34d399;
    font-size: 9px;
    font-weight: 700;
    flex-shrink: 0;
}
.online-level-tag {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 3px;
    flex-shrink: 0;
    line-height: 1.2;
}

/* 消息里的等级标签 */
.chat-msg-level {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
}

/* 图片消息 */
.chat-image-msg {
    margin-top: 4px;
}
.chat-image-msg img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
}
.chat-image-msg img:hover {
    transform: scale(1.02);
}

/* 图片预览 */
.chat-image-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
    cursor: pointer;
}
.chat-image-preview img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
}
.chat-image-preview-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
}

/* 窗口缩放手柄 */
.chat-resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
    z-index: 10;
    background: linear-gradient(135deg, transparent 50%, rgba(124, 58, 237, 0.5) 50%);
    border-bottom-right-radius: 12px;
}
.chat-resize-handle:hover {
    background: linear-gradient(135deg, transparent 50%, rgba(124, 58, 237, 0.8) 50%);
}

/* 每日话题 */
.chat-daily-topic {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(34, 197, 94, 0.08);
    border-bottom: 1px solid rgba(34, 197, 94, 0.15);
    font-size: 11px;
    flex-shrink: 0;
    cursor: pointer;
}
.chat-daily-topic:hover {
    background: rgba(34, 197, 94, 0.12);
}
.topic-tag {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
}
.topic-text {
    color: #86efac;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 呼号名片弹窗 */
.chat-card-modal, .chat-qsl-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
}
.chat-card-box {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px;
    width: 320px;
    max-width: 90vw;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.chat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(124,58,237,0.2), transparent);
    border-bottom: 1px solid rgba(124,58,237,0.2);
    border-radius: 12px 12px 0 0;
}
.chat-card-callsign {
    font-size: 20px;
    font-weight: 700;
    color: #c4b5fd;
}
.chat-card-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}
.chat-card-body {
    padding: 14px 16px;
}
.card-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 12px;
}
.card-label {
    color: #64748b;
}
.card-value {
    color: #e2e8f0;
    text-align: right;
    max-width: 60%;
}
.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}
.card-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
}
.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.card-action-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    background: rgba(124,58,237,0.2);
    color: #c4b5fd;
    border: 1px solid rgba(124,58,237,0.3);
}
.card-action-btn:hover {
    background: rgba(124,58,237,0.3);
}

/* QSL弹窗 */
.chat-qsl-box {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    width: 320px;
    max-width: 90vw;
    padding: 16px;
}
.chat-qsl-title {
    font-size: 16px;
    font-weight: 600;
    color: #fbbf24;
    margin-bottom: 12px;
    text-align: center;
}
.qsl-field {
    margin-bottom: 10px;
}
.qsl-field label {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 4px;
}
.qsl-field input, .qsl-field select, .qsl-field textarea {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 6px 8px;
    color: #e2e8f0;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
}
.qsl-field select option {
    background: #1e293b;
    color: #e2e8f0;
}
.qsl-field input:focus, .qsl-field select:focus, .qsl-field textarea:focus {
    border-color: rgba(245,158,11,0.5);
}
.qsl-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.qsl-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}
.qsl-cancel {
    background: rgba(255,255,255,0.05);
    color: #94a3b8;
}
.qsl-send {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* 频率共享面板 */
.chat-freq-panel {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 260px;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    z-index: 9997;
    overflow: hidden;
}
.freq-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(6,182,212,0.1);
    font-size: 12px;
    font-weight: 600;
    color: #22d3ee;
}
.freq-panel-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}
.freq-panel-input {
    display: flex;
    gap: 4px;
    padding: 8px;
    border-bottom: 1px solid rgba(6,182,212,0.15);
}
.freq-panel-input input {
    flex: 1;
    min-width: 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    padding: 4px 6px;
    color: #e2e8f0;
    font-size: 11px;
    outline: none;
}
.freq-panel-input button {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    flex-shrink: 0;
}
.freq-panel-list {
    max-height: 200px;
    overflow-y: auto;
}
.freq-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 11px;
}
.freq-item:hover {
    background: rgba(6,182,212,0.05);
}
.freq-item-freq {
    color: #22d3ee;
    font-weight: 600;
}
.freq-item-info {
    color: #94a3b8;
    font-size: 10px;
    text-align: right;
}
.freq-item-callsign {
    color: #cbd5e1;
}

/* 右侧主区域 */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* 聊天室标题栏 */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(109, 40, 217, 0.1));
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    cursor: move;
    user-select: none;
    flex-shrink: 0;
}
.chat-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #a78bfa;
    font-family: 'Microsoft YaHei', sans-serif;
}
.chat-header-status {
    font-size: 10px;
    color: #64748b;
    font-weight: 400;
}
.chat-header-actions {
    display: flex;
    gap: 4px;
}

/* 系统公告 */
.chat-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.1), transparent);
    border-bottom: 1px solid rgba(251, 191, 36, 0.15);
    font-size: 11px;
    color: #fbbf24;
    flex-shrink: 0;
    overflow: hidden;
}
.chat-notice svg {
    flex-shrink: 0;
}
.chat-notice-scroll {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}
.chat-notice-text {
    display: inline-block;
    padding-left: 100%;
    animation: noticeScroll 15s linear infinite;
}
@keyframes noticeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 系统消息（进入/离开） */
.chat-msg-system {
    text-align: center;
    padding: 6px 0;
    display: flex;
    justify-content: center;
}
.chat-msg-system .chat-msg-body {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    font-size: 11px;
    padding: 3px 12px;
    border-radius: 10px;
    display: inline-block;
}
.chat-msg-system .chat-msg-body::before {
    content: '📢 ';
}

/* 动作消息 /me */
.chat-msg-action .chat-msg-body {
    color: #a78bfa;
    font-style: italic;
    font-size: 13px;
}
.chat-msg-action .chat-msg-body::before {
    content: '* ';
    color: #7c3aed;
    font-weight: bold;
}
.chat-header-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.chat-header-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

/* 消息列表 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-messages::-webkit-scrollbar {
    width: 4px;
}
.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 2px;
}

/* 消息气泡 */
.chat-msg {
    max-width: 85%;
    align-self: flex-start;
}
.chat-msg-me {
    align-self: flex-end;
}
.chat-msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}
.chat-msg-callsign {
    font-size: 11px;
    font-weight: 700;
    color: #a78bfa;
    font-family: 'Consolas', monospace;
}
.chat-msg-me .chat-msg-callsign {
    color: #34d399;
}
.chat-msg-time {
    font-size: 10px;
    color: #64748b;
}
.chat-msg-body {
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    color: #e2e8f0;
    line-height: 1.4;
    word-break: break-word;
    font-family: 'Microsoft YaHei', sans-serif;
}
.chat-msg-me .chat-msg-body {
    background: rgba(52, 211, 153, 0.15);
    border-color: rgba(52, 211, 153, 0.2);
}

/* 输入区域 */
.chat-input-area {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-top: 1px solid rgba(124, 58, 237, 0.2);
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    position: relative;
}
.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 10px;
    color: #e2e8f0;
    font-size: 13px;
    font-family: 'Microsoft YaHei', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    resize: none;
    max-height: 100px;
    line-height: 1.4;
    overflow-y: auto;
}
.chat-input:focus {
    border-color: rgba(124, 58, 237, 0.5);
}

/* 输入状态提示 */
.chat-typing-indicator {
    position: absolute;
    bottom: 100%;
    left: 12px;
    margin-bottom: 4px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #94a3b8;
    z-index: 5;
}
.typing-dots {
    display: flex;
    gap: 2px;
}
.typing-dots span {
    width: 4px;
    height: 4px;
    background: #a78bfa;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* 右键菜单 */
.chat-context-menu {
    position: fixed;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 8px;
    padding: 4px 0;
    min-width: 120px;
    z-index: 100000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.chat-context-item {
    padding: 8px 14px;
    font-size: 12px;
    color: #cbd5e1;
    cursor: pointer;
    transition: background 0.15s;
}
.chat-context-item:hover {
    background: rgba(124, 58, 237, 0.2);
    color: #c4b5fd;
}
.chat-context-item.disabled {
    color: #475569;
    cursor: not-allowed;
}
.chat-context-item.disabled:hover {
    background: transparent;
    color: #475569;
}

/* 弹幕模式 */
.chat-danmaku-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99990;
    overflow: hidden;
}
.chat-danmaku-item {
    position: absolute;
    white-space: nowrap;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8), 0 0 8px rgba(124,58,237,0.5);
    animation: danmakuMove linear forwards;
    will-change: transform;
}
@keyframes danmakuMove {
    from { transform: translateX(100vw); }
    to { transform: translateX(-100%); }
}

/* 关键词特效 */
.chat-effect-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99991;
    overflow: hidden;
}
.chat-effect-firework {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: fireworkBurst 1s ease-out forwards;
}
@keyframes fireworkBurst {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(20); opacity: 0; }
}
.chat-effect-ripple {
    position: absolute;
    border: 3px solid;
    border-radius: 50%;
    animation: rippleExpand 1s ease-out forwards;
}
@keyframes rippleExpand {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 200px; height: 200px; opacity: 0; margin-left: -100px; margin-top: -100px; }
}
.chat-effect-text {
    position: absolute;
    font-size: 32px;
    font-weight: 900;
    animation: effectFloat 1.5s ease-out forwards;
    text-shadow: 0 0 20px currentColor;
}
@keyframes effectFloat {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    20% { transform: translateY(-20px) scale(1.2); opacity: 1; }
    100% { transform: translateY(-80px) scale(1); opacity: 0; }
}

/* 弹幕开关按钮激活状态 */
.chat-header-btn.danmaku-active {
    background: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.5);
}
.chat-input::placeholder {
    color: #64748b;
}
.chat-emoji-btn, .chat-send-btn {
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: #a78bfa;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.chat-emoji-btn:hover, .chat-send-btn:hover {
    background: rgba(124, 58, 237, 0.3);
    color: #c4b5fd;
}
.chat-send-btn {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border-color: transparent;
    color: white;
}
.chat-send-btn:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* 语音按钮 */
.chat-voice-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.chat-voice-toggle:hover {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}
/* 按住说话按钮（微信风格） */
.chat-ptt-btn {
    flex: 1;
    height: 34px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transition: all 0.15s;
}
.chat-ptt-btn:active, .chat-ptt-btn.recording {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
}

/* 图片按钮 */
.chat-image-btn {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #22d3ee;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.chat-image-btn:hover {
    background: rgba(6, 182, 212, 0.25);
    color: #67e8f9;
    border-color: rgba(6, 182, 212, 0.5);
    transform: translateY(-1px);
}

/* 音乐播放条 */
.chat-music-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(124, 58, 237, 0.1);
    border-bottom: 1px solid rgba(124, 58, 237, 0.15);
}
.music-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a78bfa;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.music-btn:hover {
    background: rgba(124, 58, 237, 0.2);
    color: #c4b5fd;
}
.music-play-btn {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border-color: transparent;
    color: white;
}
.music-play-btn:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}
.music-info {
    flex: 1;
    min-width: 0;
}
.music-title {
    font-size: 11px;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.music-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
}
.music-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #a78bfa, #7c3aed);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}
.chat-header-btn.music-active {
    background: rgba(124, 58, 237, 0.3);
    color: #c4b5fd;
    border-color: rgba(124, 58, 237, 0.5);
}
.music-time {
    font-size: 10px;
    color: #94a3b8;
    flex-shrink: 0;
    min-width: 35px;
    text-align: right;
}
.music-volume {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    color: #94a3b8;
}
.music-volume-slider {
    width: 50px;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.music-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: #a78bfa;
    border-radius: 50%;
    cursor: pointer;
}
.music-volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: #a78bfa;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* 播放列表 */
.chat-music-playlist {
    background: rgba(15, 23, 42, 0.98);
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    max-height: 180px;
    overflow-y: auto;
}
.music-playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    font-size: 11px;
    color: #a78bfa;
    font-weight: 600;
    border-bottom: 1px solid rgba(124, 58, 237, 0.15);
}
.music-playlist-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.music-playlist-close:hover {
    color: #f87171;
}
.music-playlist-items {
    padding: 4px 0;
}
.music-playlist-item {
    padding: 6px 12px;
    font-size: 11px;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
}
.music-playlist-item:hover {
    background: rgba(124, 58, 237, 0.1);
}
.music-playlist-item.active {
    color: #a78bfa;
    background: rgba(124, 58, 237, 0.15);
}
.music-playlist-item .playlist-index {
    color: #64748b;
    min-width: 16px;
}
.music-playlist-item .playlist-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.music-playlist-item .playlist-del {
    color: #64748b;
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}
.music-playlist-item:hover .playlist-del {
    opacity: 1;
}
.music-playlist-item .playlist-del:hover {
    color: #f87171;
}
.music-add-bar {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}
.music-add-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 4px 8px;
    color: #e2e8f0;
    font-size: 11px;
    outline: none;
}
.music-add-input:focus {
    border-color: rgba(124, 58, 237, 0.5);
}
.music-add-btn {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border: none;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    flex-shrink: 0;
}
.music-add-btn:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* 录音状态条 */
.chat-recording {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #f87171;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.recording-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: recordingBlink 1s infinite;
}
@keyframes recordingBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.recording-time {
    font-family: 'Consolas', monospace;
    font-weight: 600;
}
.recording-tip {
    color: #94a3b8;
    font-size: 11px;
}

/* 语音消息 */
.chat-voice-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    cursor: pointer;
    padding: 4px 0;
}
.chat-voice-play {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.chat-voice-play:hover {
    background: rgba(124, 58, 237, 0.4);
    transform: scale(1.1);
}
.chat-voice-play.playing {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
}
.chat-voice-duration {
    font-size: 12px;
    color: #94a3b8;
    font-family: 'Consolas', monospace;
}
.chat-voice-wave {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 20px;
}
.chat-voice-wave span {
    width: 3px;
    background: rgba(124, 58, 237, 0.5);
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}
.chat-voice-wave span:nth-child(1) { height: 8px; animation-delay: 0s; }
.chat-voice-wave span:nth-child(2) { height: 14px; animation-delay: 0.1s; }
.chat-voice-wave span:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.chat-voice-wave span:nth-child(4) { height: 16px; animation-delay: 0.3s; }
@keyframes wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

/* 表情面板 */
.chat-emoji-panel {
    position: fixed !important;
    background: rgba(15, 23, 42, 0.98) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px;
    padding: 8px !important;
    display: none;
    grid-template-columns: repeat(7, 32px) !important;
    gap: 4px !important;
    width: auto !important;
    max-width: none !important;
    z-index: 999999 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.chat-emoji-panel.show {
    display: grid;
    animation: emojiPanelIn 0.2s ease;
}
@keyframes emojiPanelIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.emoji-item {
    font-size: 22px;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
    line-height: 1;
}
.emoji-item:hover {
    background: rgba(124, 58, 237, 0.2);
    transform: scale(1.2);
}
.emoji-item:hover {
    background: rgba(124, 58, 237, 0.2);
}

/* 登录弹窗 */
.chat-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.chat-login-modal.show {
    display: flex;
}
.chat-login-box {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px;
    padding: 24px;
    width: 300px;
    text-align: center;
}
.chat-login-title {
    font-size: 16px;
    font-weight: 600;
    color: #a78bfa;
    margin-bottom: 16px;
    font-family: 'Microsoft YaHei', sans-serif;
}
.chat-login-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    color: #e2e8f0;
    font-size: 14px;
    font-family: 'Consolas', monospace;
    text-align: center;
    text-transform: uppercase;
    outline: none;
    margin-bottom: 12px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.chat-login-input:focus {
    border-color: rgba(124, 58, 237, 0.5);
}
.chat-login-btn {
    width: 100%;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border: none;
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Microsoft YaHei', sans-serif;
    transition: all 0.2s;
}
.chat-login-btn:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* 手机端适配 */
@media (max-width: 640px) {
    .chat-toggle-btn {
        height: 42px;
        padding: 0 14px;
        left: 16px;
        bottom: 16px;
        font-size: 13px;
    }
    .chat-window {
        width: 100vw !important;
        height: 100vh !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: 0 !important;
        border-radius: 0 !important;
        z-index: 10000 !important;
    }
    /* 手机端守听区默认折叠 */
    .chat-monitor-section {
        border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    }
    .chat-monitor-body {
        padding: 8px 10px;
    }
    .chat-monitor-compass .float-compass {
        width: 50px;
        height: 50px;
    }
    .chat-monitor-compass .float-compass-ring {
        width: 50px;
        height: 50px;
    }
    /* 手机端在线列表变窄 */
    .chat-sidebar {
        width: 110px;
        flex-shrink: 0;
    }
    .chat-sidebar-title {
        font-size: 11px;
        padding: 8px 6px;
    }
    .chat-online-list {
        padding: 6px 4px;
    }
    .online-user-item {
        padding: 5px 6px;
        font-size: 11px;
        gap: 4px;
    }
    .online-user-callsign {
        font-size: 11px;
    }
    /* 手机端输入区优化 */
    .chat-input-area {
        padding: 6px 8px;
        gap: 4px;
    }
    .chat-voice-toggle,
    .chat-emoji-btn,
    .chat-image-btn,
    .chat-send-btn {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }
    .chat-input {
        font-size: 14px;
        padding: 6px 8px;
    }
    .chat-ptt-btn {
        height: 32px;
        font-size: 13px;
    }
    /* 手机端header优化 */
    .chat-header {
        padding: 8px 10px;
        gap: 6px;
        flex-wrap: nowrap;
    }
    .chat-header-title {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
    .chat-header-status {
        font-size: 9px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .chat-header-actions {
        flex-shrink: 0;
    }
    /* 手机端电平表 */
    .chat-monitor-info {
        flex: 1;
        min-width: 0;
        padding-right: 8px;
    }
    .float-level-bar {
        height: 12px;
        gap: 2px;
        width: 100%;
        min-width: 80px;
    }
    .float-level-led {
        min-width: 3px;
    }
    /* 手机端消息优化 */
    .chat-msg {
        padding: 6px 8px;
    }
    .chat-msg-callsign {
        font-size: 12px;
    }
    .chat-msg-text {
        font-size: 13px;
    }
    .chat-msg-time {
        font-size: 10px;
    }
    /* 手机端表情面板适配 */
    .chat-emoji-panel {
        grid-template-columns: repeat(7, 32px) !important;
        width: auto !important;
        max-width: none !important;
        left: 8px !important;
        right: 8px !important;
        bottom: 50px !important;
    }
    /* 手机端公告和话题 */
    .chat-notice,
    .chat-daily-topic {
        padding: 6px 8px;
        font-size: 11px;
    }
    /* 手机端音乐播放器 */
    .music-player {
        gap: 4px;
    }
    .music-progress-container {
        min-width: 40px;
    }
    /* 手机端隐藏缩放手柄 */
    .chat-resize-handle {
        display: none;
    }
}

/* 上个通联悬浮窗口 */
.last-qso-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 320px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 9990;
    overflow: hidden;
    transition: opacity 0.3s;
}
.last-qso-panel.hidden {
    display: none;
}
.last-qso-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(124, 58, 237, 0.15);
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    cursor: move;
    user-select: none;
}
.last-qso-title {
    font-size: 12px;
    font-weight: 600;
    color: #a78bfa;
    font-family: 'Microsoft YaHei', sans-serif;
}
.last-qso-time {
    font-size: 11px;
    color: #64748b;
    margin-left: auto;
    margin-right: 8px;
}
.last-qso-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}
.last-qso-close:hover {
    color: #f87171;
}
.last-qso-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    gap: 12px;
}
.last-qso-main {
    flex: 1;
    min-width: 0;
}
.last-qso-callsign {
    font-size: 22px;
    font-weight: 700;
    color: #f1f5f9;
    font-family: 'Consolas', monospace;
    line-height: 1.2;
}
.last-qso-time-detail {
    font-size: 13px;
    color: #94a3b8;
    font-family: 'Consolas', monospace;
    margin-top: 2px;
}
.last-qso-qth {
    font-size: 12px;
    color: #cbd5e1;
    margin-top: 6px;
    line-height: 1.4;
}
.last-qso-distance {
    font-size: 12px;
    color: #fbbf24;
    margin-top: 4px;
    font-weight: 500;
}
.last-qso-compass {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}
.last-qso-compass-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(124, 58, 237, 0.4);
    position: relative;
    background: rgba(0, 0, 0, 0.2);
}
.last-qso-compass-needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 18px;
    background: linear-gradient(to top, #3b82f6, #60a5fa);
    transform-origin: center center;
    transform: translate(-50%, -50%) rotate(0deg);
    border-radius: 2px;
    transition: transform 0.5s ease;
}
.last-qso-compass-n {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #f87171;
    font-weight: 700;
}
.last-qso-compass-s {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #64748b;
    font-weight: 700;
}
.last-qso-compass-w {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    color: #64748b;
    font-weight: 700;
}
.last-qso-compass-e {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    color: #64748b;
    font-weight: 700;
}
.last-qso-bearing {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    font-family: 'Consolas', monospace;
}

/* 手机端上个通联窗口 */
@media (max-width: 640px) {
    .last-qso-panel {
        width: calc(100vw - 32px);
        top: 60px;
        right: 16px;
        left: 16px;
    }
    .last-qso-callsign {
        font-size: 18px;
    }
    .last-qso-compass-ring {
        width: 50px;
        height: 50px;
    }
    .last-qso-compass-needle {
        height: 20px;
    }
    .last-qso-compass-n,
    .last-qso-compass-s,
    .last-qso-compass-w,
    .last-qso-compass-e {
        font-size: 8px;
    }
    .last-qso-compass-w { left: 3px; }
    .last-qso-compass-e { right: 3px; }
}

.qso-detail-label {
    color: #94a3b8;
    min-width: 60px;
    flex-shrink: 0;
}

.qso-detail-value {
    color: #e2e8f0;
    flex: 1;
}

.qso-callsign-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.qso-callsign-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.qso-callsign-link,
.qso-callsign {
    color: #38bdf8;
    font-weight: 600;
    text-decoration: none;
}

.qso-callsign-link:hover {
    text-decoration: underline;
}

.qso-grid {
    color: #94a3b8;
    font-family: "Consolas", monospace;
    font-size: 12px;
}

.qso-address {
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}

.qso-freq {
    color: #a78bfa;
    font-family: "Consolas", monospace;
}

.qso-relay-name {
    color: #38bdf8;
}

.qso-relay-admin {
    color: #94a3b8;
    font-size: 12px;
}

.qso-comment {
    color: #cbd5e1;
    font-style: italic;
}

/* 响应式：小屏幕单列 */
@media (max-width: 700px) {
    .call-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .call-detail-modal .call-detail-content {
        min-width: auto;
        width: 90vw;
    }
}

/* 日志表格 - 您标记 */
.self-badge {
    display: inline-block;
    padding: 1px 6px;
    margin-left: 4px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    vertical-align: middle;
}

/* 日志表格 - 正在发言标记 */
.speaking-badge {
    display: inline-block;
    padding: 1px 6px;
    margin-left: 4px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 4px;
    vertical-align: middle;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}


/* === Toggle 开关 === */
.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.settings-toggle-info {
    flex: 1;
    min-width: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: '';
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-color: #00d4ff;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
}



/* === 电台详情弹窗 === */
.radio-detail-table {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: -4px 0;
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    border-radius: 6px;
    gap: 16px;
    transition: background 0.2s ease;
    line-height: 1.3;
}

.detail-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.detail-row + .detail-row {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-label {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
    flex-shrink: 0;
    min-width: 72px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

.detail-value {
    font-size: 13px;
    color: #e2e8f0;
    font-weight: 600;
    text-align: right;
    word-break: break-all;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
    line-height: 1.3;
}

/* === 友情链接 === */
.friend-links {
    margin-bottom: 24px;
    padding-top: 8px;
}

.friend-links-title {
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    position: relative;
    font-family: 'Microsoft YaHei', sans-serif;
}

.friend-links-title::before,
.friend-links-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.friend-links-title::before {
    left: calc(50% - 100px);
}

.friend-links-title::after {
    right: calc(50% - 100px);
}

.friend-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 800px;
    margin: 0 auto;
}

.friend-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.friend-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    opacity: 0.8;
}

.friend-link-orange::before { background: linear-gradient(180deg, #f97316, #ea580c); }
.friend-link-green::before { background: linear-gradient(180deg, #22c55e, #16a34a); }
.friend-link-purple::before { background: linear-gradient(180deg, #a855f7, #9333ea); }

.friend-link-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.friend-link-orange:hover { border-color: #f97316; box-shadow: 0 8px 24px rgba(249, 115, 22, 0.15); }
.friend-link-green:hover { border-color: #22c55e; box-shadow: 0 8px 24px rgba(34, 197, 94, 0.15); }
.friend-link-purple:hover { border-color: #a855f7; box-shadow: 0 8px 24px rgba(168, 85, 247, 0.15); }

.friend-link-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.friend-link-orange .friend-link-icon { background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(234, 88, 12, 0.1)); color: #f97316; }
.friend-link-green .friend-link-icon { background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.1)); color: #22c55e; }
.friend-link-purple .friend-link-icon { background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(147, 51, 234, 0.1)); color: #a855f7; }

.friend-link-info {
    flex: 1;
    min-width: 0;
}

.friend-link-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Microsoft YaHei', sans-serif;
}

.friend-link-author {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 3px;
    font-family: 'Consolas', monospace;
}

.friend-link-desc {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.8;
    line-height: 1.3;
    font-family: 'Microsoft YaHei', sans-serif;
}

/* === 访客统计 === */
.visitor-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.05), rgba(59, 130, 246, 0.05));
    border: 1px solid var(--border-color);
    border-radius: 10px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.visitor-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.visitor-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(59, 130, 246, 0.1));
    color: #22d3ee;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.visitor-stat-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.visitor-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'Microsoft YaHei', sans-serif;
}

.visitor-stat-number {
    font-size: 18px;
    font-weight: 700;
    font-family: 'Consolas', 'Monaco', monospace;
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.visitor-stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border-color);
}

/* 友情链接和访客统计响应式 */
@media (max-width: 768px) {
    .friend-links-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    .friend-links-title::before,
    .friend-links-title::after {
        width: 40px;
    }
    .friend-links-title::before {
        left: calc(50% - 80px);
    }
    .friend-links-title::after {
        right: calc(50% - 80px);
    }
}

@media (max-width: 480px) {
    .visitor-stats {
        gap: 12px;
        padding: 10px 14px;
        flex-wrap: wrap;
    }
    .visitor-stat-divider {
        display: none;
    }
    .visitor-stat-number {
        font-size: 16px;
    }
    .friend-link-card {
        padding: 12px;
    }
    .friend-link-icon {
        width: 40px;
        height: 40px;
    }
}


.chat-mention-list{position:absolute;bottom:100%;left:50px;right:50px;max-height:200px;overflow-y:auto;background:rgba(15,23,42,.98);border:1px solid rgba(124,58,237,.3);border-radius:8px;margin-bottom:4px;z-index:100;box-shadow:0 -4px 20px rgba(0,0,0,.4)}.chat-mention-item{padding:8px 12px;cursor:pointer;display:flex;align-items:center;gap:8px;font-size:13px;color:#e2e8f0;border-bottom:1px solid rgba(255,255,255,.05)}.chat-mention-item:hover,.chat-mention-item.active{background:rgba(124,58,237,.2)}.chat-mention-item:last-child{border-bottom:none}.chat-mention-item .online-dot{width:8px;height:8px;border-radius:50%;background:#22c55e;flex-shrink:0}
