/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #ffffff;
    color: #021024;
    line-height: 1.6;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ===== 新增标题栏样式 ===== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 393px;
    margin: 0 auto;
    height: 60px;
    background: linear-gradient(135deg, #052659, #021024);
    color: #C1E8FF;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(2, 16, 36, 0.1);
}

.app-header h1 {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
    padding: 0;
}

/* ===== 主布局 ===== */
.app-main {
    padding-top: 60px; /* 修改为60px，与标题栏高度一致 */
    width: 100%;
    max-width: 393px;
    margin: 0 auto;
    padding-bottom: 80px;
    padding-left: 15px;
    padding-right: 15px;
    animation: fadeIn 0.5s ease-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

html {
    font-size: 14px;
}

/* ===== 搜索框 ===== */
.search-section {
    margin-bottom: 20px;
}

.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #7DA0CA;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(2, 16, 36, 0.05);
    background-color: white;
    color: #021024;
}

.search-input:focus {
    border-color: #5483B3;
    box-shadow: 0 4px 12px rgba(84, 131, 179, 0.2);
    outline: none;
}

.search-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #5483B3, #052659);
    color: #C1E8FF;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(84, 131, 179, 0.3);
}

.search-btn:hover {
    box-shadow: 0 4px 8px rgba(84, 131, 179, 0.3);
}

/* ===== 核心分栏布局 ===== */
.main-content-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

/* ===== 左侧筛选栏 ===== */
.filter-list {
    width: 100%;
    padding: 12px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(2, 16, 36, 0.08);
    border: 1px solid #7DA0CA;
}

.section-title {
    margin-bottom: 15px;
    color: #052659;
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #C1E8FF;
    text-align: center;
}

.filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-category {
    flex: 0 0 calc(50% - 4px);
    padding: 10px;
    background: white;
    border-radius: 8px;
    font-size: 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #7DA0CA;
    color: #021024;
}

.filter-category:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.filter-category.active {
    background: linear-gradient(135deg, #5483B3, #052659);
    color: #C1E8FF;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(84, 131, 179, 0.3);
    font-weight: 500;
}

/* ===== 右侧学校列表 ===== */
.school-list {
    width: 100%;
    padding: 12px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.school-list-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.school-list-container li {
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #5483B3;
    box-shadow: 0 2px 6px rgba(2, 16, 36, 0.03);
    transition: all 0.3s ease;
    border: 1px solid #7DA0CA;
    cursor: pointer;
    color: #021024;
}

.school-list-container li:hover {
    box-shadow: 0 2px 6px rgba(2, 16, 36, 0.03);
    border-color: #e2e8f0;
}

/* 修改院校详情页样式 */
.university-detail {
    display: none;
    padding: 15px;
    background-color: #f9fafc;
    min-height: calc(100vh - 140px); /* 确保内容区域足够高 */
    padding-bottom: 80px; /* 为底部导航留出空间 */
    overflow-y: auto; /* 允许内容滚动 */
}

.university-header {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
    padding: 15px 50px;
    background: linear-gradient(135deg, #052659, #021024);
    color: #C1E8FF;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(2, 16, 36, 0.1);
}

.university-header h1 {
    margin: 0 auto;
    max-width: calc(100% - 60px);
    color: #C1E8FF;
    font-size: 1rem;
    font-weight: 500;
}

.degree-tabs {
    display: flex;
    border-bottom: 1px solid #7DA0CA;
    margin-bottom: 1rem;
    position: sticky;
    top: 60px;
    background: white;
    z-index: 10;
    padding-top: 10px;
}

.degree-tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    color: #021024;
    cursor: pointer;
    font-size: 0.9rem;
    position: relative;
}

.degree-tab-btn.active {
    color: #5483B3;
    font-weight: 500;
}

.degree-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #5483B3;
}

.degree-content {
    display: none;
    padding-bottom: 30px; /* 为底部留出空间 */
}

.degree-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.info-section {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(2, 16, 36, 0.1);
    border: 1px solid #7DA0CA;
}

.info-section h3 {
    color: #052659;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.info-section p {
    font-size: 0.8rem;
    color: #021024;
    line-height: 1.6;
    white-space: pre-line;
}

/* 统一设置所有内容的最大宽度 */
.university-detail,
.university-header,
.degree-tabs,
.degree-content,
.info-section {
    max-width: 393px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 特定元素的额外样式 */
.university-detail {
    padding: 15px;
    background-color: #f9fafc;
}

.university-header {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #4a6bdf 0%, #1e88e5 100%);
    color: white;
    border-radius: 8px;
}

.info-section {
    margin-bottom: 15px;
}

/* ===== AI评估模块样式 - 小程序优化 ===== */
.ai-assessment {
    display: none;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 0 auto 15px; /* 修改这里，移除上方margin */
    width: calc(100% - 30px);
    max-width: 393px;
}

.ai-title {
    text-align: center;
    margin-bottom: 1rem;
    color: #052659;
    font-size: 1.2rem;
    font-weight: 600;
}

#assessment-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1rem;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #555;
    width: 100%;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #7DA0CA;
    border-radius: 6px;
    font-size: 0.9rem;
    box-sizing: border-box;
    color: #021024;
}

#assessment-result {
    width: 100%;
    box-sizing: border-box;
}

