* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
            color: #333;
        
        }
        
        .container {
            max-width: 1600px;
        }
        
        .header{
            background-color: #fff;
            color: #333;
            box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
            overflow: hidden;
            position: relative;
            padding: 10px;
            border-radius: 10px;
        }

        /* 返回顶部按钮 */
        .back-to-top {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 50px;
            height: 50px;
            background-color: #e74c3c;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            z-index: 999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            border: none;
            outline: none;
        }
        
        .back-to-top.show {
            opacity: 1;
            visibility: visible;
        }
        
        .back-to-top:hover {
            background-color: #c0392b;
            transform: translateY(-3px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
        }
        
        .back-to-top:active {
            transform: translateY(0);
        }
        
        .back-to-top i {
            font-size: 1.3rem;
        }
        
        /* 数据更新通知样式 */
        .update-notification {
            pointer-events: none;
        }
        
        @media (max-width: 768px) {
            .back-to-top {
                bottom: 20px;
                right: 20px;
                width: 45px;
                height: 45px;
            }
        }
        
        @media (max-width: 480px) {
            .back-to-top {
                bottom: 15px;
                right: 15px;
                width: 42px;
                height: 42px;
            }
            
            .back-to-top i {
                font-size: 1.2rem;
            }
        }
        
        .header > header {
            text-align: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid #eaeaea;
        }
        
        h1 {
            color: #e74c3c;
            margin-bottom: 8px;
            font-size: 1.6rem;
        }
        
        .subtitle {
            color: #7f8c8d;
            font-size: 0.9rem;
            line-height: 1.4;
        }
        
        .stat-box {
            text-align: center;
            padding: 10px;
        }
        
        .stat-value {
            font-size: 1.5rem;
            font-weight: bold;
            color: #2c3e50;
            margin-bottom: 5px;
        }
        
        .stat-label {
            font-size: 0.8rem;
            color: #7f8c8d;
        }
        
        /* 当期开奖号码显示区域 */
        .drawing-display {
            margin: 15px 0;
            padding: 15px;
            background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
            border-radius: 10px;
            color: white;
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
            position: relative;
        }
        
        .drawing-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.3);
            flex-wrap: nowrap;
            gap: 8px;
        }
        
        .drawing-title {
            font-size: 1rem;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .drawing-title .period-badge {
            background-color: #e74c3c;
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-weight: bold;
            font-size: 0.9rem;
        }
        
        .refresh-btn {
            background: rgba(255,255,255,0.2);
            color: white;
            border: 1px solid rgba(255,255,255,0.4);
            padding: 6px 14px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: background-color 0.3s;
        }
        
        .refresh-btn:hover {
            background: rgba(255,255,255,0.3);
        }
        
        .refresh-btn:active {
            transform: translateY(1px);
        }
        
        .refresh-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        .numbers-container {
            display: flex;
            flex-wrap: wrap;
            gap: 1px;
            justify-content: center;
            margin-top: 10px;
        }
        
        .number-ball {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: radial-gradient(circle at 30% 30%, #ff6666, #cc0000);
            border-radius: 50%;
            font-weight: bold;
            font-size: 1rem;
            color: white;
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
            transition: all 0.2s ease;
            position: relative;
        }
        
        .number-ball:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
        }
        
        .number-ball::after {
            content: '';
            position: absolute;
            top: 4px;
            left: 4px;
            right: 4px;
            bottom: 4px;
            border-radius: 50%;
            background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent);
            pointer-events: none;
        }
        
        .number-ball.highlight {
            background: radial-gradient(circle at 30% 30%, #ffeb3b, #fbc02d);
            color: #d84315;
        }
        
        /* 标签页样式 */
        .tabs {
            display: flex;
            margin-bottom: 15px;
            border-bottom: 1px solid #ddd;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }
        
        .tabs::-webkit-scrollbar {
            display: none;
        }
        
        .tab {
            padding: 10px 15px;
            background-color: #f8f9fa;
            border: none;
            border-top-left-radius: 6px;
            border-top-right-radius: 6px;
            margin-right: 5px;
            cursor: pointer;
            font-weight: 600;
            color: #555;
            transition: all 0.3s ease;
            white-space: nowrap;
            font-size: 0.85rem;
            flex-shrink: 0;
        }
        
        .tab.active {
            background-color: #e74c3c;
            color: white;
        }
        
        .tab:hover:not(.active) {
            background-color: #e9ecef;
        }
        
        .tab-content {
            display: none;
            animation: fadeIn 0.5s;
        }
        
        .tab-content.active {
            display: block;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        .table-container {
            overflow-x: auto;
            margin-bottom: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            max-height: 500px;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 4px;
            padding: 12px 0 4px;
            flex-wrap: wrap;
            width: 100%;
            box-sizing: border-box;
        }

        .pagination button {
            min-width: 34px;
            height: 34px;
            padding: 0 8px;
            border: 1px solid #ddd;
            background: #fff;
            color: #333;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s;
        }

        .pagination button:hover {
            background: #e8f4fc;
            border-color: #3498db;
        }

        .pagination button.active {
            background: #3498db;
            color: #fff;
            border-color: #3498db;
            font-weight: bold;
        }

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

        .pagination .ellipsis {
            color: #999;
            padding: 0 4px;
            font-size: 0.85rem;
        }

        @media (max-width: 768px) {
            .pagination {
                gap: 3px;
                padding: 8px 0 4px;
            }
            .pagination button {
                min-width: 30px;
                height: 30px;
                padding: 0 6px;
                font-size: 0.8rem;
            }
        }

        .table-container {
            margin-bottom: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            max-height: 500px;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            background-color: white;
            overflow-x: auto;
            white-space: nowrap;
        }

        @media (max-width: 768px) {
            table {
                min-width: unset;
            }
        }

        @media (max-width: 480px) {
            th {
                font-size: 0.8rem;
            }
        }
        th {
            background-color: #2c3e50;
            color: white;
            padding: 14px 8px;
            text-align: center;
            font-weight: 600;
            position: sticky;
            top: 0;
            z-index: 10;
            cursor: pointer;
            user-select: none;
            transition: background-color 0.2s;
            font-size: 0.9rem;
        }

        th:hover {
            background-color: #34495e;
        }

        th.sorted {
            background-color: #1a252f;
        }

        th.sortable {
            position: relative;
            padding-right: 25px;
        }

        th .sort-arrows {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 12px;
            height: 20px;
        }

        th .sort-arrow {
            font-size: 9px;
            line-height: 1;
            color: rgba(255, 255, 255, 0.4);
            transition: color 0.2s;
        }

        th .sort-arrow.active {
            color: white;
        }

        th .sort-arrow.up {
            margin-bottom: 2px;
        }

        th .sort-arrow.down {
            margin-top: 2px;
        }

        td {
            padding: 10px 8px;
            text-align: center;
            border-bottom: 1px solid #eee;
            font-size: 0.85rem;
        }

        tr:hover {
            background-color: #f9f9f9;
        }

        .number-cell {
            font-weight: bold;
            width: 50px;
            color: #333;
            background-color: #f8f9fa;
            border-right: 1px solid #eee;
        }

        .combination-cell {
            font-family: monospace;
            font-weight: bold;
            min-width: 80px;
            font-size: 0.85rem;
        }

        .multi-cell {
            font-family: monospace;
            font-weight: bold;
            min-width: 120px;
            word-break: break-all;
            max-width: 200px;
            font-size: 0.85rem;
        }

        .current-missing {
            font-weight: bold;
            color: #e74c3c;
        }

        .missing-high {
            background-color: #ffeaea;
            font-weight: bold;
        }

        .missing-medium {
            background-color: #fff4e6;
        }

        .missing-low {
            background-color: #f0fff0;
        }

        .controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            flex-wrap: wrap;
            gap: 10px;
        }

        .query-container {
            display: flex;
            flex-direction: column;
            margin-bottom: 15px;
            padding: 15px;
            background-color: #f8f9fa;
            border-radius: 6px;
        }

        .input-container {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            align-items: center;
            margin-bottom: 10px;
        }

        .input-group {
            flex: 1;
            min-width: 100%;
        }

        .input-label {
            display: block;
            margin-bottom: 6px;
            font-weight: 600;
            color: #2c3e50;
            font-size: 0.9rem;
        }

        .number-input {
            width: 100%;
            padding: 10px 12px;
            border-radius: 6px;
            border: 2px solid #ddd;
            font-size: 0.9rem;
            font-family: monospace;
            transition: all 0.3s;
        }

        .query-btn {
            padding: 10px 20px;
            border-radius: 6px;
            font-size: 0.9rem;
            font-weight: 600;
        }

        .number-input:focus {
            outline: none;
            border-color: #3498db;
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        }
        
        .number-input.valid {
            border-color: #27ae60;
        }
        
        .number-input.invalid {
            border-color: #e74c3c;
        }
        
        .input-hint {
            font-size: 0.8rem;
            color: #7f8c8d;
            margin-top: 5px;
        }
        
        .query-btn {
            background-color: #e74c3c;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.9rem;
            transition: background-color 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            margin-top: 10px;
        }
        
        .query-btn:hover {
            background-color: #c0392b;
        }
        
        .code-info {
            display: inline-block;
            padding: 3px 8px;
            background-color: #3498db;
            color: white;
            border-radius: 10px;
            font-size: 0.8rem;
            font-weight: 600;
            margin-left: 8px;
        }
        
        .validation-message {
            padding: 8px 12px;
            border-radius: 6px;
            margin-top: 8px;
            font-size: 0.85rem;
            display: none;
        }
        
        .validation-message.success {
            background-color: #d5edda;
            color: #155724;
            border-left: 4px solid #27ae60;
            display: block;
        }
        
        .validation-message.error {
            background-color: #f8d7da;
            color: #721c24;
            border-left: 4px solid #e74c3c;
            display: block;
        }
        
        .footer {
            margin-top: 20px;
            text-align: center;
            color: #ffffff;
            font-size: 0.8rem;
            padding-top: 15px;
            line-height: 1.4;
        }
        
        .loading {
            text-align: center;
            padding: 30px;
            font-size: 1rem;
            color: #7f8c8d;
        }
        
        .info-box {
            background-color: #e8f4fc;
            padding: 12px;
            border-radius: 6px;
            margin-bottom: 15px;
            border-left: 4px solid #3498db;
            font-size: 0.85rem;
            line-height: 1.4;
        }
        
        .example-list {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            margin-top: 10px;
        }
        
        .example-item {
            background-color: white;
            color: #333;
            padding: 6px 10px;
            border-radius: 16px;
            border: 1px solid #ddd;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.85rem;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .example-item:hover {
            background-color: #e8f4fc;
            border-color: #3498db;
        }
        
        .clear-history-btn {
            background-color: #95a5a6;
            color: white;
            border: none;
            padding: 4px 10px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.8rem;
            transition: background-color 0.3s;
        }
        
        .clear-history-btn:hover {
            background-color: #7f8c8d;
        }
        
        .history-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }
        
        .history-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 8px;
        }
        
        .history-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background-color: white;
            padding: 6px 12px;
            border-radius: 16px;
            border: 1px solid #ddd;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.85rem;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .history-item:hover {
            background-color: #e8f4fc;
            border-color: #3498db;
        }
        
        .history-item.active {
            background-color: #3498db;
            color: white;
            border-color: #3498db;
        }
        
        .history-item span {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .delete-history-item {
            background: none;
            border: none;
            color: #e74c3c;
            cursor: pointer;
            padding: 2px 5px;
            margin-left: 5px;
            border-radius: 3px;
            font-size: 0.8rem;
            opacity: 0.6;
            transition: all 0.2s;
            flex-shrink: 0;
        }
        
        .delete-history-item:hover {
            opacity: 1;
            background-color: #ffeaea;
        }
        
        .highlight {
            animation: highlight 1.5s;
        }
        
        @keyframes highlight {
            0% { background-color: #fffacd; }
            100% { background-color: transparent; }
        }
        
        .error {
            background-color: #ffeaea;
            color: #c0392b;
            padding: 12px;
            border-radius: 6px;
            margin-bottom: 12px;
            border-left: 4px solid #e74c3c;
            font-size: 0.85rem;
        }
        
        /* 移动端优化 */
        @media (max-width: 480px) {
            body {
                font-size: 13px;
            }

            .container {
                border-radius: 8px;
            }

            .tab-content {
                width: 100%;
                padding-left: 0;
                padding-right: 0;
            }

            h1 {
                font-size: 1.4rem;
            }

            .number-ball {
                width: 32px;
                height: 32px;
                font-size: 0.9rem;
            }

            .tab {
                font-size: 0.8rem;
            }

            th {
                font-size: 0.8rem;
            }

            td {
                font-size: 0.8rem;
            }

            .number-cell {
                width: 45px;
            }

            .combination-cell {
                min-width: 70px;
                font-size: 0.8rem;
            }

            .multi-cell {
                min-width: 100px;
                max-width: 150px;
                font-size: 0.8rem;
            }

            .query-container {
                padding: 10px;
            }

            .input-container {
                gap: 8px;
            }

            .number-input {
                font-size: 0.85rem;
            }

            .query-btn {
                font-size: 0.85rem;
            }

            .example-list {
                grid-template-columns: 1fr;
            }

            .history-item {
                max-width: 100%;
            }

            .info-box, .query-history {
                font-size: 0.8rem;
            }

            .footer {
                font-size: 0.75rem;
            }
        }
        @media (min-width: 768px) {
            .input-group {
                min-width: 400px;
            }
            
            .query-btn {
                width: auto;
                margin-top: 0;
            }
            
            .example-list {
                grid-template-columns: repeat(4, 1fr);
            }
        }
        
        @media (min-width: 1024px) {
            .container {
                padding: 5px;
            }
            
            h1 {
                font-size: 2rem;
            }
            
            .subtitle {
                font-size: 1rem;
            }
            
            .tab {
                font-size: 0.9rem;
                padding: 10px 20px;
            }
            
            .drawing-display {
                padding: 20px;
            }
            
            .number-ball {
                width: 40px;
                height: 40px;
                font-size: 1.1rem;
            }
        }
        
        @media (max-width: 768px) {
            .drawing-header {
                flex-wrap: nowrap;
                justify-content: flex-start;
                gap: 8px;
            }
            
            .drawing-title {
                font-size: 0.9rem;
                gap: 6px;
            }
            
            .drawing-title .period-badge {
                padding: 3px 8px;
                font-size: 0.8rem;
            }
            
            .refresh-btn {
                padding: 5px 10px;
                font-size: 0.8rem;
                flex-shrink: 0;
            }
        }
        
        /* 防止iOS Safari缩放 */
        input[type="text"],
        input[type="number"] {
            font-size: 16px !important;
        }
        
        /* 触摸优化 */
        button, .tab, .history-item, .example-item, .number-ball {
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
            touch-action: manipulation;
        }
        
        /* 防止长按菜单 */
        .history-item, .example-item {
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
        }
        
        /* 表格表头固定 */
        .table-container table {
            border-collapse: collapse;
            width: 100%;
        }
        
        .table-container table thead {
            position: sticky;
            top: 0;
            z-index: 10;
            background-color: #2c3e50;
        }
        
        .timestamp-info {
            font-size: 0.75rem;
            color: #7f8c8d;
            margin-top: 5px;
        }
