/* 平滑滚动和基础优化 */
html {
    scroll-behavior: smooth;
}

::selection {
    background: rgba(241, 196, 15, 0.3);
    color: #b8190e;
}

::-webkit-scrollbar {
    width: 5px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #b0c4de, #b8190e);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #b8190e, #1a252f);
}

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

body {
    font-family: "Segoe UI",serif;
    background-color: #f8f5f0;
    background-image:url('pic/2.webp');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    font-size: 1.2vw;
    color: #b8190e;
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: linear-gradient(135deg,#b8190e );
    color: #ecf0f1;
    padding: 1.1vw 2vw;           
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);      
}

.nav-brand {
    font-size: 1.5vw;
    font-weight: bold;
    letter-spacing: 0.2vw;           
    font-family: 'CNHeavy', serif;
    position: relative;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2.8vw;                      
}

.nav-menu a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0;               
    padding: 0.56vw 0;              
    position: relative;
    font-size: 1.3vw;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;                     
    background: linear-gradient(90deg, #f1c40f, #e67e22);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

footer {
    text-align: center;
    padding: 0.7vw 1.2vw;             /* 原 0.7rem=11.2px → 0.78vw；1rem=16px→1.11vw取1.2vw */
    color: #d3a07a;
    font-size: 0.8vw;
    margin-top: auto;
    position: relative;
    webp: 'CNHeavy', serif;
    background-color: #b8190e;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;                       /* 3px → 0.21vw */
    background: linear-gradient(90deg, transparent, #f1c40f, transparent);
}

footer p {
    position: relative;
    display: inline-block;
}

footer p::before,
footer p::after {
    content: "❖";
    margin: 0 1.2vw;                   /* 原 0 1rem → 1.2vw */
    color: #f1c40f;
    opacity: 0.6;
}

.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    flex: 1;
    width: 100%;
}

.search-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,245,240,0.9) 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.08);
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: "※";
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 2rem;
    color: rgba(44, 62, 80, 0.1);
    font-family: 'CNHeavy', serif;
}

.search-section::after {
    content: "※";
    position: absolute;
    bottom: 20px;
    right: 30px;
    font-size: 2rem;
    color: rgba(44, 62, 80, 0.1);
    font-family: 'CNHeavy', serif;
}

.search-section h1 {
    font-size: 3rem;
    color: #b8190e;
    margin-bottom: 2rem;
    font-weight: 700;
    font-family: 'CNHeavy', serif;
    letter-spacing: 0.15em;
    border-bottom: 3px double #d3a07a;
    display: inline-block;
    padding-bottom: 0.8rem;
    position: relative;
}

.search-section h1::before,
.search-section h1::after {
    content: "◆";
    position: absolute;
    bottom: -8px;
    font-size: 0.8rem;
    color: #b8190e;
}

.search-section h1::before {
    left: -20px;
}

.search-section h1::after {
    right: -20px;
}

.mode-toggle {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    display: inline-flex;
    background: rgba(44, 62, 80, 0.05);
    padding: 0.5rem;
    border-radius: 30px;
    gap: 0.5rem;
}

.mode-toggle label {
    margin: 0;
    cursor: pointer;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mode-toggle label:hover {
    background: rgba(44, 62, 80, 0.08);
}

.mode-toggle input[type="radio"] {
    margin-right: 0;
    transform: scale(1.2);
    accent-color: #b8190e;
}

.mode-toggle input[type="radio"]:checked + span,
.mode-toggle label:has(input:checked) {
    background: #b8190e;
    color: white;
}

.search-box {
    display: flex;
    justify-content: center;
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.search-box input[type="text"] {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid #d0d7dd;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.9);
    font-family: 'CNHeavy', serif;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.search-box input[type="text"]:focus {
    border-color: #b8190e;
    box-shadow: 0 0 0 4px rgba(44, 62, 80, 0.1), inset 0 2px 4px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.search-box input[type="text"]::placeholder {
    color: #95a5a6;
    font-style: italic;
}

.search-box button {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #b8190e 0%, #f0655c 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
    font-family: 'CNHeavy', serif;
    letter-spacing: 0.1em;
}

.search-box button:hover {
    background: linear-gradient(135deg, #f0655c 0%, #b8190e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 69, 69, 0.4);
}

.search-box button:active {
    transform: translateY(0);
}

.results-section {
    margin-top: 2rem;
}

.result-block {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.result-block h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-left: 5px solid #f1c40f;
    padding-left: 1rem;
}

.result-block h2 small {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: normal;
    margin-left: 0.8rem;
}

.pagination-info {
    margin: 1rem 0;
    color: #555;
    font-style: italic;
}

.table-wrapper {
    overflow-x: auto;
    margin: 1rem 0;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: fixed; 
   
}

.result-table th:nth-child(1),
.result-table td:nth-child(1) { width: 40px; } 

.result-table th:nth-child(2),
.result-table td:nth-child(2) { width: 40px; } 

.result-table th:nth-child(3),
.result-table td:nth-child(3) { width: 100px; }  

.result-table th:nth-child(4),
.result-table td:nth-child(4) {
    width: 100px;          
    word-wrap: break-word; 
    white-space: normal;   
}

.result-table th:nth-child(5),
.result-table td:nth-child(5) {
    width: 250px;
    word-wrap: break-word;
    white-space: normal;
}

.result-table th:nth-child(10),
.result-table td:nth-child(10) {
    width: 150px;
    word-wrap: break-word;
    white-space: normal;
}
.result-table th:nth-child(11),
.result-table td:nth-child(11) {
    width: 150px;
    word-wrap: break-word;
    white-space: normal;
}
.result-table th:nth-child(12),
.result-table td:nth-child(12) {
    width: 150px;
    word-wrap: break-word;
    white-space: normal;
}
.result-table th:nth-child(13),
.result-table td:nth-child(13) {
    width: 150px;
    word-wrap: break-word;
    white-space: normal;
}
.result-table th,
.result-table td {
    border: 1px solid #d0d7dd;
    padding: 0.6rem 0.8rem;
    text-align: left;
    vertical-align: top; 
    color: #1e2b37;
}

.result-table th {
    background-color: #e9edf2;
    font-weight: 600;
    color: #1e2b37;
}

.result-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.result-table tr:hover {
    background-color: #f0f7ff;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.pagination a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 6px;
    transition: 0.2s;
    border: 1px solid #b0c4de;
}

.pagination a.active,
.pagination a:hover {
    background-color: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.no-result,
.welcome-message {
    padding: 2rem;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    color: #7f8c8d;
    font-size: 1.1rem;
    border: 1px dashed #ccc;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-menu {
        gap: 1.2rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-section h1 {
        font-size: 1.6rem;
        letter-spacing: 0.1em;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box button {
        width: 100%;
    }
    
    .mode-toggle {
        flex-direction: column;
        width: 100%;
    }
    
    .result-block {
        padding: 1.5rem 1rem;
    }
    
    .result-block h2 {
        font-size: 1.3rem;
    }
    
    .table-wrapper {
        border-radius: 8px;
    }
    
    .result-table {
        font-size: 0.8rem;
    }
    
    .result-table th,
    .result-table td {
        padding: 0.6rem 0.4rem;
    }
}

@media print {
    .navbar,
    .search-section,
    .pagination,
    footer {
        display: none;
    }
    
    .result-block {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}