/* 彩票网站样式 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
    max-width: 750px;
    margin: 0 auto;
    position: relative;
}

/* 顶部彩种导航 */
.header {
    background-color: #1e88e5;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.lottery-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s;
    cursor: pointer;
}

.nav-item.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: bold;
}

/* 主要内容区域 */
.main-content {
    padding: 10px;
}

/* 公告滚动区域 */
.announcement-section {
    background-color: #fff8e1;
    border-radius: 8px;
    padding: 6px 10px; /* 减小上下内边距从10px到6px */
    margin-bottom: 10px; /* 减小下边距从15px到10px */
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 32px; /* 限制公告区域高度 */
}

.announcement-icon {
    flex-shrink: 0;
    margin-right: 8px; /* 减小右边距从10px到8px */
    color: #ff9800;
    font-size: 14px; /* 减小图标大小从18px到14px */
}

.announcement-scroll {
    overflow: hidden;
    flex-grow: 1;
}

.announcement-text {
    white-space: nowrap;
    animation: scrollText 20s linear infinite;
    color: #ff6f00;
    font-size: 12px; /* 减小字体大小从默认到12px */
    line-height: 1.2; /* 调整行高 */
}

@keyframes scrollText {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* 期号搜索区域 */
.search-section {
    margin-bottom: 8px; /* 从15px减少到8px */
}

.search-container {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-btn {
    background-color: #1e88e5;
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #1976d2;
}

/* 最新开奖结果区域 */
.latest-result-section {
    background-color: white;
    border-radius: 8px;
    padding: 8px; /* 从12px进一步减少到8px */
    margin-bottom: 8px; /* 从10px减少到8px */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.result-grid {
    display: flex;
    flex-direction: column;
}

@media (min-width: 600px) {
    .result-grid {
        flex-direction: row;
    }
    
    .number-grid {
        flex: 1;
        margin-right: 15px;
    }
    
    .result-info {
        flex: 1;
    }
}

/* 数字表格 */
.number-grid {
    margin-bottom: 6px; /* 从10px进一步减少到6px */
}

/* 网格头部 */
.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0; /* 从8px进一步减少到6px */
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 6px; /* 从8px减少到6px */
}

.grid-title {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

/* 切换按钮 */
.grid-toggle-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #1e88e5, #1976d2);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(30, 136, 229, 0.3);
}

.grid-toggle-btn:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 136, 229, 0.4);
}

.grid-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(30, 136, 229, 0.3);
}

.toggle-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
    line-height: 1;
}

.toggle-text {
    font-weight: 500;
    line-height: 1;
}

/* 图标旋转动画 */
.grid-toggle-btn.expanded .toggle-icon {
    transform: rotate(180deg);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
}

/* 收起状态 */
.grid-container.collapsed {
    max-height: 0;
    opacity: 0;
    transform: scaleY(0);
    margin-bottom: 0;
    padding: 0;
}

/* 展开状态 */
.grid-container.expanded {
    max-height: 500px; /* 足够容纳8行的高度 */
    opacity: 1;
    transform: scaleY(1);
    margin-bottom: 10px;
    padding: 0;
}

/* 移动端优化 */
@media (max-width: 600px) {
    .grid-container.expanded {
        max-height: 400px;
    }
    
    .grid-header {
        padding: 8px 0;
    }
    
    .grid-title {
        font-size: 14px;
    }
    
    .grid-toggle-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

.grid-number {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.3s;
}

.grid-number.odd {
    background-color: rgb(75, 122, 176);
    color: white;
}

.grid-number.even {
    background-color: rgb(177, 87, 87);
    color: white;
}

/* 期号信息和倒计时 */
.next-issue-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px; /* 从10px进一步减少到6px */
    padding: 6px; /* 从8px减少到6px */
    background-color: #f5f5f5;
    border-radius: 8px;
}

.issue-number {
    font-weight: bold;
    font-size: 16px;
}

.countdown {
    display: flex;
    align-items: center;
}

