:root {
    --purple: #b6a4ff;
    --purple-deep: #7164f6;
    --blue: #1677ff;
    --cyan: #20c6d7;
    --ink: #102033;
    --muted: #637083;
    --line: #9fd0ee;
    --danger: #b42318;
    --danger-bg: #fff5f5;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

/* =========================================================
   首页：紧凑浅紫校园风，减少遮罩，让建筑更清楚
   ========================================================= */

body.home-body {
    min-height: 100vh;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(182,164,255,0.12) 32%, rgba(36,44,92,0.32) 100%),
        linear-gradient(110deg, rgba(160,141,255,0.18) 0%, rgba(255,255,255,0.02) 50%, rgba(32,198,215,0.13) 100%),
        url("/static/images/school_bg.jpg");
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
}

body.home-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 50% 9%, rgba(255,255,255,0.30), transparent 22%),
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(12,24,55,0.24));
}

.home-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 30px 16px;
}

.home-header {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.school-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-shadow: 0 5px 18px rgba(20, 30, 60, 0.34);
}

.school-brand strong {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.brand-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d5caff, #62e0da);
    box-shadow: 0 0 22px rgba(182,164,255,0.82);
}

.home-hero {
    flex: 1;
    width: min(1060px, 100%);
    margin: 0 auto;
    padding: 6.5vh 0 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-copy {
    text-align: center;
}

.english-name {
    display: inline-block;
    padding: 0 16px;
    border-left: 3px solid #f5d66d;
    border-right: 3px solid #f5d66d;
    color: #fff7d6;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1.55;
    text-transform: uppercase;
    text-shadow: 0 4px 16px rgba(30, 35, 80, 0.34);
}

.hero-copy h1 {
    margin: 18px 0 12px;
    color: #fff;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-shadow: 0 12px 32px rgba(18, 28, 70, 0.38);
}

.hero-copy p {
    width: min(760px, 100%);
    margin: 0 auto;
    color: rgba(255,255,255,0.96);
    font-size: 20px;
    line-height: 1.7;
    text-shadow: 0 5px 18px rgba(18, 28, 70, 0.36);
}

.query-box {
    width: min(940px, 100%);
    margin: 30px auto 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

.query-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 180px;
    gap: 16px;
    align-items: end;
}

.field {
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-shadow: 0 4px 16px rgba(20,30,60,0.32);
}

input {
    width: 100%;
    height: 55px;
    border: 1px solid rgba(255,255,255,0.74);
    border-radius: 16px;
    padding: 0 17px;
    outline: none;
    background: rgba(255,255,255,0.94);
    color: var(--ink);
    font-size: 18px;
    box-shadow: 0 12px 30px rgba(18, 28, 70, 0.14);
}

input::placeholder {
    color: #98a2b3;
}

input:focus {
    border-color: var(--purple);
    box-shadow:
        0 0 0 4px rgba(182,164,255,0.22),
        0 12px 30px rgba(18, 28, 70, 0.18);
}

button {
    height: 55px;
    border: none;
    border-radius: 16px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.22), transparent 42%),
        linear-gradient(135deg, var(--purple-deep), var(--blue) 52%, var(--cyan));
    box-shadow: 0 16px 32px rgba(82, 96, 240, 0.30);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.home-alert {
    margin: 0 0 14px;
    padding: 11px 14px;
    border-radius: 14px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 14px;
    line-height: 1.6;
}

.home-hint {
    margin-top: 14px;
    color: rgba(255,255,255,0.92);
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    text-shadow: 0 4px 15px rgba(20,30,60,0.32);
}

.home-footer {
    margin-top: auto;
    padding-top: 14px;
    color: rgba(255,255,255,0.88);
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    letter-spacing: 0.02em;
    text-shadow: 0 4px 15px rgba(20,30,60,0.36);
}

/* =========================================================
   查询结果页：简洁表格，适合手机截图保存
   ========================================================= */

body.table-result-body {
    min-height: 100vh;
    color: #1f2937;
    background: #f6fbff;
}

body.table-result-body::before {
    display: none;
}

