/* =============================================
   狼人杀在线桌游 - 主样式表
   ============================================= */

:root {
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --danger: #e74c3c;
    --success: #2ecc71;
    --warning: #f39c12;
    --info: #3498db;
    --dark: #2d3436;
    --darker: #1e272e;
    --darkest: #0a0e14;
    --gray: #636e72;
    --gray-light: #b2bec3;
    --light: #dfe6e9;
    --white: #ffffff;
    --night-bg: #0d1117;
    --night-surface: #161b22;
    --day-bg: #f8f9fa;
    --wolf-red: #ff4757;
    --good-blue: #1e90ff;
    --god-gold: #ffd700;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--darkest);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray); border-radius: 3px; }

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--white);
    font-family: inherit;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.btn-danger { background: linear-gradient(135deg, var(--danger), #c0392b); }
.btn-success { background: linear-gradient(135deg, var(--success), #27ae60); }
.btn-warning { background: linear-gradient(135deg, var(--warning), #e67e22); }
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 14px 36px; font-size: 17px; }
.btn-block { width: 100%; }

/* 输入框 */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--gray-light);
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray);
    border-radius: 8px;
    background: var(--night-surface);
    color: var(--white);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,0.2); }
.form-control::placeholder { color: var(--gray); }

/* 卡片 */
.card {
    background: var(--night-surface);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.05);
}
.card-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* 顶部导航 */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(13,17,23,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
}
.navbar-brand .logo { font-size: 28px; }
.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}
.navbar-user .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

/* 登录页面 */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(ellipse at top, #1a1a2e 0%, #0d0d1a 50%, #000000 100%);
}
.login-card {
    width: 100%;
    max-width: 420px;
    text-align: center;
}
.login-card h1 {
    font-size: 42px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--wolf-red), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.login-card .subtitle {
    color: var(--gray);
    margin-bottom: 32px;
    font-size: 15px;
}
.login-card .form-control { text-align: center; font-size: 16px; }

/* 大厅 */
.lobby-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}
.lobby-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}
.lobby-header h2 { font-size: 24px; }
.lobby-stats {
    display: flex;
    gap: 24px;
    color: var(--gray-light);
    font-size: 14px;
}
.lobby-stats span { display: flex; align-items: center; gap: 6px; }

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}
.room-card {
    background: var(--night-surface);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: var(--transition);
    cursor: pointer;
}
.room-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(108,92,231,0.15);
}
.room-card .room-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}
.room-card .room-meta {
    display: flex;
    gap: 16px;
    color: var(--gray);
    font-size: 13px;
    margin-bottom: 12px;
}
.room-card .room-meta span { display: flex; align-items: center; gap: 4px; }
.room-card .room-players-bar {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-bottom: 12px;
    overflow: hidden;
}
.room-card .room-players-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--primary));
    border-radius: 2px;
    transition: width 0.5s ease;
}
.room-card .room-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.room-card .host-tag {
    font-size: 12px;
    padding: 2px 10px;
    background: rgba(108,92,231,0.2);
    color: var(--primary);
    border-radius: 20px;
}
.room-card .lock-tag {
    font-size: 12px;
    padding: 2px 8px;
    background: rgba(243,156,18,0.2);
    color: var(--warning);
    border-radius: 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 16px; margin-bottom: 20px; }

/* 模态框 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal {
    background: var(--night-surface);
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 480px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}
.modal-overlay.active .modal { transform: scale(1); }
.modal h3 { font-size: 22px; margin-bottom: 20px; }
.modal .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.modal-header h3 { margin: 0; font-size: 20px; }
.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.btn-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
.modal-body { padding: 0 20px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 玩家资料弹窗 */
.profile-info {
    text-align: center;
    margin-bottom: 24px;
}
.profile-info .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 36px;
    font-weight: 700;
}
.profile-info h4 { margin: 0; font-size: 18px; }
.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}
.stat-item { background: rgba(255,255,255,0.05); padding: 12px 8px; border-radius: 8px; }
.stat-label { font-size: 12px; color: var(--gray); display: block; margin-bottom: 4px; }
.stat-value { font-size: 16px; font-weight: 700; }
.password-change h4 { font-size: 16px; margin: 0 0 16px; color: var(--gray); }

/* 等待室 / 游戏界面 */
.p-avatar.ready { border-color: var(--success); }
.p-avatar.ready::after { content: '✓'; position: absolute; bottom: -2px; right: -2px; width: 18px; height: 18px; background: var(--success); border-radius: 50%; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--night-bg); }
.p-avatar.kickable:hover { cursor: pointer; border-color: var(--danger); transform: scale(1.05); }
.p-avatar.kickable:hover::before { content: '✕ 踢出'; position: absolute; top: -28px; left: 50%; transform: translateX(-50%); background: var(--danger); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 11px; white-space: nowrap; z-index: 10; }
.ready-check { position: absolute; bottom: -2px; right: -2px; width: 18px; height: 18px; background: var(--success); border-radius: 50%; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--night-bg); }
.room-code-bar { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 8px 0; padding: 8px 20px; background: rgba(255,255,255,0.06); border-radius: 8px; }
.game-container {
    height: calc(100vh - 57px);
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    grid-template-rows: 1fr;
    gap: 0;
    overflow: hidden;
}

