/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 28px;
}

.login-subtitle {
    text-align: center;
    color: #999;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* 注册按钮专用样式 - 覆盖默认100%宽度 */
.btn-secondary {
    width: auto !important;
    padding: 10px 30px !important;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    font-size: 14px;
    display: inline-block;
}

.btn-secondary:hover {
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.error-msg {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #c33;
}

/* 注册区域样式 */
.register-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.register-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

/* 推荐页面布局 */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-nickname {
    color: #666;
    font-size: 14px;
}

.btn-logout {
    padding: 8px 16px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-logout:hover {
    background: #e0e0e0;
    color: #333;
}

/* 主内容区 */
.main-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* 输入表单卡片 */
.input-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.card-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 20px;
    align-items: end;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.btn-submit {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    height: fit-content;
    transition: transform 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* 推荐结果区域 */
.results-section {
    display: none;
}

.results-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* 分类卡片 */
.category-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.card-header {
    padding: 20px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header.rush {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.card-header.stable {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.card-header.safe {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.badge {
    background: rgba(255,255,255,0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: normal;
}

.card-body {
    padding: 20px;
}

.school-list {
    list-style: none;
}

.school-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.school-item:last-child {
    border-bottom: none;
}

.school-item:hover {
    background: #f8f9fa;
    border-radius: 6px;
}

.school-name {
    font-weight: 500;
    color: #333;
    font-size: 15px;
}

.school-score {
    font-size: 13px;
    color: #888;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 4px;
}

.empty-tip {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 14px;
}

/* 分数显示标签 */
.score-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 8px;
}

.score-tag.high {
    background: #e8f5e9;
    color: #2e7d32;
}

.score-tag.medium {
    background: #fff3e0;
    color: #ef6c00;
}

.score-tag.low {
    background: #ffebee;
    color: #c62828;
}

/* 提示信息 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #1565c0;
}

.alert-warning {
    background: #fff3e0;
    color: #ef6c00;
    border-left: 4px solid #ef6c00;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    margin-top: 50px;
}

/* About页面样式 */
.about-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.about-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 100%;
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 30px;
}

.about-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 2px;
}

.about-body {
    padding: 40px;
    text-align: center;
}

.intro-text {
    color: #555;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 40px;
    text-align: justify;
    text-indent: 2em;
}

.qr-section {
    margin: 30px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.qr-label {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: block;
}

.qr-tip {
    color: #667eea;
    font-size: 14px;
    margin-top: 15px;
    display: block;
}

.wechat-qr {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: white;
    padding: 10px;
    display: inline-block;
    transition: transform 0.3s;
}

.wechat-qr:hover {
    transform: scale(1.05);
}

.back-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 30px;
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.back-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.footer-text {
    color: rgba(255,255,255,0.8);
    margin-top: 30px;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 480px) {
    .about-body {
        padding: 25px;
    }
    .intro-text {
        font-size: 15px;
    }
    .wechat-qr {
        width: 160px;
        height: 160px;
    }
}