/* =========================================================
   PC28 DATA
   移动端样式
   ========================================================= */

@media (max-width: 768px) {

    /* =====================================================
       基础
       ===================================================== */

    body {
        font-size: 14px;
        overflow-x: hidden;
    }

    #app {
        width: 100%;
        overflow-x: hidden;
    }

    /* =====================================================
       顶部导航
       ===================================================== */

    .top-navbar {
        height: 58px;
    }

    .navbar-inner {
        width: 100%;
        padding: 0 15px;
    }

    .brand {
        gap: 8px;
    }

    .brand-icon {
        width: 34px;
        height: 34px;

        border-radius: 9px;

        font-size: 13px;
    }

    .brand-text strong {
        font-size: 14px;
    }

    .brand-text small {
        font-size: 9px;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }

    /* =====================================================
       移动展开菜单
       ===================================================== */

    .mobile-menu {
        position: fixed;

        top: 58px;
        left: 0;
        right: 0;

        z-index: 90;

        display: none;

        padding: 10px 14px;

        background: var(--surface);

        border-bottom: 1px solid var(--border);

        box-shadow: var(--shadow);
    }

    .mobile-menu.show {
        display: block;
    }

    .mobile-menu a {
        min-height: 48px;

        padding: 0 12px;

        display: flex;
        align-items: center;

        gap: 12px;

        border-radius: 9px;

        color: var(--text-secondary);

        font-size: 14px;
        font-weight: 600;
    }

    .mobile-menu a.active {
        background: var(--primary-soft);
        color: var(--primary);
    }

    .mobile-menu a span:first-child {
        width: 22px;

        text-align: center;

        font-size: 17px;
    }

    /* =====================================================
       主内容
       ===================================================== */

    .main-content {
        width: 100%;

        padding:
            18px
            0
            82px;
    }

    .main-content > * {
        margin-left: 14px;
        margin-right: 14px;
    }

    /* =====================================================
       页面标题
       ===================================================== */

    .page-header {
        margin-bottom: 16px;
    }

    .page-title {
        font-size: 22px;
    }

    .page-subtitle {
        margin-top: 5px;

        font-size: 12px;

        line-height: 1.5;
    }

    /* =====================================================
       卡片
       ===================================================== */

    .card {
        border-radius: 13px;
    }

    .card + .card {
        margin-top: 12px;
    }

    .card-header {
        padding: 15px;
    }

    .card-title {
        font-size: 15px;
    }

    .card-body {
        padding: 15px;
    }

    /* =====================================================
       最新开奖
       ===================================================== */

    .latest-card .card-body {
        padding: 18px 15px;
    }

    .latest-top {
        align-items: flex-start;
    }

    .latest-issue {
        font-size: 18px;
    }

    .latest-numbers {
        margin-top: 20px;

        gap: 9px;
    }

    .number-ball {
        width: 48px;
        height: 48px;

        font-size: 18px;
    }

    .latest-sum {
        margin-top: 14px;

        font-size: 26px;
    }

    /* =====================================================
       统计网格
       ===================================================== */

    .stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-label {
        font-size: 11px;
    }

    .stat-value {
        margin-top: 5px;

        font-size: 21px;
    }

    .stat-extra {
        font-size: 10px;
    }

    /* =====================================================
       分析摘要
       ===================================================== */

    .analysis-summary {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 9px;
    }

    .analysis-item {
        padding: 13px;
    }

    .analysis-item-label {
        font-size: 11px;
    }

    .analysis-item-value {
        margin-top: 5px;

        font-size: 17px;

        gap: 5px;
    }

    .analysis-item-percent {
        font-size: 10px;
    }

    /* =====================================================
       概率
       ===================================================== */

    .probability {
        margin-top: 8px;
    }

    .probability-head {
        font-size: 11px;
    }

    .probability-track {
        height: 6px;
    }

    /* =====================================================
       图表
       ===================================================== */

    .chart-container {
        min-height: 230px;
    }

    /* =====================================================
       Tabs
       ===================================================== */

    .tabs {
        margin-bottom: 12px;

        overflow-x: auto;

        scrollbar-width: none;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab {
        flex: 0 0 auto;

        min-width: 76px;

        min-height: 36px;

        padding: 0 12px;

        font-size: 12px;
    }

    /* =====================================================
       数据 Chips
       ===================================================== */

    .data-chips {
        margin-bottom: 12px;

        gap: 7px;
    }

    .data-chip {
        padding: 6px 11px;

        font-size: 11px;
    }

    /* =====================================================
       表格
       ===================================================== */

    .table-wrap {
        margin-left: -15px;
        margin-right: -15px;

        width: calc(100% + 30px);
    }

    .data-table {
        min-width: 620px;
    }

    .data-table th {
        padding: 11px 12px;

        font-size: 11px;
    }

    .data-table td {
        padding: 12px;

        font-size: 12px;
    }

    /* =====================================================
       数字
       ===================================================== */

    .draw-numbers {
        gap: 4px;
    }

    .draw-number {
        width: 26px;
        height: 26px;

        font-size: 11px;
    }

    /* =====================================================
       筛选器
       ===================================================== */

    .filter-bar {
        align-items: stretch;

        flex-direction: column;

        gap: 8px;
    }

    .filter-group {
        width: 100%;
    }

    .filter-label {
        min-width: 52px;
    }

    .form-control {
        flex: 1;

        width: 100%;

        height: 38px;
    }

    .filter-bar .btn {
        width: 100%;
    }

    /* =====================================================
       按钮
       ===================================================== */

    .btn {
        min-height: 40px;

        padding: 0 14px;

        font-size: 13px;
    }

    /* =====================================================
       回测
       ===================================================== */

    .backtest-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 9px;
    }

    .backtest-item {
        padding: 14px;
    }

    .backtest-label {
        font-size: 11px;
    }

    .backtest-value {
        margin-top: 5px;

        font-size: 20px;
    }

    .backtest-description {
        font-size: 10px;
    }

    /* =====================================================
       Alert
       ===================================================== */

    .alert {
        padding: 11px 12px;

        font-size: 12px;
    }

    /* =====================================================
       Empty State
       ===================================================== */

    .empty-state {
        padding: 45px 15px;
    }

    .empty-icon {
        width: 48px;
        height: 48px;

        margin-bottom: 11px;
    }

    .empty-title {
        font-size: 14px;
    }

    .empty-description {
        font-size: 11px;
    }

    /* =====================================================
       Badge
       ===================================================== */

    .badge {
        min-height: 24px;

        padding: 0 8px;

        font-size: 10px;
    }

    /* =====================================================
       Footer
       ===================================================== */

    .site-footer {
        margin-bottom: 60px;
    }

    .footer-inner {
        width: 100%;

        padding: 22px 15px 28px;
    }

    .footer-brand {
        font-size: 13px;
    }

    .footer-desc {
        font-size: 11px;
    }

    .footer-meta,
    .footer-disclaimer {
        font-size: 10px;
    }

    /* =====================================================
       底部导航
       ===================================================== */

    .bottom-nav {
        position: fixed;

        left: 0;
        right: 0;
        bottom: 0;

        z-index: 100;

        height: 62px;

        padding:
            5px
            6px
            calc(5px + env(safe-area-inset-bottom));

        display: flex;
        align-items: stretch;
        justify-content: space-around;

        background: rgba(255, 255, 255, 0.97);

        border-top: 1px solid var(--border);

        box-shadow:
            0 -3px 15px
            rgba(15, 23, 42, 0.06);

        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .bottom-nav a {
        flex: 1;

        max-width: 100px;

        min-width: 54px;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        gap: 2px;

        color: var(--text-muted);

        border-radius: 9px;

        font-size: 10px;
        font-weight: 600;

        transition: var(--transition);
    }

    .bottom-nav a.active {
        color: var(--primary);
    }

    .bottom-nav-icon {
        height: 24px;

        display: flex;
        align-items: center;
        justify-content: center;

        font-size: 18px;

        line-height: 1;
    }

    /* =====================================================
       暗色模式
       ===================================================== */

    [data-theme="dark"] .bottom-nav {
        background: rgba(17, 24, 39, 0.97);

        box-shadow:
            0 -3px 15px
            rgba(0, 0, 0, 0.25);
    }

    /* =====================================================
       防止移动端内容被长数字撑开
       ===================================================== */

    .page-title,
    .page-subtitle,
    .card-title,
    .card-subtitle,
    .analysis-item,
    .stat-card,
    .backtest-item {
        overflow-wrap: anywhere;
    }
}


/* =========================================================
   小屏手机
   ========================================================= */

@media (max-width: 390px) {

    .navbar-inner {
        padding: 0 12px;
    }

    .brand-text small {
        display: none;
    }

    .main-content {
        padding-top: 15px;
    }

    .main-content > * {
        margin-left: 10px;
        margin-right: 10px;
    }

    .latest-card .card-body {
        padding: 16px 12px;
    }

    .number-ball {
        width: 44px;
        height: 44px;

        font-size: 17px;
    }

    .analysis-summary {
        gap: 7px;
    }

    .analysis-item {
        padding: 11px;
    }

    .analysis-item-value {
        font-size: 16px;
    }

    .backtest-grid {
        gap: 7px;
    }

    .backtest-item {
        padding: 12px;
    }

    .backtest-value {
        font-size: 18px;
    }
}


/* =========================================================
   横屏手机
   ========================================================= */

@media (
    max-width: 900px
) and (
    orientation: landscape
) {

    .bottom-nav {
        height: 54px;
    }

    .main-content {
        padding-bottom: 70px;
    }

    .latest-numbers {
        margin-top: 14px;
    }

    .chart-container {
        min-height: 260px;
    }
}