/* 基础样式设置 */
:root {
    --primary: #3498db;
    --secondary: #2c3e50;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --light: #ecf0f1;
    --dark: #34495e;
    --purple: #9b59b6;
    --teal: #1abc9c;
    --banker: #e74c3c;
    --player: #3498db;
    --tie: #9b59b6;
    --gray: #95a5a6;
    --bg-gradient: linear-gradient(135deg, #2c3e50, #1a2530);
    --guest: #95a5a6;
    --monthly: #3498db;
    --yearly: #9b59b6;
}

* {
    -webkit-touch-callout: none; /* 禁止iOS长按菜单 */
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--bg-gradient);
    color: var(--light);
    min-height: 100vh;
    padding: 20px;
}
.bead-tip{
    position:relative;
    background:#ffeb3b;
    color:#000;
    padding:6px 12px;
    border-radius:4px;
    margin-left:8px;
    font-size:13px;
    animation:fadeInOut 3s forwards;
}
@keyframes fadeInOut{
    0%   {opacity:0;}
    10%  {opacity:1;}
    90%  {opacity:1;}
    100% {opacity:0;}
}
.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 20px;
    margin-bottom: 30px;
    background: rgba(44, 62, 80, 0.7);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

h1 {
    font-size: 2.8rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--teal);
    max-width: 800px;
    margin: 0 auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(52, 73, 94, 0.5);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
}

.user-level {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
}

.level-guest { background-color: var(--guest); }
.level-monthly { background-color: var(--monthly); }
.level-yearly { background-color: var(--yearly); }

.btn-logout {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--light);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px 15px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    overflow-x: visible;
}

.panel {
    background: rgba(44, 62, 80, 0.8);
    border-radius: 10px;
    /*padding: 25px;*/
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    overflow-x: visible;
}

.panel:hover {
    transform: translateY(-5px);
}

.panel-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header.flex-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: nowrap;
}

.panel-title {
    font-size: 1.6rem;
    color: var(--teal);
}

