/* 导航栏样式 */
nav {
    background: #FF6B35;
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.nav-links .logo {
    width: 32px;
    height: 32px;
    margin-right: 1rem;
    float: left;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #db3434;
}

/* 主体内容 */
main {
    margin-top: 80px;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 标题和按钮行样式 */
.title-btn-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* 球样式 */
.ball {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    margin-right: 5px;
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
}

.pl-ball {
    background-color: #503ce7;
}

.qlc-ball {
    background-color: #503ce7;
    color: white;
    /* 其他样式 */
}

.red-ball {
    background-color: #e74c3c;
}

.blue-ball {
    background-color: #3498db;
}

/* 修改ssq.html表格中的球样式 */
#results-table .ball {
    width: 28px;
    height: 28px;
    line-height: 28px;
    font-size: 14px;
    margin-right: 3px;
    margin-bottom: 3px;
}

#results-table .red-ball {
    background-color: #e74c3c;
}

#results-table .blue-ball {
    background-color: #3498db;
}

.kl8-ball {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    margin-right: 5px;
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
    background-color: #3498db;
}

.kl8-ball.consecutive {
    background-color: #e74c3c;
}

.fc3d-ball {
    background-color: #3c56e7;
}
/* 快乐8球分组颜色 */
.kl8-ball.group-0 { background-color: #FF0000; }
.kl8-ball.group-1 { background-color: #FF7F00; }
.kl8-ball.group-2 { background-color: #FFD700; }
.kl8-ball.group-3 { background-color: #00FF00; }
.kl8-ball.group-4 { background-color: #0000FF; }
.kl8-ball.group-5 { background-color: #4B0082; }
.kl8-ball.group-6 { background-color: #9400D3; }
.kl8-ball.group-7 { background-color: #FF1493; }
.kl8-ball.group-8 { background-color: #00FFFF; }
.kl8-ball.group-9 { background-color: #FF00FF; }

.pl-ball {
    background-color: #503ce7;
}

.pl-ball:nth-child(1),
.pl-ball:nth-child(2), 
.pl-ball:nth-child(3) {
    background-color: #e74c3c;
}
/* 快乐8金字塔布局样式 */
.kl8-pyramid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.kl8-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kl8-label {
    min-width: 50px;
    font-weight: bold;
}

.lottery-results {
    margin: 1rem 0;
}

.lottery-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.results-container {
    display: grid;
    gap: 1rem;
}

.number-spacer {
    display: inline-block;
    width: 20px;
    text-align: center;
}
/* 表格基础样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.pagination button {
    padding: 0.6rem 1.2rem;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.pagination button.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* 搜索框和行数选择器样式 */
.search-and-rows {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.rows-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    float: right;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

#period-search {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
}

#search-btn, #reset-btn, .regenerate-btn {
    padding: 0.6rem 1.2rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#search-btn:hover, #reset-btn:hover, .regenerate-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#trend-chart-btn{
    padding: 0.6rem 1.2rem;
    background: #db3434;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#trend-chart-btn:hover {
    background: #c12b2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.rows-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

select {
    padding: 0.5rem;
}

.download-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.back-to-top {
    position: fixed;
    bottom: -100px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background-color: #3498db;
    color: white;
    font-size: 24px;
    text-align: center;
    line-height: 50px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: none;
  }
  
  .back-to-top.show {
    opacity: 1;
    visibility: visible;
    bottom: 20px;
  }
  
.back-to-top.fly-out {
    transform: translateY(-100vh);
    transition: all 0.5s ease;
  }
  
  .back-to-top:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
