/* 前台样式 - 云端风格 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.header {
    text-align: center;
    color: white;
    padding: 40px 0;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 48px;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 18px;
    opacity: 0.9;
}

/* 主内容 */
.main-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

/* 表单卡片 */
.analysis-form-container {
    margin-bottom: 40px;
}

/* 分段信息显示 */
.segment-info {
    margin-bottom: 25px;
}

.segment-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    color: white;
}

.segment-icon {
    font-size: 48px;
    line-height: 1;
}

.segment-content h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.segment-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

.score-highlight,
.rank-highlight {
    font-size: 24px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0 5px;
}

.form-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    padding: 30px;
}

.form-card h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #333;
}

.analysis-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.label-icon {
    font-size: 20px;
}

.form-group label small {
    font-weight: normal;
    color: #666;
    font-size: 12px;
}

.form-group input {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-link {
    background: transparent;
    color: #667eea;
    padding: 0;
    text-decoration: underline;
}

.btn-link:hover {
    color: #5568d3;
}

/* 提示框 */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

/* 结果区域 */
.results-container {
    margin-top: 40px;
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-header h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
}

.results-summary {
    font-size: 16px;
    color: #666;
}

.results-summary strong {
    color: #667eea;
    font-size: 20px;
}

/* 结果分类 */
.result-section {
    margin-bottom: 50px;
}

.section-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    color: #333;
    margin-bottom: 8px;
}

.section-header h3 small {
    font-weight: normal;
    color: #666;
    font-size: 16px;
}

.section-desc {
    color: #666;
    font-size: 14px;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.badge-safe {
    background: #d4edda;
    color: #155724;
}

.badge-stable {
    background: #fff3cd;
    color: #856404;
}

.badge-rush {
    background: #f8d7da;
    color: #721c24;
}

/* 结果网格 */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* 结果卡片 */
.result-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.safe-section .result-card {
    border-left: 4px solid #28a745;
}

.stable-section .result-card {
    border-left: 4px solid #ffc107;
}

.rush-section .result-card {
    border-left: 4px solid #dc3545;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
}

.college-logo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.college-info h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.major-name {
    font-size: 14px;
    color: #666;
}

.card-body {
    padding: 20px;
}

.score-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
}

.score-label {
    font-size: 14px;
    color: #666;
}

.score-value {
    font-size: 24px;
    font-weight: 600;
    color: #667eea;
}

.intro {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.card-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* 无结果 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* 页脚 */
.footer {
    text-align: center;
    color: white;
    padding: 30px 0;
    opacity: 0.8;
}

/* 专业数量显示 */
.major-count {
    font-size: 14px;
    color: #667eea;
    font-weight: 500;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
    padding: 20px;
    box-sizing: border-box;
}

.modal[style*="display: flex"],
.modal.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white !important;
    border-radius: 16px !important;
    width: 90% !important;
    max-width: 700px !important;
    max-height: 80vh !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    animation: slideUp 0.3s;
    margin: 0 auto !important;
    position: relative !important;
    overflow: hidden !important;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 25px !important;
    border-bottom: 1px solid #e0e0e0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: #f8f9fa !important;
    border-radius: 16px 16px 0 0 !important;
}

.modal-header h2 {
    margin: 0 !important;
    font-size: 24px !important;
    color: #333 !important;
    font-weight: 600 !important;
}

.modal-close {
    font-size: 32px !important;
    font-weight: 300 !important;
    color: #999 !important;
    cursor: pointer !important;
    line-height: 1 !important;
    transition: color 0.3s !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-close:hover {
    color: #333 !important;
    background: #f0f0f0 !important;
    border-radius: 50% !important;
}

.modal-body {
    padding: 25px !important;
    overflow-y: auto !important;
    flex: 1 !important;
    background: white !important;
}

.modal-major-item {
    padding: 20px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    margin-bottom: 15px !important;
    transition: all 0.3s !important;
    background: white !important;
}

.modal-major-item:hover {
    border-color: #667eea !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1) !important;
    transform: translateY(-2px) !important;
}

.major-item-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 10px !important;
}

.major-item-header h4 {
    margin: 0 !important;
    font-size: 18px !important;
    color: #333 !important;
    font-weight: 600 !important;
}

.major-score {
    font-size: 16px !important;
    color: #667eea !important;
    font-weight: 600 !important;
    background: #f0f4ff !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
}

.major-intro {
    margin: 0 !important;
    margin-top: 10px !important;
    font-size: 14px !important;
    color: #666 !important;
    line-height: 1.6 !important;
}

/* 响应式 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 32px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h3 {
        font-size: 20px;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .major-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

