/* 全局重置与字体 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f4f7fb;
    color: #1e2b3c;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,10,30,0.08);
    padding: 30px;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #0a2942;
    border-left: 6px solid #2b6f9b;
    padding-left: 20px;
}

/* 首页卡片网格 */
.list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.list-card {
    background: linear-gradient(145deg, #ffffff, #f5f9ff);
    border-radius: 20px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 20px rgba(0,20,50,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(43,111,155,0.1);
}

.list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(21,88,133,0.15);
    border-color: #2b6f9b;
}

.list-card h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #144a70;
}

.list-card p {
    color: #4a6572;
    font-size: 0.95rem;
}

/* 查询表单卡片 */
.query-forms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.card {
    background: #f9fcff;
    border-radius: 20px;
    padding: 24px 20px;
    border: 1px solid #dde7f0;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #1c4b72;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card input {
    padding: 12px 16px;
    border: 2px solid #d4e0e9;
    border-radius: 40px;
    font-size: 1rem;
    transition: border 0.2s;
}

.card input:focus {
    outline: none;
    border-color: #2b6f9b;
}

.card button {
    background: #2b6f9b;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.card button:hover {
    background: #1d4f73;
}

/* 表格样式 */
.table-responsive {
    overflow-x: auto;
    margin: 25px 0;
    border-radius: 16px;
    border: 1px solid #e2eaf2;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th {
    background: #1e3a5f;
    color: white;
    font-weight: 600;
    padding: 14px 12px;
    font-size: 0.95rem;
    white-space: nowrap;
}

td {
    padding: 12px;
    border-bottom: 1px solid #e2eaf2;
    text-align: center;
}

tr:hover {
    background-color: #f0f7fd;
}

/* 提示信息 */
.no-data, .no-result, .error {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: #5f6c7a;
    background: #f0f5fa;
    border-radius: 40px;
    margin: 20px 0;
}

.error {
    color: #b33c2e;
    background: #ffeae7;
}

/* 头部链接 */
.back-link {
    display: inline-block;
    margin-top: 10px;
    color: #2b6f9b;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.schedule-header, .result-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px dashed #bdd3e8;
}

.date {
    color: #3f607d;
    font-size: 1.1rem;
    margin: 5px 0;
}

.train-info {
    background: #eaf3fc;
    padding: 20px;
    border-radius: 20px;
    margin: 20px 0;
}

table a {
    color: #1e3a5f;
    text-decoration: none;
    border-bottom: 1px dashed #7a9cbb;
}
table a:hover {
    border-bottom: 1px solid #1e3a5f;
}

/* 自动完成下拉框样式 */
.autocomplete {
    position: relative;
    display: inline-block;
    width: 100%;
}
.autocomplete-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    border-bottom: none;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #d4d4d4;
}
.autocomplete-items div:hover {
    background-color: #e9e9e9;
}
.autocomplete-active {
    background-color: #2b6f9b !important;
    color: #ffffff;
}
.autocomplete-items small {
    float: right;
    color: #999;
}
/* 提示文字样式 */
.query-note {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
    text-align: left;
    padding-left: 4px;
}

/* 页脚样式 */
.site-footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #dde7f0;
    color: #5f6c7a;
    font-size: 0.9rem;
}

/* 响应式微调 */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    h1 {
        font-size: 1.6rem;
    }
    .list-grid {
        grid-template-columns: 1fr;
    }
    .query-forms {
        grid-template-columns: 1fr;
    }
    th, td {
        padding: 8px 6px;
        font-size: 0.9rem;
    }
}

/* 平板优化 */
@media (min-width: 601px) and (max-width: 900px) {
    .list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}