* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "SimHei", Arial, sans-serif;
    font-size: 14px;
    background: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

.page-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #1976d2, #0d47a1);
    color: #fff;
    text-align: center;
    padding: 20px 15px;
}

.site-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 5px;
}

.sub-title {
    font-size: 13px;
    opacity: 0.9;
}

.main-content {
    padding: 15px;
}

.section {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #1976d2;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
}

.number-section {
    padding: 15px;
}

.play-type {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: bold;
}

.radio-label input {
    width: 18px;
    height: 18px;
    accent-color: #1976d2;
}

.position-balls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.position-group {
    background: #fafafa;
    border-radius: 8px;
    padding: 12px;
}

.position-label {
    font-weight: bold;
    color: #1976d2;
    margin-bottom: 10px;
    font-size: 15px;
}

.ball-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.ball-grid.small-grid {
    grid-template-columns: repeat(10, 1fr);
}

.ball {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid #ddd;
    background: #fff;
    color: #333;
    user-select: none;
}

.ball:hover {
    border-color: #1976d2;
    transform: scale(1.05);
}

.ball.selected {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

.ball.must-include {
    background: #4caf50;
    color: #fff;
    border-color: #4caf50;
}

.ball.must-exclude {
    background: #9e9e9e;
    color: #fff;
    border-color: #9e9e9e;
}

.quick-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 4px 10px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-btn:hover {
    background: #e3f2fd;
    border-color: #1976d2;
    color: #1976d2;
}

.zuxuan-balls {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.group-label {
    font-weight: bold;
    color: #1976d2;
    font-size: 15px;
}

.group-hint {
    color: #999;
    font-size: 12px;
}

.selected-count {
    color: #1976d2;
    font-size: 12px;
    margin-left: auto;
}

.filter-section {
    padding: 15px;
}

.filter-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-size: 14px;
    cursor: pointer;
    color: #666;
    position: relative;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #1976d2;
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #1976d2;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.filter-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.filter-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.range-input {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.range-input input {
    width: 70px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.range-input input:focus {
    outline: none;
    border-color: #1976d2;
}

.range-separator {
    color: #999;
}

.range-hint {
    color: #999;
    font-size: 12px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.checkbox-item:hover {
    border-color: #1976d2;
}

.checkbox-item input {
    display: none;
}

.checkbox-item input:checked + span,
.checkbox-item:has(input:checked) {
    background: #e3f2fd;
    border-color: #1976d2;
    color: #1976d2;
}

.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.radio-item input {
    width: 16px;
    height: 16px;
    accent-color: #1976d2;
}

.hint-text {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.action-section {
    padding: 15px;
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: nowrap;
    align-items: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.action-btn.primary {
    background: linear-gradient(135deg, #1976d2, #0d47a1);
    color: #fff;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4);
}

.action-btn.secondary {
    background: #fff;
    color: #1976d2;
    border: 2px solid #1976d2;
}

.action-btn.secondary:hover {
    background: #e3f2fd;
}

.btn-icon {
    font-size: 18px;
}

.result-section {
    padding: 15px;
}

.result-count {
    font-size: 14px;
    color: #1976d2;
    margin-left: auto;
}

.result-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 15px;
}

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

.stat-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.stat-value.highlight {
    color: #1976d2;
}

.result-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

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

.result-item:nth-child(even) {
    background: #fafafa;
}

.result-index {
    width: 50px;
    color: #999;
    font-size: 12px;
}

.result-balls {
    display: flex;
    gap: 6px;
}

.result-ball {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background: #1976d2;
}

.result-type {
    margin-left: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: #e3f2fd;
    color: #1976d2;
}

.result-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.footer {
    text-align: center;
    padding: 15px;
    color: #999;
    font-size: 12px;
    border-top: 1px solid #eee;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

@media screen and (max-width: 480px) {
    .header {
        padding: 15px 10px;
    }

    .site-title {
        font-size: 18px;
    }

    .main-content {
        padding: 10px;
    }

    .section-title {
        font-size: 14px;
        padding: 10px;
    }

    .ball {
        font-size: 12px;
    }

    .quick-btn {
        padding: 3px 6px;
        font-size: 11px;
    }

    .checkbox-item {
        padding: 4px 8px;
        font-size: 12px;
    }

    .action-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

    .result-stats {
        flex-wrap: wrap;
        gap: 10px;
    }

    .stat-item {
        flex: 1;
        min-width: 80px;
    }
}
