/**
 * 特殊页面样式 - 用于历史记录、全部图片、资料详情、资料大全页面
 * 功能：隐藏底部导航栏，添加左上角返回按钮（仅手机端显示）
 */

/* 在特殊页面中隐藏底部导航栏 */
body.special-page .bottom-nav-bar {
    display: none !important;
}

/* 取消底部填充空间，因为底部导航栏已被隐藏 */
body.special-page {
    padding-bottom: 0 !important;
}

body.special-page .site-content {
    min-height: 100vh !important;
    padding-bottom: 0 !important;
}

/* 左上角返回按钮样式 */
.mobile-back-button {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.mobile-back-button:hover {
    background: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.mobile-back-button svg {
    width: 24px;
    height: 24px;
    stroke: #333;
}

/* 默认在所有设备上隐藏返回按钮 */
.mobile-back-button {
    display: none;
}

/* 只在移动设备上显示返回按钮 */
@media (max-width: 768px) {
    .mobile-back-button {
        display: flex;
    }
    
    /* 为返回按钮腾出空间，移动标题 */
    body.special-page .lottery-header h1,
    body.special-page .lottery-header h2,
    body.special-page .material-header h1 {
        margin-left: 40px;
    }

    /* 手机端特殊页面隐藏 header（logo等） */
    body.special-page header,
    body.special-page .site-header {
        display: none !important;
    }
    /* 顶部栏样式，模仿App */
    body.special-page .lottery-header,
    body.special-page .material-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 50px;
        background: #fff;
        z-index: 200;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        border-bottom: 1px solid #eee;
        padding: 0;
    }
    body.special-page .site-content {
        padding-top: 50px !important;
    }
    /* 标题居中，返回按钮绝对定位左侧 */
    body.special-page .lottery-header .page-title,
    body.special-page .material-header .material-title {
        flex: 1;
        text-align: center;
        font-size: 18px;
        font-weight: bold;
        margin: 0;
        padding: 0 40px;
        line-height: 50px;
    }
    .mobile-back-button {
        position: absolute;
        left: 10px;
        top: 8px;
        width: 34px;
        height: 34px;
        background: #f5f5f5;
        box-shadow: none;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        display: flex;
        border: none;
        z-index: 201;
    }
    .bottom-nav-bar {
        height: 44px !important;
        min-height: 44px !important;
    }
   .bottom-nav-item {
    /*    padding: 2px 0 0 0 !important;*/
        font-size: 12px !important;
    }
    .bottom-nav-item .nav-icon {
        font-size: 20px !important;
        margin-bottom: 0 !important;
        line-height: 1;
    }
    .bottom-nav-item .nav-label {
        font-size: 12px !important;
        line-height: 1;
        margin-top: 0 !important;
    }
}

/* 主页自定义顶部栏样式，仅手机端 */
@media (max-width: 768px) {
    body.special-page-home header,
    body.special-page-home .site-header {
        display: none !important;
    }
    body.special-page-home .custom-app-header {
        /*position: fixed;*/
        top: 0;
        left: 0;
        width: 100vw;
        height: 50px;
        background: #ffffffce;
        z-index: 200;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        border-bottom: 1px solid #eee;
        padding: 0;
    }
    body.special-page-home .custom-app-title {
        flex: 1;
        text-align: center;
        font-size: 18px;
        font-weight: bold;
        margin: 0;
        padding: 0 40px;
        line-height: 50px;
    }
    body.special-page-home .site-content {
        padding-top: 0px !important;
    }
}

/* 顶部标题栏高度优化，首页和其他页面统一，仅手机端 */
@media (max-width: 768px) {
    body.special-page-home .custom-app-header,
    body.special-page .lottery-header,
    body.special-page .material-header {
        height: 44px !important;
        /*min-height: 44px !important;*/
        max-height: 36px !important;
        line-height: 44px !important;
        padding: 0 !important;
    }
    body.special-page-home .custom-app-title,
    body.special-page .lottery-header .page-title,
    body.special-page .material-header .material-title {
        font-size: 16px !important;
        line-height: 44px !important;
        padding: 0 36px !important;
        margin: 0 !important;
        font-weight: bold;
        text-align: center;
    }
    .mobile-back-button {
        width: 32px !important;
        height: 32px !important;
        top: 2px !important;
        left: 8px !important;
        padding: 0 !important;
    }
}

:root {
    --primary-color: #3976cb;
    --nav-bg: rgba(255,255,255,0.98);
    --nav-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --nav-radius: 18px;
    --nav-active: #3976cb;
    --nav-inactive: #888;
}

/* 顶部标题栏美化 */
@media (max-width: 768px) {
    body.special-page-home .custom-app-header,
    body.special-page .lottery-header,
    body.special-page .material-header {
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        border-bottom: 1.5px solid #e3e8ee;
        /*position: fixed;*/
        left: 0;
        top: 0;
        width: 100vw;
        z-index: 200;
    }
    body.special-page-home .custom-app-title,
    body.special-page .lottery-header .page-title,
    body.special-page .material-header .material-title {
        color: #222;
        font-size: 18px !important;
        font-weight: 700;
        letter-spacing: 1px;
        text-shadow: 0 1px 0 #fff;
    }
    .mobile-back-button {
        background: #f3f6fa;
        border: 1px solid #e3e8ee;
        box-shadow: 0 1px 4px rgba(0,0,0,0.04);
        transition: background 0.2s, box-shadow 0.2s;
    }
    .mobile-back-button:active,
    .mobile-back-button:hover {
        background: #eaf1fb;
        box-shadow: 0 2px 8px rgba(57,118,203,0.08);
    }
}

/* 底部导航栏美化 */
@media (max-width: 768px) {
    .bottom-nav-bar {
        background: var(--nav-bg) !important;
        box-shadow: var(--nav-shadow) !important;
        border-radius: var(--nav-radius) var(--nav-radius) 0 0 !important;
        border-top: 1.5px solid #e3e8ee !important;
        height: 44px !important;
        min-height: 44px !important;
        /*margin-bottom: 4px;*/ 
        /*width: calc(100% - 16px) !important;*/ 
        /*left: 8px !important;*/ 
        right: 8px !important;
        max-width: 500px;
    }
    .bottom-nav-item {
        color: var(--nav-inactive) !important;
        font-size: 13px !important;
        padding: 2px 0 0 0 !important;
        background: transparent !important;
        border-radius: 12px !important;
        margin: 0 2px;
        transition: background 0.2s, color 0.2s;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
    }
    .bottom-nav-item.active {
        color: var(--nav-active) !important;
        background: #eaf1fb !important;
        font-weight: 700;
        box-shadow: 0 2px 8px rgba(57,118,203,0.08);
    }
    .bottom-nav-item .nav-icon {
        font-size: 20px !important;
        margin-bottom: 0 !important;
        line-height: 1;
        display: block;
    }
    .bottom-nav-item .nav-label {
        font-size: 12px !important;
        line-height: 1;
        margin-top: 0 !important;
        letter-spacing: 0.5px;
    }
}

/**
 * 特殊页面公共CSS样式
 */

/* 特殊页面基础样式 */
.special-page {
    background-color: #f8f9fa;
}

.site-content {
    padding-top: 15px;
    padding-bottom: 30px;
}

/* 移动端标题栏适配 */
.mobile-hidden {
    display: none !important;
}

.mobile-header {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
}

.mobile-title {
    font-size: 18px;
    text-align: center;
}

/* 统一背景样式 */
.missing-numbers-section, 
.missing-distribution-container, 
.missing-trends-section,
.hot-numbers-section,
.latest-draw-info,
.range-missing, 
.odd-even-missing,
.top-missing-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 通用号码球样式 */
.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;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150%;
}

/* 确保带有前缀后缀的号码球有足够的下边距 */
.history-lottery-item-ball {
    margin-bottom: 16px !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .lottery-header {
        padding: 10px 0;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .mobile-back-button svg {
        width: 20px;
        height: 20px;
    }
    
    .lottery-tab {
        padding: 10px 8px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .site-content {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .missing-numbers-section, 
    .missing-distribution-container, 
    .missing-trends-section,
    .hot-numbers-section {
        padding: 15px;
    }
} 