.table-result-page {
    width: min(760px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 30px 16px 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
}

.table-result-header {
    text-align: center;
    padding: 8px 0 24px;
}

.school-title {
    color: #1677ff;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.table-result-header h1 {
    margin: 16px 0 0;
    color: #1f2937;
    font-size: clamp(30px, 8vw, 42px);
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.result-table-card {
    overflow: hidden;
    border: 1px solid #9fd0ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(22, 119, 255, 0.10);
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.result-table th,
.result-table td {
    border-bottom: 1px solid #9fd0ee;
    padding: 17px 18px;
    font-size: 20px;
    line-height: 1.45;
    text-align: left;
    word-break: break-all;
}

.result-table tr:last-child th,
.result-table tr:last-child td {
    border-bottom: none;
}

.result-table th {
    width: 32%;
    color: #111827;
    background: #eef7ff;
    font-weight: 900;
    white-space: nowrap;
}

.result-table td {
    color: #111827;
    background: #ffffff;
    font-weight: 700;
}

.table-return-btn {
    display: block;
    width: min(360px, 100%);
    height: 52px;
    line-height: 52px;
    margin: 28px auto 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--purple-deep), var(--blue), var(--cyan));
    box-shadow: 0 12px 28px rgba(22, 119, 255, 0.22);
    text-align: center;
    text-decoration: none;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.table-result-footer {
    padding-top: 24px;
    color: #6b7f90;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

/* =========================================================
   手机端优化
   ========================================================= */

@media (max-width: 860px) {
    body.home-body {
        background-attachment: scroll;
        background:
            linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(182,164,255,0.10) 30%, rgba(21,31,70,0.36) 100%),
            linear-gradient(105deg, rgba(182,164,255,0.16), rgba(255,255,255,0.02), rgba(32,198,215,0.12)),
            url("/static/images/school_bg.jpg");
        background-size: cover;
        background-position: center top;
    }

    .home-page {
        padding: 18px 16px 14px;
    }

    .school-brand strong {
        font-size: 20px;
    }

    .home-hero {
        justify-content: flex-start;
        padding: 5vh 0 16px;
    }

    .english-name {
        max-width: 100%;
        padding: 0 12px;
        font-size: 12px;
        letter-spacing: 0.07em;
        line-height: 1.45;
    }

    .hero-copy h1 {
        margin: 14px 0 10px;
        font-size: clamp(38px, 11vw, 52px);
        letter-spacing: 0.035em;
    }

    .hero-copy p {
        width: min(680px, 100%);
        font-size: 16px;
        line-height: 1.65;
    }

    .query-box {
        margin-top: 26px;
        padding: 0;
        background: transparent;
        border: none;
    }

    .query-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    label {
        margin-bottom: 7px;
    }

    input,
    button {
        height: 52px;
        font-size: 17px;
        border-radius: 15px;
    }

    .home-hint {
        margin-top: 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .home-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .school-brand strong {
        font-size: 19px;
    }

    .brand-dot {
        width: 12px;
        height: 12px;
    }

    .home-hero {
        padding-top: 4.2vh;
    }

    .hero-copy h1 {
        font-size: 39px;
        line-height: 1.08;
    }

    .hero-copy p {
        font-size: 15.5px;
    }

    .query-box {
        margin-top: 22px;
    }

    .table-result-page {
        padding: 24px 16px 18px;
    }

    .school-title {
        font-size: 20px;
    }

    .table-result-header h1 {
        font-size: 32px;
    }

    .result-table th,
    .result-table td {
        padding: 15px 14px;
        font-size: 18px;
    }

    .result-table th {
        width: 34%;
    }
}

/* =========================================================
   当前版微调：主页版权固定在手机可视区域底部上方
   目的：不同手机屏幕打开时，不需要上滑也能看到版权文字
   ========================================================= */

body.home-body .home-page {
    min-height: 100svh;
    padding-bottom: 58px;
}

body.home-body .home-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 20;
    margin-top: 0;
    padding: 0 14px;
    color: rgba(255,255,255,0.92);
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    letter-spacing: 0.02em;
    text-shadow: 0 4px 14px rgba(20,30,60,0.42);
    pointer-events: none;
}

@media (max-width: 860px) {
    body.home-body .home-page {
        min-height: 100svh;
        padding-bottom: 54px;
    }

    body.home-body .home-footer {
        bottom: max(14px, env(safe-area-inset-bottom));
        font-size: 12.5px;
    }
}

@media (max-width: 860px) and (max-height: 720px) {
    body.home-body .home-page {
        padding-bottom: 48px;
    }

    body.home-body .home-footer {
        bottom: max(10px, env(safe-area-inset-bottom));
        font-size: 12px;
    }
}

/* =========================================================
   当前版微调：手机输入时隐藏主页版权，避免遮挡查询按钮
   ========================================================= */

body.home-body:focus-within .home-footer {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
}

body.home-body .home-footer {
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