.radar-chart {
    width: 100%;
    height: 300px;
    background-image: url('../images/radar-chart.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin: 20px 0;
    padding: 20px;
    border-radius: 10px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(2, 16, 36, 0.08);
}

.result-item {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.8rem;
    box-sizing: border-box;
}

/* 按钮组调整 */
#submit-assessment, 
#back-to-form {
    width: 100%;
    padding: 0.8rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* 响应式微调 */
@media (max-width: 393px) {
    .ai-assessment {
        padding: 12px;
    }
    
    .form-control {
        padding: 0.7rem;
    }
    
    .radar-chart {
        height: 180px;
    }
}

/* ===== 用户信息页样式 ===== */
.profile-page {
    display: none;
    max-width: 393px;
    margin: 0 auto; /* 修改这里，移除上方margin */
    padding: 15px;
    padding-bottom: 80px;
    background-color: #f9fafc;
}

.profile-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #052659, #021024);
    color: #C1E8FF;
    border-radius: 8px;
}

.profile-header h2 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    font-weight: 600;
}

.profile-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.8rem;
    color: #C1E8FF;
}

.profile-container {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px; /* 确保有足够的空间 */
}

.profile-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e0e6ed;
}

.profile-section:last-child {
    border-bottom: none;
}

.profile-section h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.form-row .form-group {
    flex: 1;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #5483B3, #052659);
    color: #C1E8FF;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: #1e88e5;
}

