/* 全局样式 */
body {
    background-color: #f8f9fa;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(84, 159, 213, 0.1);
    padding: 0.05rem 0.1rem;
    min-height: 20px;
    margin-bottom: 8px !important;
}

.navbar-custom {
    background-color: #00008B; /* 深蓝色 */
  }
.navbar-nav .nav-link {
    padding: 0.05rem 0.1rem;
    font-size: 0.8rem;
}

.navbar-brand {
    font-weight: bold;
    font-size: 0.9rem;
    padding: 0;
    margin: 0;
}

.navbar-nav {
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.navbar-nav .nav-item {
    margin: 0 0.25rem;
}

/* 主要内容区域 */
.container {
    flex: 1;
    padding: 1rem 0;
    margin-top: -0.5rem;
}

/* 按钮样式 */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-primary.active {
    background-color: #0a58ca;
    border-color: #094cba;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}

.btn-group {
    width: 100%;
    display: flex;
    justify-content: center;
}

.btn-group .btn {
    flex: 1;
    max-width: 200px;
    margin: 0 5px;
}

/* 使用更具体的选择器提高优先级 */
div.latest-result {
    border: 2px solid #007bff !important; 
    margin: 15px;
    padding: 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 添加过渡效果观察变化 */
div.latest-result {
    transition: border-color 0.3s ease;
}

h4 {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.latest-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.latest-info span {
    font-size: 0.9rem;
    color: #666;
}

/* 页脚样式 */
footer {
    background-color: #343a40;
    color: white;
    padding: 1rem 0;
    margin-top: auto;
}

/* 波色样式 */
.wave-blue {
    background-color: #007bff;
    color: white;
    padding: 4px 4px;
    margin: 0 4px;
    border-radius: 4px;
    display: inline-block;
}

.wave-green {
    background-color: #28a745;
    color: white;
    padding: 4px 4px;
    margin: 0 4px;
    border-radius: 4px;
    display: inline-block;
}

.wave-red {
    background-color: #dc3545;
    color: white;
    padding: 4px 4px;
    margin: 0 4px;
    border-radius: 4px;
    display: inline-block;
}

.wave-bak {
    background-color: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* 表格样式 */
.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th {
    text-align: center;
    padding: 8px;
}

.history-table th:nth-child(1) {
    text-align: right;
}

.table-header th {
    border-bottom: none;
}

@media (max-width: 768px) {
    .table-header th {
        padding: 4px;
        font-size: 0.9rem;
    }
}

.history-table td {
    padding: 0;
    text-align: center;
}

.history-table td:nth-child(2) {
    text-align: left;
}

.history-table th:nth-child(1) {
    width: 80px; /* 期号列固定宽度 */
}

/* 号码和生肖对齐样式 */
.number-row, .zodiac-row {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.number-row span, .zodiac-row span {
    flex: 0 0 auto;
    text-align: center;
    margin: 0 2px;
    padding: 4px 8px;
    min-width: 36px;
    box-sizing: border-box;
    display: inline-block;
}

.number-row span {
    padding: 4px 8px;
    border-radius: 4px;
}

.zodiac-row {
    margin-top: 5px;
}

.red-text {
    color: #dc3545;
    font-weight: bold;
}

.small-text {
    font-size: 0.8em;
    color: #666;
    line-height: 1;
}

.section-divider {
    border: 0;
    height: 1px;
    background: #999;
    margin: 0;
}

/* 新样式 */
.history_list {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.fenceng {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.left_info {
    font-weight: bold;
    color: #333;
}

.right_info {
    text-align: right;
}

.btn_video {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.open_code_zone_left-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.open_code_zone_left-item {
    text-align: center;
}

.open_code_zone_left-item-number {
    padding: 0.5rem;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.open_code_zone_left-item-zodiac {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: #666;
}

/* 倒计时样式 */
#countdown-timer {
    font-size: 40px;
    font-weight: bold;
    text-align: center;
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#countdown-timer span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0 4px;
    border: 2px solid #ccc;
    border-radius: 8px;
    background-color: #f8f9fa;
    height: 60px;
    width: 40px;
    text-align: center;
    font-size: 32px;
}

#countdown-timer span.colon {
    border: none;
    background: none;
    margin: 0 2px;
    padding: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .fenceng {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .right_info {
        width: 100%;
        margin-top: 0.5rem;
    }
    .navbar {
        margin-bottom: 4px !important;
    }
    .ad-banner {
        margin-top: -2px;
    }
}

.site-title {
    font-family: 'Microsoft YaHei', sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    padding: 10px 0;
}

.ad-banner {
    margin-top: -4px;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ad-banner img {
    transition: transform 0.3s ease;
}

.ad-banner:hover img {
    transform: scale(1.02);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .ad-banner {
        display: flex !important;
        justify-content: center;
        margin: 0;
    }
    
    .ad-banner img {
        width: 100% !important;
        max-width: none;
        border-radius: 8px;
    }
}

/* 添加模态框样式 */
#imageModal .modal-content {
    background-color: rgba(0, 0, 0, 0.9);
    transition: opacity 0.3s;
}

#imageModal img {
    border: 2px solid #FFD700;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

@media (max-width: 768px) {
    #imageModal img {
        max-width: 95%;
    }
}