.status {
    display: flex;
    font-size: 0.95rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.stat-card {
    background: rgba(52, 73, 94, 0.6);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    min-width: 0;
    box-sizing: border-box;
}
.stat-value {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    font-weight: bold;
    min-height: 2.2em;
    flex-wrap: nowrap;
    overflow-x: auto;
}
.prob-item {
    display: flex;
    align-items: center;
    min-width: 38px;
    font-size: 1em;
    font-weight: bold;
    white-space: nowrap;
    justify-content: center;
    padding: 0 2px;
}
@media (max-width: 600px) {
  .stats-container {
    grid-template-columns: 1fr;
  }
  .stat-value {
    flex-direction: column;
    gap: 2px;
    font-size: 0.98em;
    min-height: 2.8em;
    padding: 0 2px;
    align-items: flex-start;
  }
  .prob-item {
    min-width: 0;
    font-size: 0.98em;
    margin-right: 0;
    padding: 0 1px;
    justify-content: flex-start;
  }
}

.stat-card:hover {
    background: rgba(41, 128, 185, 0.3);
    transform: scale(1.03);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 10px 0;
}

.bg-success { background: linear-gradient(to right, rgba(39, 174, 96, 0.3), rgba(46, 204, 113, 0.3)); }
.bg-danger { background: linear-gradient(to right, rgba(231, 76, 60, 0.3), rgba(192, 57, 43, 0.3)); }
.bg-primary { background: linear-gradient(to right, rgba(52, 152, 219, 0.3), rgba(41, 128, 185, 0.3)); }
.bg-warning { background: linear-gradient(to right, rgba(243, 156, 18, 0.3), rgba(230, 126, 34, 0.3)); }

/* 路单网格样式 */
.roadmap-grid {
    display: inline-grid;
    grid-template-columns: repeat(auto-fill, 45px);
    grid-auto-rows: 45px;
    gap: 6px;
    margin-top: 15px;
    background: rgba(26, 37, 47, 0.6);
    padding: 20px;
    border-radius: 8px;
    max-width: 100%;
    overflow-x: auto;
}

/* 路单单元格高亮为圆形，字体更大更粗 */
.road-cell {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50%;
    margin: 2px;
    background: #f2f2f2;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.banker-cell { background: #ffeaea; color: #d32f2f; border: 2px solid #d32f2f; }
.player-cell { background: #eaf1ff; color: #1976d2; border: 2px solid #1976d2; }
.tie-cell    { background: #eaffea; color: #388e3c; border: 2px solid #388e3c; }

/* 路单序号样式 */
.road-cell::after {
    content: attr(data-index);
    position: absolute;
    top: 3px;
    right: 5px;
    font-size: 9px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* 操作按钮 */
.actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 25px;
}

.btn {
    padding: 15px 10px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-banker { background: linear-gradient(to right, var(--banker), #c0392b); }
.btn-player { background: linear-gradient(to right, var(--player), #2980b9); }
.btn-tie { background: linear-gradient(to right, var(--tie), #8e44ad); }

.btn-banker:hover { background: linear-gradient(to right, #e67c73, #c0392b); }
.btn-player:hover { background: linear-gradient(to right, #5dade2, #2980b9); }
.btn-tie:hover { background: linear-gradient(to right, #bb8fce, #8e44ad); }

.btn-util { 
    background: var(--dark); 
    color: var(--light);
}

.btn-util:hover {
    background: var(--secondary);
}

.btn-set-capital {
    padding: 5px 10px;
    margin-left: 15px;
    background: var(--primary);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.btn-set-capital:hover {
    background: #2980b9;
}

/* 投注面板样式 */
.bet-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--teal);
}

.form-control {
    padding: 12px 15px;
    border: none;
    border-radius: 6px;
    background: rgba(52, 73, 94, 0.5);
    color: white;
    font-size: 1rem;
}

.strategy-select {
    padding: 12px;
    background: rgba(52, 73, 94, 0.5);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 1rem;
}

.calculate-btn {
    background: linear-gradient(to right, var(--teal), #16a085);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calculate-btn:hover {
    background: linear-gradient(to right, #1de9b6, #16a085);
    transform: translateY(-2px);
}

.recommendations {
    background: rgba(26, 37, 47, 0.6);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    text-align: center;
}

.rec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rec-item label {
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--teal);
}

.rec-value {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--warning);
}

.bet-buttons {
    margin-top: 20px;
}

/* 历史记录区域 */
.history-list {
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    background: rgba(26, 37, 47, 0.6);
    padding: 20px;
    border-radius: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.history-item {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.history-item .delete-history {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: none;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    padding: 0;
}

.history-item:hover .delete-history {
    opacity: 1;
    transform: scale(1.2);
}

.history-item-flex {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    font-size: 16px;
}
.history-time {
    color: #aaa;
    font-size: 13px;
    margin-left: 4px;
}
.delete-history {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    margin-left: 8px;
    font-size: 15px;
}
.delete-history:hover {
    color: #d32f2f;
}

.history-circle-wrap {
    position: relative;
    display: inline-block;
    margin: 2px 6px 2px 0;
}
.history-del-t {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    background: #17ff01;
    color: #ffffff;
    border-radius: 50%;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    border: 1px solid #eee;
    transition: background 0.2s, color 0.2s;
    z-index: 2;
}.history-del-f {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    background: #ff0000;
    color: #ffffff;
    border-radius: 50%;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    border: 1px solid #eee;
    transition: background 0.2s, color 0.2s;
    z-index: 2;
}
.history-del-x {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    background: #fff;
    color: #e74c3c;
    border-radius: 50%;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    border: 1px solid #eee;
    transition: background 0.2s, color 0.2s;
    z-index: 2;
}
.history-del-x:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

.banker-cell { background-color: var(--banker); }
.player-cell { background-color: var(--player); }
.tie-cell { background-color: var(--tie); }

/* 投注记录表格 */
.betting-records-container {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
    background: rgba(26, 37, 47, 0.6);
    padding: 20px;
    border-radius: 8px;
}

/* 投注记录整体排版美化 */
.betting-record {
   display: grid;
    grid-template-columns: 50px 1fr 1fr 1fr 1fr 1fr;
    font-weight: bold;
    padding: 12px 15px;
    align-items: center;
    gap: 0;
    /*padding: 6px 0;*/
    border-bottom: 1px solid #222c3c;
    font-size: 15px;
    background: transparent;
}
.betting-record > div {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
   
}
.betting-record:first-child {
    border-top: 1px solid #222c3c;
}

.betting-records-header {
    text-align: center;
    display: grid;
    grid-template-columns: 50px 1fr 1fr 1fr 1fr 1fr;
    font-weight: bold;
    padding: 12px 15px;
    background: rgba(41, 128, 185, 0.2);
    border-radius: 8px;
}

.betting-record:nth-child(odd) {
    background-color: rgba(52, 73, 94, 0.4);
}

.betting-record:hover {
    background-color: rgba(41, 128, 185, 0.2) !important;
}

.win { 
    color: var(--teal);
    font-weight: bold; 
}

.lose { 
    color: var(--danger);
    font-weight: bold; 
}

.tie-record { 
    color: var(--purple);
    font-weight: bold; 
}

.refund {
    color: #aaa !important;
    font-weight: bold;
}

/* 目标达成提示 */
.target-alert {
    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: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.target-alert.active {
    opacity: 1;
    pointer-events: all;
}

.alert-content {
    background: rgba(44, 62, 80, 0.95);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 50px rgba(39, 174, 96, 0.7);
}

.alert-content h2 {
    font-size: 3rem;
    color: var(--teal);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(26, 188, 156, 0.8);
}

.alert-content p {
    font-size: 1.5rem;
    margin: 10px 0;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .actions {
        display: flex;
        flex-direction: row;
        gap: 8px;
    }
    .btn-banker, .btn-player, .btn-tie {
        flex: 1 1 0;
        min-width: 0;
        font-size: 1.05rem;
        padding: 12px 0;
    }
    .btn-util {
        flex: 1 1 0;
        min-width: 0;
        font-size: 1.05rem;
        padding: 12px 0;
    }
    /* 让其它操作按钮保持竖排 */
    .actions + .actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .stats-container {
        display: flex;
        flex-direction: row;
        gap: 8px;
    }
    .stat-card {
        flex: 1 1 0;
        min-width: 0;
        box-sizing: border-box;
        font-size: 0.98rem;
        padding: 10px 4px;
    }
    .stat-value {
        font-size: 1.2rem;
        margin: 6px 0;
    }
    .stat-value > div {
        font-size: 0.98em;
        min-width: 48px;
        margin-right: 4px;
        padding: 0 2px;
    }
    .stat-value {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
        font-size: 1.1em;
        font-weight: bold;
        min-height: 2.2em;
    }
    .prob-item {
        display: flex;
        align-items: center;
        min-width: 38px;
        font-size: 1em;
        font-weight: bold;
        white-space: nowrap;
        justify-content: center;
        padding: 0 2px;
    }
    @media (max-width: 600px) {
      .stat-value {
        font-size: 0.98em;
        gap: 2px;
        min-height: 1.8em;
        padding: 0 2px;
      }
      .prob-item {
        min-width: 24px;
        font-size: 0.98em;
        margin-right: 0;
        padding: 0 1px;
      }
    }
    
    .btn {
        padding: 12px;
    }
    
    .betting-records-header,
    .betting-record {
        grid-template-columns: 40px 0.8fr 0.8fr 0.8fr 0.8fr 0.8fr;
        font-size: 0.8rem;
    }
}

@media (max-width: 900px) {
  .roadmap-view {
    max-width: 100vw;
    padding-left: 0;
    padding-right: 0;
  }
  .bigroad-table td, .bigeyeboy-table td, .smallroad-table td {
    width: 16px;
    height: 16px;
  }
  .bigroad-dot, .bigeyeboy-dot, .smallroad-dot {
    width: 13px;
    height: 13px;
    font-size: 11px;
    line-height: 13px;
  }
}

.message-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s;
}

.message-alert.success {
    background: var(--success);
}

.message-alert.warning {
    background: var(--warning);
}

.message-alert.danger {
    background: var(--danger);
}

.message-alert.info {
    background: var(--primary);
}

/* 路单和投注管理B/P/T彩色样式 */
/* 投注记录图标圆形高亮 */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    margin: 0 2px;
}
.banker-icon { background: #ffeaea; color: #d32f2f; border: 2px solid #d32f2f; }
.player-icon { background: #eaf1ff; color: #1976d2; border: 2px solid #1976d2; }
.tie-icon    { background: #eaffea; color: #388e3c; border: 2px solid #388e3c; }

.probability-analyze-panel {
    background: #232f3e;
    border-radius: 10px;
    padding: 18px 24px 12px 24px;
    margin: 18px 0 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    color: #fff;
    min-width: 340px;
    /*max-width: 420px;*/
}
.probability-header {
    display: flex;
    align-items: center;
    font-size: 15px;
    margin-bottom: 10px;
}
.probability-header select {
    margin: 0 8px;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #1a2233;
    color: #fff;
}
.probability-stats {
    display: flex;
    gap: 24px;
    font-size: 16px;
    margin-bottom: 8px;
}
.probability-stats div {
    min-width: 90px;
}
.probability-tips {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 15px;
    align-items: center;
}
#bankerStreakTip { color: #ff5252; font-weight: bold; }
#playerStreakTip { color: #40a9ff; font-weight: bold; }
#trendTip { color: #ffb300; font-weight: bold; }
#patternTip { color: #b388ff; font-weight: bold; }
#ssTip { color: #c43b2c; font-weight: bold; }

.btn-user-center {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px 15px;
    border-radius: 15px;
    margin-left: 5px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
    box-shadow: none;
}
.btn-user-center:hover {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 2px 8px rgba(231,76,60,0.10);
}

/* 路单保存相关样式 */
.roadmap-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.roadmap-info p {
    margin: 5px 0;
    color: #fff;
}

.roadmap-preview {
    margin: 20px 0;
}

.roadmap-preview h4 {
    color: #fff;
    margin-bottom: 10px;
}

.roadmap-preview-content {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
}

.roadmap-preview-content .road-item {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    margin: 2px;
    font-size: 12px;
    font-weight: bold;
}

.roadmap-preview-content .road-item.banker {
    background: #e74c3c;
    color: #fff;
}

.roadmap-preview-content .road-item.player {
    background: #3498db;
    color: #fff;
}

.roadmap-preview-content .road-item.tie {
    background: #2ecc71;
    color: #fff;
}

/* 路单通用样式 */
.roadmap-view {
  max-width: 84vw;
  width: 100%;
height: 100%;
  /*height: 162px;*/
  /*max-width: 800px;*/
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 4px;
  display: block;
  text-align: left;
  position: relative;
  margin: 0 auto;
}
.bigroad-table {
  display: inline-block;
  min-width: 0;
  width: auto;
  table-layout: auto;
  vertical-align: top;
}
.bigroad-table td, .bigeyeboy-table td, .smallroad-table td {
  width: 22px; height: 22px; text-align: center; vertical-align: middle; padding: 0;
}
.bigroad-dot, .bigeyeboy-dot, .smallroad-dot {
  display: inline-block;
  width: 18px; height: 18px;
  border-radius: 50%;
  line-height: 18px;
  font-size: 14px;
  color: #fff;
  margin: 1px;
}

.bigroad-dot.banker.t {background: #e74c3c;border: 2px solid #16ff00;   /* 黑色描边，可改颜色/粗细 */} /* 红色-庄 */
.bigroad-dot.player.t { background: #3498db;border: 2px solid #16ff00; } /* 蓝色-闲 */
.bigroad-dot.tie.t {
  background: #2ecc71;
  width: 10px;
  height: 10px;
  font-size: 10px;
  color: #fff;
  display: inline-block;
  border-radius: 50%;
  line-height: 10px;
  text-align: center;
  position: absolute;
  right: 2px;
  top: 2px;
  z-index: 2;
  border: 2px solid #16ff00;
}


.bigroad-dot.banker { background: #e74c3c; } /* 红色-庄 */
.bigroad-dot.player { background: #3498db; } /* 蓝色-闲 */
.bigroad-dot.tie {
  background: #2ecc71;
  width: 10px;
  height: 10px;
  font-size: 10px;
  color: #fff;
  display: inline-block;
  border-radius: 50%;
  line-height: 10px;
  text-align: center;
  position: absolute;
  right: 2px;
  top: 2px;
  z-index: 2;
}

.bigeyeboy-dot { background: #fff; border: 2px solid #e74c3c; }
.bigeyeboy-dot.player { border-color: #3498db; }
.smallroad-dot { background: #fff; border: 2px dashed #e74c3c; }
.smallroad-dot.player { border-color: #3498db; }

.roadmap-tabs { margin-bottom: 8px; }
.roadmap-tab { padding: 4px 12px; margin-right: 4px; border: none; background: #222; color: #fff; border-radius: 4px; cursor: pointer; }
.roadmap-tab.active { background: #ffd700; color: #222; }

.capital-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 18px;
    gap: 12px;
}
.capital-label {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 500;
}
.capital-value {
    font-size: 1.3rem;
    color: #ffd700;
    font-weight: bold;
    margin-right: 8px;
}
.btn-set-capital {
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-set-capital:hover {
    background: #217dbb;
}
.form-row {
    display: flex;
    gap: 24px;
    margin-bottom: 18px;
}
.form-group-inline {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.form-group-inline .form-label {
    margin-bottom: 6px;
    color: #fff;
    font-size: 1rem;
}
.form-group-inline .form-control {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #223;
    color: #ffd700;
    font-size: 1.1rem;
}

@media (max-width: 600px) {
  .panel-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-bottom: 10px;
  }
  .panel-title {
    text-align: left;
    width: 100%;
    margin-bottom: 0;
    font-size: 1.2rem;
  }
  .capital-bar {
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    gap: 8px;
    margin-bottom: 0;
  }
  .btn-set-capital {
    width: auto;
    min-width: 90px;
    font-size: 1.05rem;
    padding: 8px 0;
    margin-top: 0;
  }
  .form-row {
    flex-direction: row !important;
    gap: 8px;
    margin-bottom: 10px;
  }
  .form-group-inline {
    flex: 1 1 0;
    min-width: 0;
    width: 0;
  }
  .form-group-inline .form-control {
    font-size: 1.1rem;
    padding: 12px 10px;
  }
  .form-group-inline .form-label {
    font-size: 1rem;
  }
  h1 {
    font-size: 1.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
  }
  .subtitle {
    font-size: 0.95rem;
    margin-bottom: 0;
  }
}

.btn-disabled {
    background: #bbb !important;
    color: #fff !important;
    border: none !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    box-shadow: none !important;
}

#guestAnalysisTip {
  width: 100%;
  grid-column: 1/-1;
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.guest-analysis-tip {
  background: rgba(231,76,60,0.12);
  color: #e74c3c;
  border: 1.5px dashed #e74c3c;
  border-radius: 8px;
  padding: 10px 0;
  text-align: center;
  font-size: 1.08rem;
  font-weight: bold;
  letter-spacing: 1px;
  margin: 0 auto;
  width: 90%;
  /*max-width: 320px;*/
  box-sizing: border-box;
}
@media (max-width: 600px) {
  #guestAnalysisTip {
    width: 100%;
    margin-top: 8px;
    padding: 0;
  }
  .guest-analysis-tip {
    font-size: 0.98rem;
    padding: 8px 0;
    width: 98%;
    max-width: 98vw;
  }
}

.rate-label {
    font-size: 0.85em;
    color: #aaa;
    margin-left: 4px;
    font-weight: normal;
}
.stat-value {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 1.15em;
  font-weight: bold;
  min-height: 2.2em;
}
.stat-value > span {
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.profit-positive { color: #27ae60; font-weight: bold; }
.profit-negative { color: #e74c3c; font-weight: bold; }
@media (max-width: 600px) {
  .stat-value {
    font-size: 0.98em;
    gap: 4px;
    min-height: 1.8em;
    padding: 0 2px;
  }
}

.center-alert {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.35);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.center-alert-content {
  background: #fff;
  color: #e74c3c;
  border-radius: 12px;
  padding: 28px 32px;
  font-size: 1.15rem;
  font-weight: bold;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  text-align: center;
  max-width: 80vw;
  min-width: 220px;
  letter-spacing: 1px;
}
@media (max-width: 600px) {
  .center-alert-content {
    width: 90%;
    padding: 15px;
  }
}

/* 止损设置样式 */
.stop-loss-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 8px 0;
}

.stop-loss-label {
    font-size: 0.95rem;
    color: var(--light);
    min-width: 40px;
}

.stop-loss-value {
    font-size: 1rem;
    font-weight: bold;
    color: var(--danger);
    min-width: 50px;
}

.btn-set-stop-loss {
    background: transparent;
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: var(--danger);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-set-stop-loss:hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--danger);
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--secondary);
    border-radius: 10px;
    padding: 38px 32px 32px 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
    color: var(--teal);
    margin-bottom: 20px;
    text-align: center;
}

.modal-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-left: 70px; /* 与label的min-width对齐 */
}

.modal-buttons .btn {
    min-width: 80px;
}

.restart-info {
    background: rgba(52, 73, 94, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.restart-info p {
    margin: 5px 0;
    font-size: 0.95rem;
}

.restart-warning {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.restart-warning p {
    color: var(--danger);
    font-weight: bold;
    margin-bottom: 10px;
}

.restart-warning ul {
    margin: 0;
    padding-left: 20px;
}

.restart-warning li {
    color: var(--light);
    margin: 3px 0;
    font-size: 0.9rem;
}

/* 止损触发状态 */
.stop-loss-triggered {
    color: var(--danger) !important;
    font-weight: bold;
}

.btn-restart-triggered {
    background: linear-gradient(to right, var(--danger), #c0392b) !important;
    color: white !important;
}

.btn-restart-triggered:hover {
    background: linear-gradient(to right, #e67c73, #c0392b) !important;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .stop-loss-bar {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-buttons .btn {
        width: 100%;
    }
}

.capital-stoploss-bar {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: nowrap;
}
.capital-group, .stoploss-group {
    display: flex;
    align-items: center;
    gap: 2px;
}
.capital-label, .stop-loss-label {
    font-weight: bold;
    color: var(--light);
    font-size: 1.05rem;
}
.capital-value {
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: bold;
    margin-right: 4px;
}
.stop-loss-value {
    color: var(--danger);
    font-size: 1.1rem;
    font-weight: bold;
    margin-right: 2px;
}
.stop-loss-amount {
    color: #aaa;
    font-size: 0.98rem;
    margin-right: 6px;
}
.btn-set-capital, .btn-set-stop-loss {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-set-capital:hover, .btn-set-stop-loss:hover {
    background: var(--teal);
}
.btn-set-capital, .btn-set-stop-loss {
    height: 26px;
    line-height: 26px;
    padding: 0 10px;
    border-radius: 6px;
    margin-left: 6px;
}
.btn-set-capital, .btn-set-stop-loss {
    margin-left: 12px;
}
@media (max-width: 700px) {
    .panel-header.flex-row-between {
        gap: 8px;
    }
    .capital-stoploss-bar {
        gap: 8px;
        overflow-x: auto;
        white-space: nowrap;
    }
    .btn-set-capital, .btn-set-stop-loss {
        font-size: 0.82rem;
        height: 22px;
        line-height: 22px;
        padding: 0 6px;
        border-radius: 4px;
        margin-left: 3px;
    }
}
.capital-stoploss-bar .btn-set-capital,
.capital-stoploss-bar .btn-set-stop-loss {
    min-width: 48px;
    font-size: 0.82rem;
    height: 22px;
    line-height: 22px;
    padding: 0 6px;
    border-radius: 4px;
    margin-left: 3px;
    box-sizing: border-box;
    text-align: center;
    display: inline-block;
}
@media (max-width: 700px) {
    .capital-stoploss-bar .btn-set-capital,
    .capital-stoploss-bar .btn-set-stop-loss {
        min-width: 48px;
        font-size: 0.82rem;
        height: 22px;
        line-height: 22px;
        padding: 0 6px;
        border-radius: 4px;
        margin-left: 3px;
        box-sizing: border-box;
        text-align: center;
        display: inline-block;
    }
}

.form-group-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
}
.form-group-row .form-label {
    min-width: 70px;
    text-align: right;
    color: #fff;
    margin-right: 8px;
}
.form-group-row .form-control {
    width: 180px;
    min-width: 120px;
    max-width: 240px;
}
.modal-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    margin: 0 auto 0 auto;
    width: 100%;
}
.modal-buttons .btn {
    min-width: 110px;
    max-width: 140px;
    border-radius: 10px;
    font-size: 1.08rem;
    box-shadow: 0 2px 10px rgba(41,128,185,0.10);
    padding: 12px 0;
}
@media (max-width: 600px) {
    .modal-buttons {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .modal-buttons .btn {
        width: 100%;
        min-width: 0;
        max-width: none;
        font-size: 1rem;
        padding: 14px 0;
    }
    .form-group-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        margin-bottom: 18px;
    }
    .form-group-row .form-label {
        text-align: left;
        margin-bottom: 2px;
        min-width: 0;
        font-size: 1rem;
    }
    .form-group-row .form-control {
        width: 100%;
        min-width: 0;
        max-width: none;
        font-size: 1rem;
        padding: 12px 10px;
    }
}
#btnConfirmStopLoss, #btnConfirmCapital {
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: bold;
    border-radius: 6px;
    padding: 0 18px;
    height: 36px;
    min-width: 90px;
    transition: background 0.2s;
}
#btnConfirmStopLoss:hover, #btnConfirmCapital:hover {
    background: var(--teal);
}
#btnCancelStopLoss {
    background: #34495e;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 18px;
    height: 36px;
    min-width: 90px;
    font-weight: bold;
}
#btnConfirmRestart {
    background: var(--danger);
    color: #fff;
    border: none;
    font-weight: bold;
    border-radius: 10px;
    padding: 0 18px;
    height: 40px;
    min-width: 120px;
    font-size: 1.08rem;
    box-shadow: 0 2px 10px rgba(231,76,60,0.10);
    transition: background 0.2s;
}
#btnConfirmRestart {
    white-space: nowrap;
}
#btnConfirmRestart:hover {
    background: #e67c73;
}

/* 保存路单按钮优化（更深色调） */
.btn-save-roadmap {
    background: #ffd700;
    color: #222;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255,215,0,0.10);
    transition: background 0.2s, color 0.2s, opacity 0.2s;
}
.btn-save-roadmap:hover:not(:disabled) {
    background: #ffea70;
    color: #222;
}
.btn-save-roadmap:disabled,
.btn-save-roadmap[disabled] {
    background: #fff7cc !important;
    color: #aaa !important;
    border: 1px solid #ffe066 !important;
    opacity: 1 !important;
    cursor: not-allowed;
    box-shadow: none;
}
#landscapeTip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    color: white;
    font-size: 20px;
}

#landscapeTip .tip-content {
    text-align: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}
#landscapeTip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    color: white;
    font-size: 20px;
}

#landscapeTip .tip-content {
    text-align: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

#landscapeTip .btn-continue {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #ff5722;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#landscapeTip .btn-continue:hover {
    background-color: #e64a19;
}