body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 10px auto;
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 1000px;
    box-sizing: border-box;
}

h1 {
    text-align: center;
    color: #ff5722;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.6em;
}

h2 {
    border-bottom: 2px solid #ff5722;
    padding-bottom: 6px;
    margin-top: 15px;
    margin-bottom: 8px;
    color: #555;
    font-size: 1.2em;
}

/* Configuration Section */
#config-section {
    padding: 10px 15px;
    background-color: #ffe0b2;
    border-radius: 6px;
    margin-bottom: 15px;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.config-header h2 {
    border-bottom: none;
    margin: 0;
    padding: 0;
    font-size: 1.15em;
    color: #444;
}

.mode-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px 15px;
    align-items: flex-end;
    padding: 6px 0;
    border-top: 1px dashed #ff9800;
}

#config-section .input-group {
    display: flex;
    flex-direction: column;
    min-width: 100px;
}

#config-section .input-group label {
    font-size: 0.88em;
    margin-bottom: 3px;
    color: #333;
    font-weight: 500;
}

input[type="number"],
input[type="text"],
select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 0.95em;
    width: 100%;
    height: 38px;
    background-color: #fff;
}

#config-section button,
.mode-group button,
#multi-category-toggle {
    padding: 8px 18px;
    background-color: #ff5722;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: background-color 0.2s;
    height: 38px;
    min-width: 130px;
    box-sizing: border-box;
    white-space: nowrap;
}

#config-section button:hover,
.mode-group button:hover,
#multi-category-toggle:hover {
    background-color: #e64a19;
}

#preset-toggle-btn {
    padding: 3px 10px !important;
    font-size: 0.82em !important;
    height: 28px !important;
    min-height: 28px !important;
    min-width: auto !important;
    background-color: #ff9800 !important;
    border-radius: 4px !important;
}

#preset-toggle-btn:hover {
    background-color: #f57c00 !important;
}

/* Number Lists */
#number-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.number-card {
    background-color: #fff3e0;
    padding: 10px 14px;
    border-radius: 6px;
    border-left: 5px solid #ff9800;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-height: 75px;
    box-sizing: border-box;
}

.number-card p {
    font-size: 1.05em;
    word-wrap: break-word;
    margin-top: 4px;
    margin-bottom: 0;
    color: #333;
}

.number-card strong {
    color: #ff5722;
    font-size: 0.95em;
}

/* Multi-Category Section Style */
#multi-category-section {
    margin-top: 20px;
    padding: 14px 18px;
    border: 2px solid #007bff;
    border-radius: 8px;
    background-color: #e9f7ff;
}

.multi-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.multi-category-header h2 {
    border-bottom: none;
    margin: 0;
    padding: 0;
    color: #007bff;
    font-size: 1.15em;
}

#multi-category-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#multi-category-results li {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-bottom: 1px dashed #ccc;
    line-height: 1.5;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

#multi-category-results li strong {
    font-size: 1em;
    color: #007bff;
    margin-right: 8px;
}

.diff-table {
    width: 100%;
    margin-top: 6px;
    border-collapse: collapse;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.diff-table td {
    padding: 3px 6px;
    border-bottom: 1px dashed #b3e5fc;
}

.hidden {
    display: none !important;
}

/* Search/Check Section */
#checker-section {
    background-color: #f0f0f0;
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

#checker-section p {
    margin: 4px 0 8px 0;
    font-size: 0.9em;
    color: #555;
}

.chart-wrapper {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin-top: 8px;
    height: 160px;
}

.is-member {
    color: #28a745;
    font-weight: bold;
}

.not-member {
    color: #dc3545;
    font-weight: bold;
}

#seqNextNumLabel {
    display: none;
}

@media (max-width: 1050px) {
    .container {
        width: 96%;
    }
}

@media (max-width: 600px) {
    .mode-group {
        flex-direction: column;
        align-items: stretch;
    }
    .mode-group button {
        width: 100%;
    }
    .multi-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
