/* 综合分类模块样式 */
#module-combined {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

#module-combined .combined-section {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

#module-combined .combined-section h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

#module-combined .result-row {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

#module-combined .result-row p {
    margin: 0;
    font-size: 1.1rem;
    padding: 8px 12px;
    background-color: #e9ecef;
    border-radius: 4px;
}

#module-combined #combinedInput {
    width: 100%;
    max-width: 500px;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    margin-bottom: 15px;
}

#module-combined .table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

#module-combined table {
    margin: 0 auto;
    border-collapse: collapse;
    width: 100%;
}

#module-combined th,
#module-combined td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

#module-combined th {
    background-color: #f8f9fa;
    font-weight: bold;
}

#module-combined .highlight {
    background-color: #ffeb3b;
}

#module-combined button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 5px;
}

#module-combined button:hover {
    background-color: #0056b3;
}

#module-combined #clearCombinedButton {
    background-color: #dc3545;
}

#module-combined #clearCombinedButton:hover {
    background-color: #c82333;
}

#module-combined .loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
    display: none;
}

/* 单双分类模块样式 */
#module-4 {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

#module-4 input[type="text"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

#module-4 button {
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    background-color: #4caf50;
    color: white;
    transition: background-color 0.3s;
}

#module-4 button:hover {
    background-color: #45a049;
}

#module-4 button:active {
    transform: scale(0.98);
}

#module-4 p {
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* 大小数分类模块样式 */
#module-6 {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

#module-6 textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    resize: vertical;
    min-height: 120px;
}

#module-6 #threshold6 {
    width: 200px;
    height: 30px;
    font-size: 16px;
    margin-bottom: 1rem;
}

#module-6 pre {
    background-color: #f4f4f4;
    padding: 10px;
    border: 1px solid #ccc;
    white-space: pre-wrap;
    font-size: 20px;
}

#module-6 .category {
    margin-top: 20px;
    font-weight: bold;
}

#module-6 .large {
    color: green;
}

#module-6 .small {
    color: red;
}

#module-6 .count {
    margin-top: 10px;
    font-style: italic;
}

/* 字头尾数统计模块样式 */
#module-7 {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

#module-7 .input-container {
    text-align: center;
    margin-bottom: 30px;
}

#module-7 #inputNumbers {
    width: 400px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
}

#module-7 button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 5px;
}

#module-7 button:hover {
    background-color: #0056b3;
}

#module-7 button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#module-7 #clearButton {
    background-color: #dc3545;
}

#module-7 #clearButton:hover {
    background-color: #c82333;
}

#module-7 .table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

#module-7 table {
    margin: 0 auto;
    border-collapse: collapse;
    width: 100%;
}

#module-7 th,
#module-7 td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

#module-7 th {
    background-color: #f8f9fa;
    font-weight: bold;
}

#module-7 .highlight {
    background-color: #ffeb3b;
}

#module-7 .stats {
    text-align: center;
    margin-top: 20px;
    font-size: 18px;
    color: #555;
}

#module-7 .error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 10px;
}

#module-7 .loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#module-7 .stats-table th {
    background-color: #e9ecef;
}

#module-7 .stats-table td:first-child {
    background-color: #f1f3f5;
}

#module-7 .stats-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* 默认隐藏所有模块 */
.module {
    display: none;
}

/* 显示当前活动的模块 */
.module.active {
    display: block;
}

/* 导航栏样式 */
.navbar {
    margin-bottom: 20px;
}

.nav-link {
    cursor: pointer;
}

/* 默认隐藏所有模块 */
.module {
    display: none;
}

/* 显示当前活动的模块 */
.module.active {
    display: block;
}

/* 导航栏样式 */
.navbar {
    margin-bottom: 20px;
}

.nav-link {
    cursor: pointer;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 字头尾大小数样式修改 */
#module-combined .stats-table {
    position: relative;
    margin-top: 20px;
}

/* 小数和大数表头样式 */
.stats-table .range-header {
    position: absolute;
    top: -25px;
    font-weight: bold;
    text-align: center;
    padding: 3px 0;
}

.stats-table .range-header.small {
    color: #dc3545;
    /* 红色 */
    left: 25%;
    /* 调整位置 */
    transform: translateX(-50%);
}

.stats-table .range-header.large {
    color: #28a745;
    /* 绿色 */
    left: 75%;
    /* 调整位置 */
    transform: translateX(-50%);
}

/* 最底下的总字头统计表格 */
#combinedAllPrefixStats .stats-table {
    border-collapse: collapse;
    position: relative;
}

/* 0字头*/
#combinedAllPrefixStats .stats-table th:nth-child(2),
#combinedAllPrefixStats .stats-table td:nth-child(2) {
    border-left: 2px solid #dc3545 !important;
}

/* 7字头 */
#combinedAllPrefixStats .stats-table th:last-child,
#combinedAllPrefixStats .stats-table td:last-child {
    border-right: 2px solid #28a745 !important;
}

/* 3字头和4字头之间 */
#combinedAllPrefixStats .stats-table th:nth-child(6),
#combinedAllPrefixStats .stats-table td:nth-child(6) {
    border-left: 2px solid #000 !important;
}

/* 其他边框灰色 */
#combinedAllPrefixStats .stats-table th,
#combinedAllPrefixStats .stats-table td {
    border: 1px solid #ddd;
}

/* 小数和大数分类标题样式 */
#combinedAllPrefixStats .stats-table .range-header.small {
    color: #dc3545;
    left: 25%;
    transform: translateX(-50%);
}

#combinedAllPrefixStats .stats-table .range-header.large {
    color: #28a745;
    left: 75%;
    transform: translateX(-50%);
}

/* 第一行边框 */
.stats-table tr:first-child th.small-range,
.stats-table tr:first-child td.small-range {
    border-top: 2px solid #dc3545 !important;
}

.stats-table tr:first-child th.large-range,
.stats-table tr:first-child td.large-range {
    border-top: 2px solid #28a745 !important;
}

/* 最后一行边框 */
.stats-table tr:last-child th.small-range,
.stats-table tr:last-child td.small-range {
    border-bottom: 2px solid #dc3545 !important;
}

.stats-table tr:last-child th.large-range,
.stats-table tr:last-child td.large-range {
    border-bottom: 2px solid #28a745 !important;
}