.countdown-text {
    margin-right: 5px;
    font-size: 14px;
}

.countdown-time {
    font-weight: bold;
    color: #1e88e5;
    font-size: 16px;
}

.countdown-time.drawing {
    color: #f44336;
}

/* 开奖结果显示区域 */
.result-display-area {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #e0e0e0;
}

.calculation-process {
    font-size: 12px;
    line-height: 1.4;
}

.calc-line {
    margin-bottom: 3px;
}

.result-display {
    font-weight: bold;
    margin-top: 5px;
}

.issue-info {
    font-size: 12px;
    margin-top: 2px;
    margin-bottom: 2px;
}

/* 彩票球样式 */
.lottery-balls {
    display: flex;
    justify-content: center;
    align-items: center; /* 垂直居中对齐 */
    gap: 8px; /* 减小间距以容纳符号 */
    margin-top: 0; /* 减少顶部间距 */
    margin-bottom: 5px; /* 增加底部间距 */
    padding-top: 0; /* 移除顶部内边距 */
}

.ball {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* 数学符号样式 */
.math-symbol {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
}

.normal-ball {
    background: linear-gradient(to bottom, rgb(75, 122, 176), rgb(55, 92, 136));
}

.sum-ball.red {
    background: linear-gradient(to bottom, #ff6b6b, #d32f2f);
}

.sum-ball.green {
    background: linear-gradient(to bottom, #66bb6a, #388e3c);
}

.sum-ball.blue {
    background: linear-gradient(to bottom, #42a5f5, #1976d2);
}

/* 在线人数 */
.online-users {
    background-color: white;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

#onlineCount {
    font-weight: bold;
    color: #f44336;
}

/* 历史开奖列表 */
.history-section {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 60px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.history-table th {
    background-color: #f5f5f5;
    padding: 10px 5px;
    text-align: center;
    font-weight: normal;
    color: #666;
}

.history-table td {
    padding: 10px 5px;
    text-align: center;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.history-balls {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.history-balls .ball {
    width: 20px;
    height: 20px;
    font-size: 10px;
}

.load-more {
    text-align: center;
    padding: 10px;
    color: #1e88e5;
    cursor: pointer;
    margin-top: 10px;
}

/* 底部导航 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.bottom-nav {
    max-width: 750px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
}

.bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    color: #666;
    font-size: 12px;
    border-radius: 0;
}

.bottom-nav .nav-item.active {
    color: #1e88e5;
    background-color: transparent;
    font-weight: bold;
}

/* 联系客服按钮 */
.contact-service {
    position: fixed;
    right: 15px;
    bottom: 70px;
    z-index: 99;
}

.service-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(30, 136, 229, 0.8);
    color: white;
    border: none;
    font-size: 12px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.service-btn:hover {
    background-color: rgba(30, 136, 229, 1);
    transform: scale(1.05);
}

/* 搜索结果弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    max-width: 90%;
    width: 600px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 15px;
    background-color: #1e88e5;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: normal;
}

.close {
    font-size: 24px;
    cursor: pointer;
    color: white;
}

.modal-body {
    padding: 15px;
}

.search-result-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
    margin-bottom: 15px;
}

.calculation-details {
    margin-bottom: 15px;
    font-size: 12px;
    line-height: 1.5;
}

.search-issue-info {
    font-size: 14px;
    margin-bottom: 10px;
}

.search-lottery-balls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

/* 数据分析样式 */
.analysis-section {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 60px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.analysis-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.analysis-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.analysis-table-container {
    overflow-x: auto;
}

.analysis-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.analysis-table th {
    background-color: #03a9f4;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: normal;
}

.analysis-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.analysis-table tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* 数据分析彩票球样式 */
.analysis-ball {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    margin: 0 auto;
}

.analysis-ball.red {
    background: linear-gradient(to bottom, #ff6b6b, #d32f2f);
}

.analysis-ball.green {
    background: linear-gradient(to bottom, #66bb6a, #388e3c);
}

.analysis-ball.blue {
    background: linear-gradient(to bottom, #42a5f5, #1976d2);
}

/* 数据分析间隔值样式 */
.interval-value {
    font-weight: bold;
}

.interval-value.highlight {
    color: #f44336;
}

/* 列表走势和露珠走势样式 */
.trend-section, .beads-section {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 60px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.trend-header, .beads-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.trend-title, .beads-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.trend-content, .beads-content {
    padding: 20px;
    color: #666;
}

/* 列表走势表格样式 */
.trend-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.trend-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    font-size: 12px;
    min-width: 100%;
}

.trend-table th {
    background-color: #1e88e5;
    color: white;
    padding: 8px 4px;
    text-align: center;
    font-weight: bold;
    font-size: 11px;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.trend-table th:last-child {
    border-right: none;
}

.trend-table td {
    padding: 6px 4px;
    text-align: center;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    vertical-align: middle;
    min-height: 35px;
}

.trend-table td:last-child {
    border-right: none;
}

.trend-table tr:hover {
    background-color: #f5f5f5;
}

/* 期号列样式 */
.trend-table .issue-cell {
    font-weight: bold;
    color: #333;
    font-size: 11px;
    background-color: #f8f9fa;
}

/* 彩票球样式 */
.lottery-ball {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    font-weight: bold;
    line-height: 22px;
    text-align: center;
    margin: 1px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 数值球颜色 - 根据用户要求的颜色规则 */
.lottery-ball.value-red {
    background: linear-gradient(to bottom, #ff6b6b, #d32f2f);
}

.lottery-ball.value-green {
    background: linear-gradient(to bottom, #66bb6a, #388e3c);
}

.lottery-ball.value-blue {
    background: linear-gradient(to bottom, #42a5f5, #1976d2);
}

/* 属性球样式 */
.lottery-ball.attr-red {
    background: linear-gradient(to bottom, #ff6b6b, #d32f2f);
}

.lottery-ball.attr-green {
    background: linear-gradient(to bottom, #66bb6a, #388e3c);
}

.lottery-ball.attr-blue {
    background: linear-gradient(to bottom, #42a5f5, #1976d2);
}

/* 组合属性球样式 */
.lottery-ball.combo-red {
    background: linear-gradient(to bottom, #ff6b6b, #d32f2f);
    font-size: 8px;
}

.lottery-ball.combo-green {
    background: linear-gradient(to bottom, #66bb6a, #388e3c);
    font-size: 8px;
}

.lottery-ball.combo-blue {
    background: linear-gradient(to bottom, #42a5f5, #1976d2);
    font-size: 8px;
}

/* 加载状态 */
.trend-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.loading-text {
    font-size: 14px;
}

/* 移动端优化 */
@media (max-width: 480px) {
    .trend-table {
        font-size: 10px;
    }
    
    .trend-table th {
        padding: 6px 2px;
        font-size: 9px;
    }
    
    .trend-table td {
        padding: 4px 2px;
    }
    
    .lottery-ball {
        width: 18px;
        height: 18px;
        line-height: 18px;
        font-size: 8px;
    }
    
    .lottery-ball.combo-red,
    .lottery-ball.combo-green,
    .lottery-ball.combo-blue {
        font-size: 7px;
    }
    
    .trend-table .issue-cell {
        font-size: 9px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .trend-table {
        font-size: 9px;
    }
    
    .trend-table th {
        padding: 4px 1px;
        font-size: 8px;
    }
    
    .trend-table td {
        padding: 3px 1px;
    }
    
    .lottery-ball {
        width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 7px;
    }
    
    .lottery-ball.combo-red,
    .lottery-ball.combo-green,
    .lottery-ball.combo-blue {
        font-size: 6px;
    }
}


/* 露珠走势样式 */
.beads-section {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 60px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.beads-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.beads-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.beads-tabs {
    display: flex;
    gap: 10px;
}

/* 统计显示样式 */
.stats-display {
    font-size: 10px;
    margin-left: 5px;
    opacity: 0.8;
}

.beads-tab {
    padding: 6px 12px;
    border-radius: 15px;
    background-color: #f5f5f5;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.beads-tab.active {
    background-color: #1e88e5;
    color: white;
}

.beads-content {
    padding: 0;
}

.beads-type-content {
    display: block;
}

/* 大路容器 */
.main-road-container {
    margin-bottom: 20px;
}

.road-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    text-align: center;
}

.main-road {
    border: none;
    padding: 5px;
    background-color: #fafafa;
    height: 180px; /* 6行 * 30px */
    display: grid;
    grid-template-columns: repeat(23, 1fr); /* 20列数据 + 3列预留 */
    grid-template-rows: repeat(6, 1fr); /* 固定6行 */
    gap: 2px;
    overflow: hidden; /* 不显示滚动条 */
    position: relative;
}

.main-road::-webkit-scrollbar {
    height: 6px;
}

.main-road::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.main-road::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.main-road::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 下三路容器 */
.sub-roads-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: space-between;
}

.sub-road {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    background-color: #fafafa;
    min-width: 0; /* 允许flex收缩 */
}

.road-grid {
    height: 100px; /* 6行 * 16px */
    display: grid;
    grid-template-columns: repeat(8, 1fr); /* 固定8列 */
    grid-template-rows: repeat(6, 1fr); /* 固定6行 */
    gap: 1px;
    overflow: hidden; /* 不显示滚动条 */
}

/* 路单元素样式 */
.road-cell {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%; /* 彩票球样式 */
    margin: 0;
    min-width: 20px;
    min-height: 25px;
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2), inset 0 1px 2px rgba(255,255,255,0.3);
}

.road-cell.big {
    background-color: #ff6b6b;
    color: white;
}

.road-cell.small {
    background-color: #42a5f5;
    color: white;
}

.road-cell.odd {
    background-color: #ff6b6b;
    color: white;
}

.road-cell.even {
    background-color: #42a5f5;
    color: white;
}

/* 下三路元素样式 */
.sub-road-cell {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sub-road-cell.red {
    background-color: #ff6b6b;
}

.sub-road-cell.blue {
    background-color: #42a5f5;
}

/* 大眼仔 - 空心圆 */
.sub-road-cell.big-eye {
    border: 2px solid;
    background-color: transparent;
    width: 12px;
    height: 12px;
}

.sub-road-cell.big-eye.red {
    border-color: #ff6b6b;
}

.sub-road-cell.big-eye.blue {
    border-color: #42a5f5;
}

/* 小路 - 实心圆 */
.sub-road-cell.small-road {
    background-color: currentColor;
    width: 10px;
    height: 10px;
}

.sub-road-cell.small-road.red {
    background-color: #ff6b6b;
}

.sub-road-cell.small-road.blue {
    background-color: #42a5f5;
}

/* 曱甴路 - 斜线 */
.sub-road-cell.cockroach {
    border-radius: 0;
    position: relative;
    background-color: transparent;
    width: 15px;
    height: 15px;
}

.sub-road-cell.cockroach::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background-color: currentColor;
    transform: translateY(-50%) rotate(45deg);
}

.sub-road-cell.cockroach.red {
    color: #ff6b6b;
}

.sub-road-cell.cockroach.blue {
    color: #42a5f5;
}

/* 数据汇总显示样式 */
.data-summary {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.summary-label {
    color: #666;
    font-weight: bold;
}

.summary-big, .summary-odd {
    color: #ff6b6b;
    font-weight: bold;
    background-color: rgba(255, 107, 107, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.summary-small, .summary-even {
    color: #42a5f5;
    font-weight: bold;
    background-color: rgba(66, 165, 245, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* 问路按钮容器 */
.ask-road-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.ask-road-btn {
    padding: 12px 20px;
    border: 2px solid;
    border-radius: 25px;
    background-color: transparent;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ask-road-btn .road-indicators {
    display: flex;
    gap: 3px;
    align-items: center;
}

.ask-road-btn .indicator {
    width: 8px;
    height: 8px;
    display: inline-block;
}

.ask-road-btn .indicator.big-eye {
    border: 1px solid currentColor;
    border-radius: 50%;
    background-color: transparent;
}

.ask-road-btn .indicator.small-road {
    border-radius: 50%;
    background-color: currentColor;
}

.ask-road-btn .indicator.cockroach {
    border-radius: 0;
    background-color: transparent;
    position: relative;
}

.ask-road-btn .indicator.cockroach::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: currentColor;
    transform: translateY(-50%) rotate(45deg);
}

.ask-road-btn[data-type="big"],
.ask-road-btn[data-type="odd"] {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.ask-road-btn[data-type="small"],
.ask-road-btn[data-type="even"] {
    border-color: #42a5f5;
    color: #42a5f5;
}

.ask-road-btn.active[data-type="big"],
.ask-road-btn.active[data-type="odd"] {
    background-color: rgba(255, 107, 107, 0.1);
    border-width: 3px;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.4), inset 0 0 20px rgba(255, 107, 107, 0.1);
    transform: scale(1.05);
}

.ask-road-btn.active[data-type="small"],
.ask-road-btn.active[data-type="even"] {
    background-color: rgba(66, 165, 245, 0.1);
    border-width: 3px;
    box-shadow: 0 0 10px rgba(66, 165, 245, 0.4), inset 0 0 20px rgba(66, 165, 245, 0.1);
    transform: scale(1.05);
}

/* 预测闪烁效果 */
.road-cell.prediction {
    animation: blink 1s infinite;
    opacity: 0.7;
}

@keyframes blink {
    0%, 50% { opacity: 0.7; }
    51%, 100% { opacity: 0.3; }
}

.sub-road-cell.prediction {
    animation: blink 1s infinite;
    opacity: 0.7;
}

/* 移动端优化 */
@media (max-width: 480px) {
    .sub-roads-container {
        display: flex;
        flex-direction: row;
        gap: 5px;
        margin-bottom: 15px;
        justify-content: space-between;
    }
    
    .sub-road {
        flex: 1;
        margin-bottom: 0;
        padding: 5px;
        min-width: 0;
    }
    
    .road-grid {
        height: 75px; /* 进一步减小高度 */
    }
    
    .main-road {
        height: 110px; /* 进一步减小高度 */
        padding: 2px;
        gap: 1px; /* 减小间距 */
    }
    
    .road-cell {
        font-size: 9px; /* 减小字体 */
        min-width: 12px; /* 减小最小宽度 */
        min-height: 15px; /* 减小最小高度 */
    }
    
    .sub-road-cell {
        width: 8px;
        height: 8px;
    }
    
    .sub-road-cell.big-eye {
        width: 6px;
        height: 6px;
    }
    
    .sub-road-cell.small-road {
        width: 5px;
        height: 5px;
    }
    
    .sub-road-cell.cockroach {
        width: 8px;
        height: 8px;
    }
    
    .ask-road-btn {
        padding: 5px 8px;
        font-size: 10px;
        min-width: 60px;
        gap: 2px;
        flex-direction: column;
    }
    
    .ask-road-btn .road-indicators {
        gap: 2px;
        margin-top: 2px;
    }
    
    .ask-road-btn .indicator {
        width: 6px;
        height: 6px;
    }
    
    .beads-tabs {
        gap: 6px;
    }
    
    .beads-tab {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .road-title {
        font-size: 11px;
        margin-bottom: 3px;
    }
    
    .ask-road-container {
        gap: 10px;
        margin-top: 15px;
    }
    
    .ask-road-btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 90px;
        gap: 6px;
    }
}

@media (max-width: 360px) {
    .sub-roads-container {
        gap: 2px;
    }
    
    .main-road {
        height: 90px; /* 超小屏幕进一步减小 */
        padding: 1px;
        gap: 1px;
    }
    
    .road-grid {
        height: 60px; /* 超小屏幕进一步减小 */
        padding: 1px;
        gap: 1px;
    }
    
    .road-cell {
        font-size: 8px; /* 进一步减小字体 */
        min-width: 10px; /* 进一步减小 */
        min-height: 12px; /* 进一步减小 */
    }
    
    .ask-road-btn {
        padding: 3px 6px;
        font-size: 9px;
        min-width: 50px;
    }
    
    .ask-road-btn .indicator {
        width: 4px;
        height: 4px;
    }
    
    .road-title {
        font-size: 10px;
    }
}


/* 计算过程颜色标记样式 */
.calc-group1 {
    background-color: #d32f2f !important;
    color: white !important;
}

.calc-group2 {
    background-color: #1976d2 !important;
    color: white !important;
}

.calc-group3 {
    background-color: #388e3c !important;
    color: white !important;
}

.calc-unused {
    background-color: #8799a3 !important;
    color: white !important;
}

.calc-line {
    margin: 5px 0;
    font-size: 11px;
}

.calc-line strong {
    font-weight: bold;
}


/* 问路按钮悬停效果 */
.ask-road-btn:hover[data-type="big"],
.ask-road-btn:hover[data-type="odd"] {
    background-color: rgba(255, 107, 107, 0.05);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.ask-road-btn:hover[data-type="small"],
.ask-road-btn:hover[data-type="even"] {
    background-color: rgba(66, 165, 245, 0.05);
    box-shadow: 0 2px 8px rgba(66, 165, 245, 0.2);
}

/* 确保指示器在激活状态下颜色正确显示 */
.ask-road-btn.active .indicator[data-color="red"] {
    color: #ff6b6b !important;
    border-color: #ff6b6b !important;
}

.ask-road-btn.active .indicator[data-color="blue"] {
    color: #42a5f5 !important;
    border-color: #42a5f5 !important;
}

.ask-road-btn.active .indicator.cockroach[data-color="red"]::before {
    background-color: #ff6b6b !important;
}

.ask-road-btn.active .indicator.cockroach[data-color="blue"]::before {
    background-color: #42a5f5 !important;
}


/* 刮奖功能样式 */
.scratch-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: pointer;
    border-radius: inherit;
    overflow: hidden;
}

.scratch-layer canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.scratch-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    pointer-events: none;
    z-index: 11;
    opacity: 0.6; /* 降低透明度 */
}

/* 刮奖容器样式 */
.scratch-container {
    position: relative;
    display: inline-block;
}

/* 历史记录表格刮奖样式 */
.history-table .scratch-cell {
    position: relative;
}

.history-table .scratch-cell .scratch-layer {
    border-radius: 4px;
}

.history-table .scratch-cell .scratch-hint {
    font-size: 12px;
}

/* 开奖结果区域刮奖样式 */
.result-display-area.scratch-container .scratch-layer {
    border-radius: 8px;
}

.result-display-area.scratch-container .scratch-hint {
    font-size: 16px;
    color: #333;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .scratch-hint {
        font-size: 12px;
    }
    
    .result-display-area.scratch-container .scratch-hint {
        font-size: 14px;
    }
    
    .history-table .scratch-cell .scratch-hint {
        font-size: 10px;
    }
    
    /* 移动端刮奖笔刷大小调整 */
    .scratch-layer canvas {
        touch-action: none;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .scratch-layer {
        cursor: default;
    }
    
    /* 增加触摸区域 */
    .scratch-layer {
        padding: 2px;
        margin: -2px;
    }
}

/* 刮奖动画效果 */
.scratch-layer {
    transition: opacity 0.5s ease-out;
}

.scratch-layer.revealing {
    opacity: 0;
}

/* 刮奖完成后的高亮效果 */
.scratch-revealed {
    animation: scratchReveal 0.8s ease-out;
}

@keyframes scratchReveal {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 215, 0, 0);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 215, 0, 0);
    }
}

