/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

body.index-page {
    background: url('image/background.png') no-repeat center center fixed;
    background-size: cover;
}

h1 {
    text-align: center;
    color: #7a0085;
    margin-bottom: 20px;
    font-family: 'Microsoft YaHei', sans-serif;
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 2px;
    color: #7a0085;
    padding: -90px 0 10px 0;
    transition: all 0.3s ease;
    margin-left: 40px;
}

h1:hover {
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    transform: scale(1.02);
}

/* 联想建议样式 */
.suggestions-container {
    position: relative;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: calc(100% - 124px);
    max-height: 260px;
    overflow-y: auto;
    z-index: 100;
    top: 0;
    left: 124px;
    margin-top: -1px;
    padding: 0;
    box-sizing: border-box;
    display: none;
}

/* 针对第二个输入框的特殊定位 */
.form-group:nth-child(2) {
    position: relative;
}

.form-group:nth-child(2) .suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: -1px;
    border: 2px solid #8a2be2;
    box-shadow: 0 0 8px 2px rgba(138, 43, 226, 0.3);
}

.suggestion-item {
    padding: 10.4px 15.6px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 18.2px;
    color: #333;
}

.suggestion-item:hover {
    background: #f5f5f5;
}

.suggestions-container.has-suggestions {
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 10px 0px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 50vh;
}

.header-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.stats-card {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 0 auto 25px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

.stat-item {
    min-width: 200px;
    margin: 0 10px;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.stat-item {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    transition: background 0.2s;
}

.stat-item:hover {
    background: rgba(0,123,255,0.05);
}

.stat-label {
    display: block;
    color: #7a0085;
    font-size: 19px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #ffa007;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    width: 100%;
    max-width: 1200px;
}

.tab {
    width: 240px;
    padding: 18px 0;
    border: none;
    border-radius: 50px;
    background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    border-right: 1px solid #ccc;
    height: 60px;
    line-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1),
                0 1px 3px rgba(0,0,0,0.08),
                inset 0 1px 0 rgba(255,255,255,0.5);
    font-size: 1.2em;
    font-weight: bold;
}

.tab:last-child {
    border-right: none;
}

.tab.active {
    background: #7a0085;
    color: white;
    box-shadow: 0 4px 8px rgba(122,0,133,0.3),
                inset 0 2px 4px rgba(0,0,0,0.2);
    border-radius: 8px !important;
}

.tab:hover {
    background: linear-gradient(to bottom, #7a0085, #8a0095);
    color: white;
    box-shadow: 0 6px 12px rgba(122,0,133,0.3),
                inset 0 2px 4px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.result-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-card {
    background: white;
    padding: 16px 16px 16px 150px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.results-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.label-first-letter {
    position: absolute;
    top: 50%;
    left: 33px;
    width: 64px;
    height: 64px;
    border-radius: 4px;
    text-align: center;
    line-height: 64px;
    font-size: 28px;
    font-weight: bold;
    color: white;
    transform: translateY(-50%);
}

.label-all { background-color: #007bff; }
.label-sprint { background-color: #28a745; }
.label-safe { background-color: #ffc107; }
.label-guarantee { background-color: #17a2b8; }
.label-caution { background-color: #dc3545; }

.result-card p {
    margin: 4px 75px 4px 0;
    color: #246fc4;
}

.result-card .school-type {
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    display: inline-block;
}

.card-headings {
    display: flex;
    align-items: baseline;
    gap: 1px;
    margin-bottom: -2px;
    margin-right: 150px;
}

.school-logo {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 4px;
}

.university-title {
    margin: 0px 56px 3px -3px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.major-subtitle {
    margin: 0 45px 0 -70px;
    font-size: 1em;
    color: #f8a20d;
    font-weight: bold;
    padding: 4px 25px;
    border-radius: 16px;
    display: inline-block;
}

.major-subtitle.public {
    background: #e8f5e9;
    color: #2e7d32;
}

.major-subtitle.private {
    background: #ffebee;
    color: #c62828;
}

.score {
    text-align: right;
    color: #007bff;
    font-weight: bold;
    margin-right: 75px;
}

.school-type {
    text-align: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
}

.school-type.public {
    background: #e8f5e9;
    color: #2e7d32;
}

.school-type.private {
    background: #ffebee;
    color: #c62828;
}

#searchForm button[type="submit"] {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    background-color: #7a0085;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

#searchForm button[type="submit"]:hover {
    background-color: #8a0095;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#searchForm {
    background: white;
    padding: 26px;
    border-radius: 10.4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 780px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.form-group label {
    min-width: 120px;
    text-align: right;
    font-weight: bold;
    color: #7a0085;
}

.form-group input,
.form-group select {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.notice-box {
    border-radius: 8px;
    padding: 30px;
    margin: 0 auto 20px;
    box-shadow: 0 0px 0px rgba(0,0,0,0.1);
    width: 50%;
}
.notice-box h3 {
    text-align: center;
    margin-bottom: 15px;
}
.notice-box p {
    text-align: justify;
    text-indent: 2em;
    margin-bottom: 10px;
    padding: 0 15px;
}

/* 兑换码弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px;
    border-radius: 8px;
    width: 400px;
    max-width: 80%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

#codeInput {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#confirmCode {
    background-color: #7a0085;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: all 0.3s;
}

#confirmCode:hover {
    background-color: #8a0095;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
