* {
    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, #ff6f00, #e65100);
    color: #fff;
    padding: 15px;
    position: relative;
}

.back-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.9;
}

.back-btn:hover {
    opacity: 1;
}

.site-title {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 3px;
}

.sub-title {
    font-size: 12px;
    text-align: center;
    opacity: 0.9;
}

.main-content {
    padding: 15px;
}

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

.section-header {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
}

.section-body {
    padding: 15px;
}

.form-row {
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #ff6f00;
}

.btn-primary {
    padding: 12px 30px;
    background: linear-gradient(135deg, #ff6f00, #e65100);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.3);
}

.btn-secondary {
    padding: 12px 30px;
    background: #fff;
    color: #ff6f00;
    border: 2px solid #ff6f00;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-secondary:hover {
    background: #fff3e0;
}

.update-time {
    font-size: 12px;
    color: #999;
}

.stats-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 12px;
    background: #fafafa;
    border-radius: 6px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-label {
    font-size: 12px;
    color: #999;
}

.summary-value {
    font-size: 16px;
    font-weight: bold;
    color: #ff6f00;
}

.weichu-tables {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.weichu-table {
    background: #fafafa;
    border-radius: 8px;
    padding: 12px;
}

.table-title {
    font-size: 13px;
    font-weight: bold;
    color: #666;
    margin-bottom: 10px;
    text-align: center;
}

.weichu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

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

.weichu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #eee;
}

.weichu-num {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.weichu-count {
    font-size: 12px;
    color: #999;
}

.weichu-item.hot {
    border-color: #ff6f00;
    background: #fff3e0;
}

.weichu-item.hot .weichu-count {
    color: #ff6f00;
    font-weight: bold;
}

.weichu-item.cold {
    border-color: #2196f3;
    background: #e3f2fd;
}

.weichu-item.cold .weichu-count {
    color: #2196f3;
}

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

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

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

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

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

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

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

.result-info {
    margin-left: auto;
    font-size: 12px;
    color: #666;
}

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

.position-group {
    margin-bottom: 15px;
}

.position-label {
    font-size: 13px;
    font-weight: bold;
    color: #ff6f00;
    margin-bottom: 8px;
}

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

.select-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;
}

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

.select-ball.selected {
    background: #ff6f00;
    color: #fff;
    border-color: #ff6f00;
}

.result-count {
    font-size: 13px;
    color: #ff6f00;
}

.range-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-row .form-input {
    flex: 1;
}

.range-sep {
    color: #999;
}

.selected-display {
    margin-top: 15px;
    padding: 10px;
    background: #fafafa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-label {
    font-size: 13px;
    color: #666;
}

.selected-nums {
    font-size: 16px;
    font-weight: bold;
    color: #ff6f00;
}

.combo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.combo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.combo-balls {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
}

.combo-count {
    font-size: 12px;
    color: #666;
}

.table-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

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

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

    .main-content {
        padding: 10px;
    }

    .weichu-tables {
        grid-template-columns: 1fr;
    }

    .weichu-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .weichu-grid.all-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .form-row {
        gap: 8px;
    }

    .btn-primary, .btn-secondary {
        padding: 10px 18px;
        font-size: 14px;
    }
}

@media screen and (max-width: 360px) {
    .btn-primary, .btn-secondary {
        padding: 8px 14px;
        font-size: 13px;
    }
}