.btn-secondary {
    background: white;
    color: #052659;
    padding: 10px 20px;
    border: 1px solid #7DA0CA;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: #f8f9fa;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.info-item {
    background: linear-gradient(to bottom right, #f5f9ff, #e6f0ff);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #1e88e5;
    transition: all 0.3s;
}

.info-item:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.pain-points h4 {
    color: #2c3e50;
    margin: 25px 0 15px;
    font-size: 1.2rem;
}

.pain-points ul {
    list-style: none;
    padding-left: 0;
}

.pain-points li {
    padding: 12px 0;
    display: flex;
    align-items: flex-start;
    font-size: 1rem;
    line-height: 1.6;
    border-bottom: 1px dashed #e0e6ed;
}

.pain-points li:last-child {
    border-bottom: none;
}

.pain-points li span {
    margin-right: 12px;
    color: #1e88e5;
    font-size: 1.2rem;
}

@media (max-width: 992px) {
    .about-cover h1 {
        font-size: 2.2rem;
    }
    
    .about-cover p {
        font-size: 1.2rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .profile-card {
        flex-direction: column;
    }
    
    .profile-image {
        flex: 1 1 100%;
        max-width: 100%;
        transform: none;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* 在小屏幕下回退到小程序风格 */
    .about-page {
        max-width: 393px !important;
        padding: 0 12px 25px;
    }
    
    .about-cover {
        padding: 50px 15px;
        margin-bottom: 30px;
    }
    
    .about-cover h1 {
        font-size: 1.8rem;
    }
    
    .about-cover p {
        font-size: 1rem;
    }
    
    .about-section {
        padding: 25px;
        margin-bottom: 25px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
        margin: 0 15px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-content {
        padding: 20px;
    }
}


/* 响应式设计 */
@media (max-width: 992px) {
    .about-nav-link {
        padding: 15px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .about-navbar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding: 0 15px;
    }
    
    .about-nav-menu {
        display: inline-flex;
        justify-content: flex-start;
    }
    
    .about-nav-link {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
    
    .about-nav-link.active::after {
        width: 80%;
    }
}

/* ===== 响应式关于我们导航栏 ===== */
.about-navbar {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e0e6ed;
}

.about-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

/* 桌面导航样式 */
.about-nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    transition: all 0.3s;
}

/* 修改现有的移动菜单按钮样式 */
.mobile-menu-btn {
    display: none; /* 默认隐藏 */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #4a5568;
    cursor: pointer;
    padding: 10px;
    margin-right: -10px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .about-nav-menu {
        position: fixed;
        top: 60px;
        right: 20px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.15);
        flex-direction: column;
        min-width: 180px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }
    
    .about-nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .about-nav-item {
        width: 100%;
    }
    
    .about-nav-link {
        padding: 12px 20px !important;
        display: block;
        width: 100%;
    }
    
    .about-nav-link.active::after {
        display: none;
    }
    
    .about-nav-link.active {
        background: #f5f9ff !important;
        color: #1e88e5;
    }
}

/* ===== 底部导航栏 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 393px;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 0.7rem;
    padding: 5px 8px;
    transition: all 0.3s ease;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

.nav-item.active {
    color: #1e88e5;
    transform: translateY(-3px);
}

.nav-item.active i {
    color: #1e88e5;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* 页面切换效果 */
.page-content {
    display: none;
}

.page-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* 响应式调整 */
@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .filter-category {
        flex: 0 0 calc(33.333% - 6px);
    }
    
    .profile-card {
        flex-direction: row;
    }
    
    .profile-image {
        flex: 0 0 150px;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.app-footer {
    display: none;
}
/* 修改现有的返回按钮样式 */
.back-button {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(193, 232, 255, 0.2);
    border: none;
    color: #C1E8FF;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    font-size: 1.2rem;
}

.back-button:hover {
    background: rgba(193, 232, 255, 0.3);
}

/* 首页搜索功能搜索高亮样式 */
.school-list-container li.highlight {
    background-color: #e3f2fd;
    border-left: 4px solid #1e88e5;
    box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.3);
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* ===== 历史记录页面样式 ===== */
.profile-history-page {
    display: none;
    max-width: 393px;
    margin: 0 auto;
    padding: 15px;
    padding-bottom: 80px;
    background-color: #f9fafc;
}

.history-container {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.history-item {
    padding: 15px;
    margin-bottom: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #1e88e5;
    transition: all 0.3s;
    cursor: pointer;
}

.history-item:hover {
    background: #f8fafc;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.history-item-content {
    font-size: 0.8rem;
    color: #4a5568;
}

.history-item-content div {
    margin-bottom: 4px;
}

/* 修改按钮组样式 */
.profile-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.profile-actions .btn {
    flex: 1;
    min-width: 100px;
    max-width: 120px;
}

.btn-tertiary {
    background-color: #f8f9fa;
    color: #1e88e5;
    padding: 10px 20px;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-tertiary:hover {
    background-color: #f8f9fa;
    border-color: #e2e8f0;
}

#submit-assessment {
    background: linear-gradient(135deg, #7c98b3, #637081);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(124, 152, 179, 0.3);
}

#submit-assessment:hover {
    box-shadow: 0 4px 8px rgba(124, 152, 179, 0.3);
}

.translate-button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(193, 232, 255, 0.2);
    border: 1px solid #C1E8FF;
    color: #C1E8FF;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.3s ease;
    z-index: 1001;
    line-height: 1.2;
}

.translate-button:hover {
    background: rgba(193, 232, 255, 0.3);
}

.translatable {
    transition: opacity 0.3s ease;
}

.translatable.translating {
    opacity: 0.5;
}

/* 市场调研部分样式 */
.market-analysis {
    margin-bottom: 40px;
}

.market-analysis h3 {
    color: #052659;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #C1E8FF;
}

.market-subsection {
    margin-bottom: 30px;
}

.market-subsection h4 {
    color: #052659;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.market-subsection h5 {
    color: #052659;
    font-size: 1.1rem;
    margin: 15px 0 10px;
}

.market-details ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

.market-details ul ul {
    list-style-type: circle;
    margin-top: 5px;
}

.market-details li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.info-table {
    width: 100%;
    overflow-x: auto;
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(2, 16, 36, 0.08);
}

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

.info-table th,
.info-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e6ed;
}

.info-table th {
    background: linear-gradient(135deg, #5483B3, #052659);
    color: #C1E8FF;
    font-weight: 500;
    white-space: nowrap;
}

.info-table tr:last-child td {
    border-bottom: none;
}

.info-table tr:hover {
    background-color: #f8fafc;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .market-analysis h3 {
        font-size: 1.3rem;
    }

    .market-subsection h4 {
        font-size: 1.1rem;
    }

    .market-subsection h5 {
        font-size: 1rem;
    }

    .info-table {
        margin: 10px 0;
    }

    .info-table th,
    .info-table td {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}