/* 苹果风格的特码统计分析网站样式 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根变量定义 */
:root {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;
    --background-color: #F2F2F7;
    --card-background: #FFFFFF;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --border-color: #E5E5E7;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --border-radius-small: 8px;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 基础样式 */
body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

/* 顶部导航栏 */
.header {
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.logo-text {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.logo-subtitle {
    color: #b0b0b0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    margin-top: 2px;
}

.header-info {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 主要内容区域 - 已移动到新位置 */

/* 统计概览卡片 */
.stats-overview {
    margin-bottom: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.stat-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius-small);
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

/* 搜索区域 */
.search-section {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.search-container {
    display: flex;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.search-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.search-input {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 16px;
    background: var(--card-background);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.search-btn, .clear-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn {
    background: var(--primary-color);
    color: white;
}

.search-btn:hover {
    background: #0056CC;
    transform: translateY(-1px);
}

.clear-btn {
    background: var(--background-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.clear-btn:hover {
    background: #E5E5E7;
}

/* 频率分析区域 */
.frequency-analysis {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

/* 五行分析区域 */
.element-analysis {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.element-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.element-item {
    background: var(--background-color);
    border-radius: var(--border-radius-small);
    padding: 20px 16px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.element-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.element-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.element-count {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.element-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.element-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.section-desc {
    font-size: 13px;
    color: var(--text-secondary, #666);
    margin: -6px 0 14px 0;
    line-height: 1.4;
}

.frequency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.frequency-item {
    background: var(--background-color);
    border-radius: var(--border-radius-small);
    padding: 16px 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.frequency-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.frequency-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.frequency-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.frequency-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.frequency-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

/* 历史记录表格 */
.history-section {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius-small);
    border: 1px solid var(--border-color);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.history-table th,
.history-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.history-table th {
    background: var(--background-color);
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 0;
}

.history-table tbody tr:hover {
    background: var(--background-color);
}

.history-table td {
    color: var(--text-primary);
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: var(--card-background);
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.pagination button:hover {
    background: var(--background-color);
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.loading-spinner p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* 错误提示 */
.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
    text-align: center;
    z-index: 1001;
}

.error-icon {
    width: 48px;
    height: 48px;
    color: var(--danger-color);
    margin-bottom: 16px;
}

.error-content p {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 16px;
}

.retry-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #0056CC;
}

/* 全局错误条（首页等） */
.global-error-box {
    margin: 0 16px 12px;
    padding: 12px 16px;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.35);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
}
.global-error-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.global-error-icon { color: var(--danger-color); font-size: 1.2em; }
.global-error-text { flex: 1; min-width: 180px; margin: 0; font-size: 14px; }
.global-error-retry {
    min-height: 44px;
    min-width: 88px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 15px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.global-error-retry:hover { opacity: 0.9; }
.global-error-retry:active { transform: scale(0.98); }

/* 响应式设计 */
@media (max-width: 1024px) {
    .header-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .main-content {
        padding: 12px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .search-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .search-group {
        width: 100%;
    }
    
    .frequency-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .history-table {
        font-size: 12px;
    }
    
    .history-table th,
    .history-table td {
        padding: 6px 4px;
    }
    
    .statistics-section {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .statistics-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
        padding: 0 8px;
    }
    
    .stat-item {
        padding: 12px 10px;
        border-radius: 10px;
        min-height: 80px;
    }
    
    .stat-missing {
        top: 6px;
        right: 8px;
        font-size: 14px;
    }
    
    .stat-name {
        font-size: 14px;
        margin-bottom: 6px;
        margin-top: 4px;
    }
    
    .stat-count {
        font-size: 10px;
        margin-bottom: 4px;
    }
    
    .stat-last {
        font-size: 9px;
        margin-top: 4px;
    }
    
    .stat-history {
        font-size: 8px;
        margin-top: 2px;
    }
    
    .section-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .summary-section {
        margin-top: 16px;
        margin-bottom: 16px;
        padding: 12px 16px;
    }
    
    .summary-content {
        font-size: 12px;
        line-height: 1.3;
    }
}

/* 移动端体验：触摸区域、安全区、横向滚动 */
@media (max-width: 768px) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .main-content {
        padding: 10px 8px;
        overflow-x: hidden;
    }
    .content {
        overflow-x: hidden;
    }
    .statistics-section {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .statistics-grid {
        min-width: min-content;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .extended-grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .global-error-retry,
    .retry-btn,
    .btn,
    button[type="button"]:not(.modal-close) {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
        -webkit-tap-highlight-color: transparent;
    }
    .floating-nav-toggle,
    .floating-back-to-top {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        padding: 0;
        -webkit-tap-highlight-color: transparent;
    }
    .floating-nav-link {
        display: block;
        padding: 14px 16px;
        min-height: 48px;
        box-sizing: border-box;
        -webkit-tap-highlight-color: transparent;
    }
    .topbar-content {
        flex-wrap: wrap;
        gap: 10px;
    }
    .latest-info-content {
        font-size: 13px;
    }
}

/* 动画效果 */


/* 统计页面样式 - 已移动到新位置 */

/* 统计卡片样式 */
.stat-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 16px 12px;
    min-height: 120px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.stat-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #007aff;
}



/* 遗漏期数 - 右上角 */
.stat-missing {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #007aff;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    white-space: nowrap;
    min-width: 50px;
    text-align: center;
    z-index: 10;
}

/* 名称 - 主要标题 */
.stat-name {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 8px;
    margin-top: 6px;
    text-align: center;
    line-height: 1.2;
}

/* 统计次数 - 次要信息 */
.stat-count {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 6px;
    text-align: center;
    line-height: 1.2;
}

/* 最后开奖 - 重要信息 */
.stat-last {
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    margin-top: 6px;
    text-align: center;
    line-height: 1.3;
}

/* 最高遗漏 - 底部信息 */
.stat-history {
    font-size: 11px;
    font-weight: 500;
    color: #868e96;
    margin-top: 4px;
    text-align: center;
    line-height: 1.2;
}

/* 统一的信息行样式：标签·数值 并列展示 */
.stat-info-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 11px;
    color: #6c757d;
    flex-wrap: wrap;
}
.stat-info-row .info-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.stat-info-row .label { color: #868e96; }
.stat-info-row .value { color: #495057; font-weight: 600; }

@media (max-width: 480px) {
    .stat-last { font-size: 10px; }
    .stat-info-row { gap: 6px; font-size: 10px; }
}

/* 颜色编码 */
.low-missing .stat-missing {
    color: var(--success-color);
}

.medium-missing .stat-missing {
    color: var(--warning-color);
}

.high-missing .stat-missing {
    color: var(--danger-color);
}

/* 卡片颜色边框 */
.low-missing {
    border-color: rgba(40, 167, 69, 0.3);
}

.medium-missing {
    border-color: rgba(255, 193, 7, 0.3);
}

.high-missing {
    border-color: rgba(220, 53, 69, 0.3);
}

/* 统计摘要样式 */
.summary-section {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

.summary-content {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
    margin: 0;
    font-weight: 500;
}

/* 导航链接 */
.nav-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-right: 20px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #0056CC;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
} 

/* 样式切换器 */
.style-switcher {
    display: none;
}

.switcher-container {
    display: none;
}

.style-btn {
    display: none;
} 

/* 移动端优化 */
@media (max-width: 1024px) {
    .statistics-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
        padding: 0 8px;
    }
    
    .stat-item {
        padding: 14px 10px;
        border-radius: 10px;
        min-height: 100px;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    }
    
    .stat-item:hover {
        transform: translateY(-2px) scale(1.01);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    }
    

    
    .stat-missing {
        top: 6px;
        right: 8px;
        font-size: 18px;
        font-weight: 800;
        min-width: 50px;
    }
    
    .stat-name {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 6px;
        margin-top: 4px;
    }
    
    .stat-count {
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 4px;
    }
    
    .stat-last {
        font-size: 10px;
        font-weight: 500;
        margin-top: 4px;
    }
    
    .stat-history {
        font-size: 9px;
        font-weight: 500;
        margin-top: 3px;
    }
} 

/* 悬浮导航菜单 */
.floating-nav {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 280px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e9ecef;
}

.floating-nav.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.floating-nav-content {
    padding: 20px;
}

.floating-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007aff;
}

.floating-nav-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
}

.close-nav-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-nav-btn:hover {
    background: #f8f9fa;
    color: #1d1d1f;
}

.floating-nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.floating-nav-link {
    display: block;
    padding: 12px 16px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: transparent;
    border: 1px solid transparent;
}

.floating-nav-link:hover {
    background: #007aff;
    color: white;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.floating-nav-link:active {
    transform: translateX(2px);
}

/* 悬浮导航按钮 */
.floating-nav-toggle {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-nav-toggle:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 12px 30px rgba(40, 167, 69, 0.5);
}

.floating-nav-toggle:active {
    transform: translateY(-2px) scale(1.05);
}

.floating-nav-toggle svg {
    transition: transform 0.3s ease;
}

.floating-nav-toggle:hover svg {
    transform: rotate(90deg);
}

.floating-view-toggle {
    position: fixed;
    right: 30px;
    bottom: 170px;
    width: 56px;
    height: 56px;
    padding: 0;
    color: #fff;
    background: linear-gradient(145deg, #ff9f0a, #ff6b00);
    border: none;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    word-break: keep-all;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-view-toggle svg {
    display: block;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    pointer-events: none;
}

.floating-view-toggle:hover {
    transform: translateY(-3px);
    box-shadow:
        0 10px 26px rgba(255, 107, 0, 0.44),
        0 0 0 4px rgba(255, 159, 10, 0.14);
}

.floating-view-toggle:active {
    transform: scale(0.96);
}

.text-view-mode .floating-view-toggle {
    background: linear-gradient(145deg, #0a84ff, #0064d9);
    box-shadow: 0 6px 20px rgba(10, 132, 255, 0.4);
}

/* 顶部导航栏 */
.topbar {
    background: linear-gradient(135deg, #1d1d1f 0%, #2d2d30 100%);
    height: 68px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.topbar-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin: 0 auto;
    height: 100%;
}

.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.logo-text {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.logo-subtitle {
    color: #b0b0b0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    margin-top: 2px;
}

.nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: #e0e6ed;
    font-size: 13px;
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

/* 主要内容区域调整 */
.main-content {
    width: 100%;
    min-height: calc(100vh - 68px);
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 24px;
}

.content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* 纯文字统计视图 */
.text-statistics-view {
    margin-bottom: 32px;
    padding: 26px clamp(16px, 4vw, 44px) 38px;
    background:
        linear-gradient(180deg, rgba(255, 250, 229, 0.92), #fff 170px);
    border: 1px solid #eadba1;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
}

.text-statistics-view[hidden] {
    display: none;
}

.text-view-mode .statistics-section,
.text-view-mode .summary-section {
    display: none;
}

.text-view-mode .floating-nav-toggle,
.text-view-mode .floating-nav {
    display: none;
}

.text-statistics-header {
    margin: 0 auto 28px;
    text-align: center;
}

.text-statistics-eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 10px;
    color: #9a4d00;
    background: #ffe66b;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.text-statistics-header h2 {
    margin: 0;
    color: #e1261c;
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.25;
}

.text-statistics-header p {
    margin: 7px 0 0;
    color: #6e6e73;
    font-size: 13px;
}

.text-statistics-content {
    max-width: 860px;
    margin: 0 auto;
}

.text-statistics-group {
    padding: 24px 0;
    text-align: center;
    border-top: 1px dashed #d7d7dc;
}

.text-statistics-group:first-child {
    padding-top: 0;
    border-top: 0;
}

.text-statistics-group h3 {
    display: inline-block;
    position: relative;
    margin: 0 0 14px;
    padding: 0 16px 5px;
    color: #0046d5;
    font-size: clamp(18px, 2.5vw, 24px);
    line-height: 1.3;
}

.text-statistics-group h3::after {
    content: "";
    position: absolute;
    right: 22%;
    bottom: 0;
    left: 22%;
    height: 3px;
    background: linear-gradient(90deg, #0a84ff, #30d158);
    border-radius: 999px;
}

.text-statistics-list {
    display: grid;
    gap: 8px;
}

.text-statistics-row {
    display: grid;
    grid-template-columns: minmax(80px, 0.7fr) minmax(110px, 0.85fr) minmax(180px, 1.5fr) minmax(180px, 1.4fr);
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 7px 10px;
    color: #363638;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
}

.text-statistics-row:nth-child(odd) {
    background: rgba(242, 242, 247, 0.68);
}

.text-statistics-name {
    color: #003bcc;
    font-size: 16px;
}

.text-statistics-missing {
    font-weight: 800;
}

.text-statistics-row.low .text-statistics-missing {
    color: #128a32;
}

.text-statistics-row.medium .text-statistics-missing {
    color: #d66a00;
}

.text-statistics-row.high .text-statistics-missing {
    color: #e11d2e;
}

.text-statistics-recent,
.text-statistics-detail {
    color: #66666b;
    font-size: 12px;
}

.text-statistics-mobile-meta {
    display: none;
}

/* 每晚开奖直播 */
.live-section {
    margin-bottom: 20px;
    padding: 18px;
    color: #f5f5f7;
    background:
        radial-gradient(circle at 82% 5%, rgba(255, 69, 58, 0.28), transparent 35%),
        linear-gradient(145deg, #1c1c1e 0%, #2c2c2e 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);
    overflow: hidden;
}

.live-header,
.live-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.live-header {
    display: grid;
    grid-template-columns: minmax(160px, 190px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 0;
}

.live-identity {
    min-width: 0;
}

.live-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
    color: #d1d1d6;
    font-size: 12px;
    font-weight: 600;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: #8e8e93;
    border-radius: 50%;
}

.live-indicator.is-live {
    background: #ff453a;
    box-shadow: 0 0 0 5px rgba(255, 69, 58, 0.14);
    animation: livePulse 1.8s ease-in-out infinite;
}

.live-indicator.has-error {
    background: #ff9f0a;
}

@keyframes livePulse {
    50% { opacity: 0.45; }
}

.live-title {
    margin: 0;
    color: #fff;
    font-size: 22px;
    line-height: 1.2;
}

.live-schedule {
    margin: 5px 0 0;
    color: #a1a1a6;
    font-size: 12px;
}

.live-toggle,
.live-retry,
.live-action {
    min-height: 38px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.live-toggle {
    padding: 0 14px;
    color: #f5f5f7;
    background: rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.live-body {
    margin-top: 16px;
}

.live-results {
    min-width: 0;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.live-results-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin: 0 -14px 13px;
    padding: 10px 14px;
    background: linear-gradient(100deg, #fff3d6 0%, #fff 48%, #edf6ff 100%);
    border-bottom: 1px solid #ffd27a;
}

.live-results-label {
    display: block;
    margin-bottom: 2px;
    color: #b54708;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.live-results-period {
    display: block;
    color: #111;
    font-size: 17px;
    letter-spacing: 0.02em;
}

.live-results-time {
    color: #343438;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.live-result-numbers {
    display: grid;
    grid-template-columns: repeat(6, minmax(44px, 1fr)) 18px minmax(44px, 1fr);
    align-items: center;
    gap: 5px;
}

.live-result-number {
    position: relative;
    min-width: 0;
    padding: 7px 3px 6px;
    color: #fff;
    text-align: center;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        inset 0 -3px 8px rgba(0, 0, 0, 0.12),
        0 5px 12px rgba(0, 0, 0, 0.17);
}

.live-result-number.red {
    background: linear-gradient(145deg, #ff544a 0%, #f11225 55%, #c90016 100%);
}

.live-result-number.blue {
    background: linear-gradient(145deg, #36a2ff 0%, #087cf0 52%, #0056c7 100%);
}

.live-result-number.green {
    background: linear-gradient(145deg, #45db69 0%, #21bd4b 52%, #0b8d30 100%);
}

.live-result-number.neutral {
    background: linear-gradient(145deg, #8e8e93, #636366);
}

.live-result-number.pending {
    color: #8e8e93;
    background:
        repeating-linear-gradient(
            135deg,
            #f2f2f7,
            #f2f2f7 8px,
            #e9e9ee 8px,
            #e9e9ee 16px
        );
    border-color: #d1d1d6;
    box-shadow: inset 0 0 0 1px #fff;
}

.live-result-number.is-special {
    outline: 2px solid rgba(255, 159, 10, 0.78);
    outline-offset: 1px;
}

.live-result-number strong {
    display: block;
    font-size: clamp(20px, 2.4vw, 27px);
    line-height: 1;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.24);
}

.live-result-number span {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 6px;
    color: #1d1d1f;
    background: #fff;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.live-result-number.pending span {
    color: #6e6e73;
    background: rgba(255, 255, 255, 0.82);
}

.live-result-plus {
    color: #ff3b30;
    font-size: 28px;
    font-weight: 900;
    text-align: center;
    text-shadow: 0 2px 8px rgba(255, 59, 48, 0.22);
}

.live-result-loading {
    grid-column: 1 / -1;
    padding: 16px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
}

.live-video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 13px;
    overflow: hidden;
}

.live-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.live-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.09), transparent 55%),
        #111;
}

.live-placeholder[hidden] {
    display: none;
}

.live-placeholder p {
    margin: 0;
    color: #d1d1d6;
    font-size: 14px;
}

.live-placeholder-icon {
    width: 54px;
    height: 38px;
    border: 2px solid #636366;
    border-radius: 10px;
}

.live-placeholder-icon::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    margin: 10px auto;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid #f5f5f7;
}

.live-simulation-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.live-simulation-stage[hidden] {
    display: none;
}

.live-simulation-label {
    color: #ffd60a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.live-simulation-ball {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(76px, 14vw, 106px);
    height: clamp(76px, 14vw, 106px);
    color: #fff;
    background:
        radial-gradient(circle at 34% 25%, rgba(255, 255, 255, 0.72), transparent 16%),
        linear-gradient(145deg, #ff453a, #c90016);
    border: 5px solid rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    box-shadow:
        0 12px 28px rgba(255, 69, 58, 0.32),
        inset 0 -8px 18px rgba(0, 0, 0, 0.2);
    font-size: clamp(30px, 6vw, 46px);
    line-height: 1;
}

.live-simulation-ball.special {
    background:
        radial-gradient(circle at 34% 25%, rgba(255, 255, 255, 0.72), transparent 16%),
        linear-gradient(145deg, #ff9f0a, #d95d00);
    box-shadow:
        0 12px 28px rgba(255, 159, 10, 0.34),
        inset 0 -8px 18px rgba(0, 0, 0, 0.2);
}

.live-simulation-ball.is-rolling {
    animation: simulationRoll 0.34s linear infinite;
}

.live-simulation-progress {
    color: #d1d1d6;
    font-size: 13px;
    font-weight: 600;
}

@keyframes simulationRoll {
    50% { transform: rotate(9deg) scale(0.93); filter: blur(1px); }
}

.is-simulating .live-placeholder {
    background:
        radial-gradient(circle at center, rgba(255, 69, 58, 0.16), transparent 42%),
        linear-gradient(145deg, #080808, #1c1c1e);
}

.live-action {
    padding: 0 18px;
    color: #fff;
    background: #0a84ff;
}

.live-footer {
    margin-top: 11px;
    color: #a1a1a6;
    font-size: 12px;
}

.live-retry {
    min-height: 32px;
    padding: 0 12px;
    color: #fff;
    background: #ff453a;
}

.live-toggle:active,
.live-retry:active,
.live-action:active {
    transform: scale(0.97);
}

/* 页面标题样式 - 已移除，改用顶部导航栏 */

/* 移动端适配 */
@media (max-width: 1024px) {
    /* 移动端主要内容区域样式 */
    
    .content {
        padding: 15px;
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
    }
    
    /* 移动端顶部导航栏样式 */
    .topbar {
        height: 68px;
    }
    
    .topbar-content {
        padding: 0 15px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .logo-subtitle {
        font-size: 10px;
        display: none;
    }
    
    .latest-info {
        display: flex;
        align-items: center;
    }
    
    .nav {
        gap: 16px;
    }
    
    .nav-link {
        font-size: 12px;
        padding: 4px 6px;
    }
    
    .statistics-section {
        padding: 20px;
        margin-bottom: 24px;
        width: 100%;
    }
    
    .statistics-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
        width: 100%;
    }
    
    /* 移动端菜单按钮 */
    .mobile-menu-btn {
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: #007aff;
        color: white;
        border: none;
        border-radius: 8px;
        padding: 12px;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    }
} 

/* 悬浮返回顶部按钮 */
.floating-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-back-to-top:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 12px 30px rgba(0, 122, 255, 0.5);
}

.floating-back-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

.floating-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.floating-back-to-top svg {
    transition: transform 0.3s ease;
}

.floating-back-to-top:hover svg {
    transform: translateY(-2px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .floating-view-toggle {
        right: 18px;
        bottom: 160px;
        width: 50px;
        height: 50px;
        padding: 0;
        font-size: 12px;
    }

    .text-statistics-view {
        padding: 20px 12px 28px;
        border-radius: 14px;
    }

    .text-statistics-header {
        margin-bottom: 16px;
    }

    .text-statistics-group {
        padding: 14px 0;
    }

    .text-statistics-group h3 {
        margin-bottom: 9px;
    }

    .text-statistics-list {
        gap: 0;
    }

    .text-statistics-row {
        display: grid;
        grid-template-columns: 62px 38px 48px 42px 42px;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 34px;
        padding: 6px 3px;
        font-size: 12px;
        line-height: 1.2;
        white-space: nowrap;
    }

    .text-statistics-name {
        width: 62px;
        overflow: hidden;
        font-size: 14px;
        text-align: right;
        text-overflow: ellipsis;
    }

    .text-statistics-missing {
        width: 38px;
        font-size: 13px;
        text-align: left;
    }

    .text-statistics-recent,
    .text-statistics-detail {
        display: none;
    }

    .text-statistics-mobile-meta {
        display: block;
        color: #7a7a80;
        font-size: 11px;
        text-align: center;
    }

    .text-statistics-mobile-meta strong {
        color: #3a3a3c;
        font-size: 12px;
        font-weight: 750;
    }

    .text-statistics-mobile-peak strong {
        color: #b45f06;
    }

    .text-statistics-mobile-mean strong {
        color: #0875a5;
    }

    .live-section {
        padding: 14px;
        border-radius: 15px;
    }

    .live-title {
        font-size: 19px;
    }

    .live-header {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
    }

    .live-results {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        margin: 4px 0 0;
        padding: 0;
    }

    .live-result-numbers {
        grid-template-columns: repeat(6, minmax(0, 1fr)) 12px minmax(0, 1fr);
        gap: 2px;
        overflow: visible;
    }

    .live-result-number {
        width: 100%;
        min-width: 0;
        padding: 6px 1px 5px;
        border-radius: 8px;
    }

    .live-result-number strong {
        font-size: clamp(17px, 5.2vw, 22px);
    }

    .live-result-number span {
        margin-top: 4px;
        max-width: 100%;
        padding: 2px;
        font-size: clamp(9px, 2.7vw, 11px);
    }

    .live-result-plus {
        font-size: 17px;
    }

    .live-video-wrap {
        border-radius: 11px;
    }

    .live-footer {
        align-items: flex-start;
    }

    .floating-nav {
        bottom: 90px;
        right: 20px;
        width: 260px;
    }
    
    .floating-nav-toggle {
        bottom: 90px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .floating-nav-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .floating-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .floating-back-to-top svg {
        width: 18px;
        height: 18px;
    }
} 

/* 统计区域样式 */
.statistics-section {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

/* 扩展统计卡片与微型列表 */
.extended-card {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: 16px;
}

.mini-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
}

.mini-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.mini-body {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mini-chip {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    border: 1px solid #e2e8f0;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    width: 100%;
} 

.statistics-subtitle {
    margin: 20px 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.statistics-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 8px;
    color: var(--text-secondary);
    font-size: 12px;
}

.statistics-sort {
    appearance: none;
    min-height: 34px;
    padding: 6px 30px 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    color: var(--text-primary);
    background:
        linear-gradient(45deg, transparent 50%, #6e6e73 50%) calc(100% - 14px) 14px / 5px 5px no-repeat,
        linear-gradient(135deg, #6e6e73 50%, transparent 50%) calc(100% - 9px) 14px / 5px 5px no-repeat,
        var(--card-background);
}

.statistics-empty {
    grid-column: 1 / -1;
    padding: 28px 16px;
    color: var(--text-secondary);
    text-align: center;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
}

@media (max-width: 480px) {
    .statistics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        min-width: 0;
        padding: 0;
        overflow: visible;
    }

    .statistics-grid .stat-item {
        min-width: 0;
        min-height: 112px;
        padding: 14px 8px;
    }

    .statistics-grid .stat-name {
        margin-top: 4px;
        padding-right: 50px;
        font-size: 16px;
        line-height: 1.2;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .statistics-grid .stat-missing {
        top: 6px;
        right: 8px;
        min-width: 50px;
        font-size: 18px;
        line-height: normal;
        text-align: center;
    }

    .statistics-grid .stat-last {
        overflow: hidden;
        font-size: 9px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .statistics-grid .stat-info-row {
        gap: 3px;
        white-space: nowrap;
    }

    .statistics-grid .info-item {
        min-width: 0;
        font-size: 8px;
    }
}

/* 最新一期信息 */
.latest-info {
    display: flex;
    align-items: center;
}

.latest-info-content {
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
    border-radius: 12px;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.25);
    backdrop-filter: blur(10px);
    min-width: 200px;
}

.latest-period {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.period-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.year-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
}

.toolbar-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.toolbar-field-sort {
    margin-left: auto;
}

.year-toolbar-label {
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.year-select {
    min-width: 100px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
}

.year-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.global-sort-select {
    min-width: 180px;
    font-weight: 500;
}

@media (max-width: 480px) {
    .year-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .toolbar-field {
        justify-content: space-between;
        width: 100%;
    }

    .toolbar-field-sort {
        margin-left: 0;
    }

    .global-sort-select {
        min-width: 0;
        width: 180px;
        max-width: calc(100% - 72px);
    }
}

.period-number {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.latest-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.latest-date {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.latest-number {
    font-size: 16px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    min-width: 32px;
    text-align: center;
} 

.latest-number-red {
    color: #ffffff;
    background: #ef4444;
    border-color: #dc2626;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.latest-number-blue {
    color: #ffffff;
    background: #3b82f6;
    border-color: #2563eb;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.latest-number-green {
    color: #ffffff;
    background: #22c55e;
    border-color: #16a34a;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}

@media (max-width: 1024px) {
    .latest-info {
        display: flex;
        align-items: center;
    }
    
    .latest-info-content {
        padding: 10px 12px;
        gap: 12px;
        min-width: 160px;
    }
    
    .period-label {
        font-size: 10px;
    }
    
    .period-number {
        font-size: 16px;
    }
    
    .latest-date {
        font-size: 10px;
    }
    
    .latest-number {
        font-size: 14px;
        padding: 3px 6px;
        min-width: 28px;
    }
} 

@media (max-width: 1024px) {
    .topbar {
        height: 68px;
    }
    
    .topbar-content {
        padding: 0 15px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .logo-subtitle {
        font-size: 12px;
        margin-top: 1px;
    }
    
    .latest-info {
        display: flex;
        align-items: center;
    }
    
    .latest-info-content {
        padding: 12px 16px;
        gap: 16px;
        min-width: 200px;
    }
    
    .period-label {
        font-size: 10px;
    }
    
    .period-number {
        font-size: 18px;
    }
    
    .latest-date {
        font-size: 10px;
    }
    
    .latest-number {
        font-size: 16px;
        padding: 4px 8px;
        min-width: 32px;
    }
} 

@media (max-width: 480px) {
    .topbar {
        height: 68px;
    }
    
    .topbar-content {
        padding: 0 10px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .logo-subtitle {
        font-size: 10px;
        margin-top: 1px;
    }
    
    .latest-info-content {
        padding: 12px 16px;
        gap: 16px;
        min-width: 200px;
    }
    
    .period-label {
        font-size: 10px;
    }
    
    .period-number {
        font-size: 18px;
    }
    
    .latest-date {
        font-size: 10px;
    }
    
    .latest-number {
        font-size: 16px;
        padding: 4px 8px;
        min-width: 32px;
    }
} 

@media (max-width: 768px) {
    .topbar {
        height: 68px;
    }
    
    .topbar-content {
        padding: 0 12px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .logo-subtitle {
        font-size: 11px;
        margin-top: 1px;
    }
    
    .latest-info-content {
        padding: 12px 16px;
        gap: 16px;
        min-width: 200px;
    }
    
    .period-label {
        font-size: 10px;
    }
    
    .period-number {
        font-size: 18px;
    }
    
    .latest-date {
        font-size: 10px;
    }
    
    .latest-number {
        font-size: 16px;
        padding: 4px 8px;
        min-width: 32px;
    }
} 

/* 统计说明区域 */
.explanation-section {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.explanation-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.explanation-item {
    background: var(--background-color);
    border-radius: var(--border-radius-small);
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.explanation-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.explanation-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.explanation-item p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
}

.explanation-item strong {
    color: var(--primary-color);
    font-weight: 600;
} 

@media (max-width: 1024px) {
    .explanation-section {
        padding: 24px;
        margin-bottom: 24px;
    }
    
    .explanation-content {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 16px;
    }
    
    .explanation-item {
        padding: 16px;
    }
    
    .explanation-item h3 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .explanation-item p {
        font-size: 13px;
        line-height: 1.5;
    }
} 

/* 页脚 */
.footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 24px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-text {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 8px;
}

.footer-copyright {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
    margin: 0;
} 

@media (max-width: 1024px) {
    .footer {
        padding: 20px 0;
        margin-top: 32px;
    }
    
    .footer-content {
        padding: 0 15px;
    }
    
    .footer-text {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .footer-copyright {
        font-size: 11px;
    }
    
    /* 移动端模态框样式 */
    .modal-content {
        width: 95%;
        max-width: 400px;
        margin: 20px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 20px;
        max-height: 350px;
    }
    
    .number-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .number-item {
        padding: 10px 6px;
        min-height: 40px;
        border-radius: 6px;
    }
    
    .number-value {
        font-size: 16px;
    }
    
    .copy-all-button {
        padding: 4px 8px;
        bottom: 6px;
        right: 6px;
    }
    
    .copy-all-button span {
        font-size: 10px;
    }
} 

/* 号码详情模态框 */
.number-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
}

.number-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 80%;
    width: 500px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
    position: relative;
}

.number-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.number-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.number-item.red {
    background: #fca5a5;
    border-color: #f87171;
}

.number-item.blue {
    background: #93c5fd;
    border-color: #60a5fa;
}

.number-item.green {
    background: #86efac;
    border-color: #4ade80;
}

.number-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}





.number-value {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

/* 复制全部按钮 */
.copy-all-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 10;
}

.copy-all-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

.copy-all-button span {
    font-size: 12px;
    font-weight: 600;
} 

/* ==================== 数据推演分析系统 ==================== */

/* 这里添加推演分析相关的CSS样式（如前面建议的样式） */

.prediction-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.prediction-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.prediction-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.prediction-card h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    color: #fff;
}

.prediction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prediction-item:last-child {
    border-bottom: none;
}

.prediction-name {
    font-weight: 600;
    font-size: 16px;
}

.prediction-score {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.prediction-details {
    width: 100%;
    margin-top: 5px;
    font-size: 12px;
    opacity: 0.8;
}

.recommended-numbers {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.recommended-numbers h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 10px;
    max-width: 600px;
    margin: 0 auto 20px auto;
}

.recommended-number {
    padding: 15px 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.recommended-number.red {
    background: #fca5a5;
    color: #1f2937;
    border-color: #f87171;
}

.recommended-number.blue {
    background: #93c5fd;
    color: #1f2937;
    border-color: #60a5fa;
}

.recommended-number.green {
    background: #86efac;
    color: #1f2937;
    border-color: #4ade80;
}

.recommended-number:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.recommendation-note {
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.recommendation-note ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.recommendation-note li {
    margin: 5px 0;
    font-size: 14px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .prediction-section {
        margin-top: 20px;
        padding: 20px;
    }
    .prediction-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .prediction-card {
        padding: 15px;
    }
    .number-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 8px;
    }
    .recommended-number {
        padding: 12px 8px;
        font-size: 16px;
    }
    .recommended-numbers {
        padding: 20px;
    }
} 
