/* =========================================
   panel-styles.css - 玩家面板组件 (优化版)
   ========================================= */

/* 1. 面板容器 */
.player-panel {
    background-color: var(--bg-secondary); /* 如果base里没定义，用 #34495e 或 var(--bg-input) */
    background-color: #34495e; /* 暂且保留深灰，或者用 var(--bg-input) */
    padding: 5px 9px !important;
    border-radius: var(--radius-md) !important;
    margin-bottom: 5px !important;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

/* Hero (绿色) */
.hero-panel {
    border-left-color: var(--accent-green);
}

/* Villain (红色) */
.villain-panel {
    border-left-color: var(--accent-red);
}

/* 2. 面板头部 (Header) */
.player-header-compact {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    margin-bottom: 3px !important;
    padding-bottom: 2px !important;
    height: 28px !important;
    min-height: 28px !important;
}

.ph-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ph-avatar-btn {
    font-size: 18px;
    cursor: pointer;
}

.ph-name {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
}

/* 头部操作按钮 (Reset/Del) */
.ph-action-btn {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    z-index: 10 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    color: var(--accent-red) !important;
    background: rgba(231, 76, 60, 0.15) !important;
    border: 1px solid rgba(231, 76, 60, 0.3) !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    min-width: 40px !important;
    text-align: center !important;
}

/* =========================================
   panel-styles.css - 玩家面板 (下划线对齐修复版)
   ========================================= */

/* 1. 面板容器 */
.player-panel {
    background-color: #34495e; /* 或者 var(--bg-input) */
    padding: 5px 9px !important;
    border-radius: var(--radius-md) !important;
    margin-bottom: 5px !important;
    border-left: 4px solid transparent;
}

.hero-panel { border-left-color: var(--accent-green); }
.villain-panel { border-left-color: var(--accent-red); }

/* 2. 面板头部 */
.player-header-compact {
    display: flex !important;
    justify-content: space-between;
    align-items: center !important;
    margin-bottom: 5px !important;
    height: 28px !important;
}

.ph-left { display: flex; align-items: center; gap: 6px; }
.ph-avatar-btn { font-size: 18px; cursor: pointer; }
.ph-name { font-size: 14px; font-weight: bold; color: var(--text-light); cursor: pointer; }

/* 头部操作按钮 */
.ph-action-btn {
    font-size: 10px !important;
    font-weight: 800 !important;
    color: var(--accent-red) !important;
    background: rgba(231, 76, 60, 0.15) !important;
    border: 1px solid rgba(231, 76, 60, 0.3) !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
}

/* 3. 输入布局网格 (关键修复：底部对齐) */
.symmetric-input-row {
    display: grid;
    /* 调整比例：位置 | 码量 | 动作(宽) | 注额 */
    grid-template-columns: 0.9fr 0.9fr 1.4fr 0.9fr; 
    gap: 8px;
    margin-bottom: 5px;
    align-items: end; /* ★★★ 关键：让所有元素的底部边框对齐 ★★★ */
}

.input-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* 标签样式 */
.input-group label {
    font-size: 9px !important;
    color: var(--text-dim) !important;
    opacity: 0.7;
    margin-bottom: 2px !important;
    text-align: center; /* 标签居中 */
}

/* 4. 输入框样式 (恢复下划线风格) */
.player-panel select,
.player-panel input {
    background-color: transparent !important; /* 透明背景 */
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important; /* 只有下划线 */
    border-radius: 0 !important; /* 直角 */
    padding: 0 0 2px 0 !important; /* 调整内边距，紧贴下划线 */
    color: #ffffff !important;
    font-weight: 600;
    font-size: 13px !important; /* 字体稍微加大一点 */
    text-align: center !important;
    text-align-last: center !important;
    height: 24px !important; /* 固定高度 */
    width: 100% !important;
    outline: none !important;
    box-shadow: none !important;
}

.player-panel select:focus,
.player-panel input:focus {
    border-bottom-color: var(--primary-color) !important; /* 聚焦变色 */
}

/* 动作选择框 (特殊处理) */
#hero-action, #v1-action {
    font-weight: 800 !important; /* 加粗 */
    font-size: 13px !important;
}

/* 动作状态颜色 (文字变色，或者下划线变色) */
.state-fold { color: var(--accent-red) !important; border-bottom-color: var(--accent-red) !important; }
.state-call { color: var(--accent-blue) !important; border-bottom-color: var(--accent-blue) !important; }
.state-raise { color: #f39c12 !important; border-bottom-color: #f39c12 !important; }
.state-3bet { color: var(--accent-red) !important; border-bottom-color: var(--accent-red) !important; }

/* 5. 快速注额容器 */
.amount-wrapper { width: 100%; }

.chip-quick-row {
    display: flex;
    gap: 2px;
    margin-top: 4px;
    justify-content: space-between;
}

.chip-btn {
    flex: 1;
    text-align: center;
    padding: 2px 0;
    font-size: 9px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-dim);
    border-radius: 3px;
    cursor: pointer;
}
.chip-btn:active { background: var(--primary-color); color: #000; }

/* 6. V1 呼吸灯动画 */
@keyframes panel-pulse {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); border-color: rgba(231, 76, 60, 0.4); }
    70% { box-shadow: 0 0 10px 0 rgba(231, 76, 60, 0); border-color: rgba(231, 76, 60, 0.8); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); border-color: rgba(231, 76, 60, 0.4); }
}

.villain-panel {
    /* 默认不闪烁，如果需要 JS 激活选中态，可加上 .active 类 */
    /* animation: panel-pulse 2s infinite; */ 
}

/* 7. 注额容器 (之前清理HTML时加的) */
.amount-wrapper {
    display: flex; 
    flex-direction: column; 
    width: 100%;
}
/* =========================================
   BR 页面补丁 (修复 FAB 和 List)
   ========================================= */

/* 1. BR 列表样式 (必须与 JS 中的 class="list-item-row" 匹配) */
.list-item-row {
    display: grid;
    grid-template-columns: 45px 40px 1fr 30px auto 30px; /* 调整列宽 */
    align-items: center;
    gap: 5px;
    background: #1a1e29;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 10px 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

/* 列表列文字 */
.list-col { white-space: nowrap; overflow: hidden; }
.list-col-date { font-size: 10px; color: #95a5a6; text-align: center; }
.list-col-level { font-size: 10px; font-weight: bold; color: #fff; background: rgba(255,255,255,0.1); border-radius: 4px; padding: 2px 4px; text-align: center; }
.list-col-loc { font-size: 11px; color: #7f8c8d; text-align: right; text-overflow: ellipsis; }
.list-col-hours { font-size: 11px; color: #f39c12; text-align: center; }
.list-col-profit { font-size: 13px; font-weight: 800; text-align: right; }
.list-btn-del { width: 24px; height: 24px; background: rgba(231,76,60,0.1); color: #e74c3c; border: 1px solid rgba(231,76,60,0.3); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 12px; }

/* 2. BR 悬浮按钮 (FAB) 修复 */
.br-fab-container {
    position: fixed;
    bottom: 85px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* 绿色加号主按钮 */
.br-btn-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    font-size: 32px;
    border: none;
    box-shadow: 0 6px 20px rgba(46,204,113,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
}

/* 子菜单按钮 (Live Tracker / Add Session) */
.br-fab-menu {
    display: none; /* JS 会切换 .visible */
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}
.br-fab-menu.visible { display: flex; }

.btn-fab-sub {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-fab-live { background: #e74c3c; } /* 红色 */
.btn-fab-add { background: #3498db; }  /* 蓝色 */