/**
 * 热门号码页面样式
 */

/* 页面整体布局 */
.lottery-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border-radius: 8px;
}

/* 期数选择器样式 */
.period-selector-form {
    margin-bottom: 25px;
    text-align: center;
}

.period-selector-container {
    display: inline-flex;
    align-items: center;
    background-color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.period-selector-container label {
    font-weight: bold;
    margin-right: 12px;
    color: #333;
}

.custom-select-wrapper {
    position: relative;
    display: inline-block;
}

.custom-select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 8px 35px 8px 15px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 150px;
}

.custom-select-wrapper select:hover,
.custom-select-wrapper select:focus {
    background-color: #e9e9e9;
    border-color: #ccc;
    outline: none;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.custom-select-wrapper.focused {
    transform: translateY(-1px);
}

.custom-select-wrapper.focused .select-arrow {
    color: #e74c3c;
}

.select-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 16px;
    height: 16px;
    color: #666;
    transition: color 0.3s;
}

.select-arrow svg {
    transition: transform 0.3s;
}

.custom-select-wrapper:hover .select-arrow svg {
    transform: translateY(2px);
}

/* 移动端适配 */
@media (max-width: 480px) {
    .period-selector-container {
        flex-direction: column;
        align-items: stretch;
        padding: 8px 12px;
    }
    
    .period-selector-container label {
        margin-right: 0;
        margin-bottom: 8px;
        text-align: left;
    }
    
    .custom-select-wrapper select {
        width: 100%;
        padding: 8px 30px 8px 10px;
        font-size: 14px;
    }
}

.mobile-back-button {
    display: none;
    border: none;
    background: transparent;
    padding: 5px;
    margin-right: 10px;
    cursor: pointer;
}

.mobile-back-button svg {
    width: 24px;
    height: 24px;
    color: #333;
}

.page-title {
    margin: 0;
    font-size: 1.5rem;
    text-align: center;
    flex-grow: 1;
}

/* 彩票类型选择器 */
.lottery-type-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.lottery-tab {
    border: none;
    background-color: #f5f5f5;
    padding: 10px 20px;
    margin: 0 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.lottery-tab.active {
    background-color: #e74c3c;
    color: white;
}

/* 热门号码容器样式 */
.hot-numbers-container {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 图表样式优化 */
.hot-numbers-chart-container {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* 热门号码球样式 */
.hot-number-ball {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: #e74c3c;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 16px; /* 为前缀后缀留出空间 */
    position: relative;
}

.hot-number-ball.special {
    background-color: #3498db;
}

/* 最近开奖记录球样式 */
.recent-lottery-ball {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    background-color: #e74c3c;
    color: #fff;
    font-weight: bold;
    font-size: 13px;
    position: relative;
    margin-bottom: 16px; /* 为前缀后缀留出空间 */
}

.recent-lottery-ball.special {
    background-color: #3498db;
}

/* 自定义背景支持 */
.hot-number-ball.custom-bg,
.recent-lottery-ball.custom-bg {
    background-color: transparent !important; 
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    color: inherit !important;
    text-shadow: none !important;
}

/* 确保内部文字颜色能正确显示 */
.hot-number-ball.custom-bg span,
.recent-lottery-ball.custom-bg span {
    position: relative;
    z-index: 2;
    color: inherit !important;
}

/* 前缀后缀样式 */
.ball-prefix-suffix {
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    white-space: nowrap;
    color: #333;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.2;
    z-index: 5;
}

/* 响应式优化 */
@media (max-width: 767px) {
    .mobile-back-button {
        display: block;
    }
    
    .lottery-header {
        padding: 10px;
    }
    
    .page-title {
        font-size: 1.2rem;
    }
    
    .lottery-tab {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .hot-number-ball {
        width: 36px;
        height: 36px;
        line-height: 36px;
        font-size: 14px;
    }
    
    .recent-lottery-ball {
        width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .hot-number-ball {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 13px;
    }
    
    .recent-lottery-ball {
        width: 22px;
        height: 22px;
        line-height: 22px;
        font-size: 11px;
    }
}

/* 动画效果 */
.hot-number-ball.fix-applied,
.recent-lottery-ball.fix-applied {
    transition: transform 0.2s, box-shadow 0.2s;
}

.hot-number-ball.fix-applied:hover,
.recent-lottery-ball.fix-applied:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
} 