/* 左侧玩家列表 */
.player-panel {
    background: var(--night-surface);
    border-right: 1px solid rgba(255,255,255,0.08);
    padding: 16px;
    overflow-y: auto;
}
.player-panel h4 {
    font-size: 14px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.seat-list { list-style: none; }
.seat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: var(--transition);
    position: relative;
}
.seat-item:hover { background: rgba(255,255,255,0.05); }
.seat-item .seat-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--gray-light);
    flex-shrink: 0;
}
.seat-item .seat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.seat-item .seat-name {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.seat-item .seat-role {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.seat-item.dead {
    opacity: 0.4;
    text-decoration: line-through;
}
.seat-item.dead .seat-avatar { background: var(--gray); }
.seat-item.is-me { background: rgba(108,92,231,0.15); border: 1px solid rgba(108,92,231,0.3); }
.seat-item.empty { color: var(--gray); font-size: 13px; }

.role-werewolf { background: rgba(255,71,87,0.2); color: var(--wolf-red); }
.role-seer { background: rgba(30,144,255,0.2); color: var(--good-blue); }
.role-witch { background: rgba(155,89,182,0.2); color: #9b59b6; }
.role-hunter { background: rgba(243,156,18,0.2); color: var(--warning); }
.role-guard { background: rgba(46,204,113,0.2); color: var(--success); }
.role-villager { background: rgba(255,255,255,0.1); color: var(--gray-light); }

/* 中间主区域 */
.main-area {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 游戏状态栏 */
.game-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 20px;
    background: var(--night-surface);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 15px;
}
.game-status-bar .phase-icon { font-size: 24px; }
.game-status-bar .phase-text { font-weight: 600; }
.game-status-bar .round-info { color: var(--gray); font-size: 13px; }

.phase-night { 
    background: linear-gradient(135deg, #1a1a2e, #16213e) !important;
    border-bottom-color: rgba(108,92,231,0.2) !important;
}
.phase-day {
    background: linear-gradient(135deg, #2d3436, #636e72) !important;
    border-bottom-color: rgba(243,156,18,0.2) !important;
}

/* 聊天区域 */
.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-msg {
    max-width: 80%;
    animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-msg.system {
    align-self: center;
    max-width: 90%;
    text-align: center;
}
.chat-msg.system .msg-bubble {
    background: rgba(255,255,255,0.06);
    color: var(--gray-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    line-height: 1.5;
}
.chat-msg.system .msg-bubble.death {
    background: rgba(231,76,60,0.15);
    color: var(--wolf-red);
}
.chat-msg.system .msg-bubble.good-news {
    background: rgba(46,204,113,0.15);
    color: var(--success);
}
.chat-msg.system .msg-bubble.round-start {
    background: linear-gradient(135deg, rgba(108,92,231,0.2), rgba(108,92,231,0.05));
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
    padding: 12px 24px;
}
.chat-msg.self { align-self: flex-end; }
.chat-msg.other { align-self: flex-start; }
.chat-msg .msg-sender {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 2px;
    padding-left: 4px;
}
.chat-msg.self .msg-sender { text-align: right; padding-right: 4px; }
.chat-msg .msg-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}
.chat-msg.other .msg-bubble { background: rgba(255,255,255,0.08); }
.chat-msg.self .msg-bubble { background: var(--primary); }

/* 聊天输入 */
.chat-input-bar {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    background: var(--night-surface);
    border-top: 1px solid rgba(255,255,255,0.08);
}
.chat-input-bar input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: var(--white);
    font-size: 14px;
    outline: none;
    font-family: inherit;
}
.chat-input-bar input:focus { background: rgba(255,255,255,0.12); }
.chat-input-bar .btn { padding: 10px 20px; }

/* 右侧操作面板 */
.action-panel {
    background: var(--night-surface);
    border-left: 1px solid rgba(255,255,255,0.08);
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.action-panel h4 {
    font-size: 14px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 角色卡片 */
.my-role-card {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid;
}
.my-role-card .role-emoji { font-size: 48px; margin-bottom: 8px; }
.my-role-card .role-name { font-size: 22px; font-weight: 800; }
.my-role-card .role-desc { font-size: 12px; color: var(--gray-light); margin-top: 4px; }
.my-role-card.werewolf { border-color: var(--wolf-red); background: rgba(255,71,87,0.08); }
.my-role-card.seer { border-color: var(--good-blue); background: rgba(30,144,255,0.08); }
.my-role-card.witch { border-color: #9b59b6; background: rgba(155,89,182,0.08); }
.my-role-card.hunter { border-color: var(--warning); background: rgba(243,156,18,0.08); }
.my-role-card.guard { border-color: var(--success); background: rgba(46,204,113,0.08); }
.my-role-card.villager { border-color: var(--gray-light); background: rgba(255,255,255,0.04); }

/* 行动按钮组 */
.action-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.action-btns .btn { width: 100%; }

/* 目标选择列表 */
.target-list { list-style: none; }
.target-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
    border: 2px solid transparent;
}
.target-item:hover { background: rgba(255,255,255,0.05); }
.target-item.selected { border-color: var(--primary); background: rgba(108,92,231,0.15); }
.target-item.dead { opacity: 0.3; pointer-events: none; }
.target-item .t-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}
.target-item .t-name { font-size: 14px; font-weight: 500; }

/* 投票结果 */
.vote-results {
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}
.vote-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}
.vote-result-item .v-name { flex: 1; }
.vote-result-item .v-count {
    font-weight: 700;
    color: var(--wolf-red);
    min-width: 40px;
    text-align: right;
}
.vote-result-item .v-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin: 0 12px;
    overflow: hidden;
}
.vote-result-item .v-bar .fill {
    height: 100%;
    background: var(--wolf-red);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* 等待室样式 */
.waiting-room {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 24px;
    text-align: center;
    padding: 20px;
}
.waiting-room .big-icon { font-size: 64px; }
.waiting-room h2 { font-size: 28px; }
.waiting-room .player-avatars {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.waiting-room .p-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 22px;
    position: relative;
}
.waiting-room .p-avatar.empty {
    background: rgba(255,255,255,0.1);
    color: var(--gray);
    font-size: 24px;
}

/* 倒计时 */
.timer {
    font-size: 36px;
    font-weight: 800;
    color: var(--warning);
    font-variant-numeric: tabular-nums;
}

/* 游戏结束 */
.game-over-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    animation: fadeIn 0.5s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.game-over-card {
    text-align: center;
    padding: 48px;
    border-radius: 20px;
    background: var(--night-surface);
    border: 2px solid;
    max-width: 480px;
    width: 90%;
}
.game-over-card .result-icon { font-size: 72px; margin-bottom: 16px; }
.game-over-card .result-text { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.game-over-card.wolf-win { border-color: var(--wolf-red); }
.game-over-card.good-win { border-color: var(--success); }
.game-over-card .reveal-list {
    text-align: left;
    margin: 24px 0;
}
.game-over-card .reveal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 14px;
}

/* Toast 通知 */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    box-shadow: var(--shadow);
    max-width: 360px;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
.toast.info { background: var(--info); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* 响应式 */
@media (max-width: 900px) {
    .game-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    .player-panel {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        max-height: 150px;
    }
    .action-panel {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.08);
        max-height: 200px;
    }
    .rooms-grid { grid-template-columns: 1fr; }
}

/* ========== 语音功能 ========== */

/* 语音开关按钮 */
.voice-btn {
    background: rgba(255,255,255,0.08) !important;
    border: 2px solid rgba(255,255,255,0.15) !important;
    font-size: 18px !important;
    padding: 6px 12px !important;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.voice-btn:hover {
    background: rgba(108,92,231,0.2) !important;
    border-color: var(--primary) !important;
}
.voice-btn.voice-active {
    background: rgba(46,204,113,0.2) !important;
    border-color: var(--success) !important;
    box-shadow: 0 0 12px rgba(46,204,113,0.3);
    animation: voicePulse 2s infinite;
}
@keyframes voicePulse {
    0%, 100% { box-shadow: 0 0 12px rgba(46,204,113,0.3); }
    50% { box-shadow: 0 0 20px rgba(46,204,113,0.5); }
}

/* 玩家列表中的语音状态指示器 */
.voice-indicator {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    opacity: 0.4;
    transition: opacity 0.2s;
}
.voice-indicator.speaking {
    opacity: 1;
}
.voice-wave {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 16px;
}
.voice-wave::before,
.voice-wave::after,
.voice-wave span {
    content: '';
    display: block;
    width: 3px;
    height: 6px;
    background: var(--success);
    border-radius: 2px;
    animation: none;
}
.voice-indicator.speaking .voice-wave::before,
.voice-indicator.speaking .voice-wave::after {
    animation: wave 0.6s ease-in-out infinite;
}
.voice-indicator.speaking .voice-wave::after {
    animation-delay: 0.15s;
}
@keyframes wave {
    0%, 100% { height: 4px; }
    50% { height: 14px; }
}

/* 静音标记 */
.voice-mute-badge {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    margin-left: 2px;
    opacity: 0.7;
}

/* 语音连接状态提示 */
.voice-status-tip {
    font-size: 12px;
    color: var(--gray);
    text-align: center;
    padding: 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.voice-status-tip.connected { color: var(--success); }
.voice-status-tip.disconnected { color: var(--danger); }

/* 倒计时 */
.countdown {
    font-size: 18px;
    font-weight: 800;
    color: var(--warning);
    font-variant-numeric: tabular-nums;
    margin-left: auto;
    min-width: 40px;
    text-align: center;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
