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

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: rotate(0deg) translate(0, 0); }
    50% { transform: rotate(10deg) translate(10px, 10px); }
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* 头部内容布局 */
.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 8px 5px 0px 5px;
}

.header-logo {
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: -35px;
}

.header-text {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.header-text h1 {
    margin-bottom: 15px;
    line-height: 1.1;
    font-size: 3rem;
    letter-spacing: 2px;
}

.header-text p {
    line-height: 1.3;
    margin: 0 0 -10px 0;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 8px 5px 0px 5px;
    }
    
    .header-logo {
        width: 150px;
        height: 30px;
        margin-bottom: -6px;
        margin-top: -20px;
    }
    
    .header-text h1 {
        font-size: 1.8rem;
        margin: 0 0 8px 0;
        line-height: 1.1;
        letter-spacing: 0px;
    }
    
    .header-text p {
        font-size: 1rem;
        line-height: 1.2;
        letter-spacing: 0px;
    }
    
    .header-text {
        text-align: center;
    }
}

/* 主内容区域 */
.main-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    flex: 1;
    margin-bottom: 30px;
}

/* 卡片通用样式 */
.card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

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

.card h2 {
    color: #4a5568;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.card h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: #667eea;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
    position: relative;
    z-index: 1;
}

.form-group select:hover,
.form-group input:hover {
    border-color: #cbd5e0;
}

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

/* 按钮样式 */
.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.45);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 结果区域样式 */
.result-content {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.result-placeholder {
    color: #a0aec0;
    font-style: italic;
    text-align: center;
    font-size: 1.1rem;
    padding: 20px;
    border-radius: 10px;
    background: #f7fafc;
    border: 2px dashed #e2e8f0;
    width: 100%;
}

.result-success {
    text-align: center;
    color: #2d3748;
    padding: 20px;
    animation: fadeIn 0.6s ease-out;
}

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

.result-success h3 {
    color: #38a169;
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.result-success .converted-score {
    font-size: 3.5rem;
    font-weight: bold;
    color: #667eea;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(102, 126, 234, 0.2);
    position: relative;
    display: inline-block;
}

.result-success .converted-score::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    border-radius: 2px;
}

.result-warning {
    text-align: center;
    color: #e53e3e;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 20px;
    background: #fed7d7;
    border-radius: 10px;
    border-left: 4px solid #f56565;
}

/* 信息卡片样式 */
.info-content {
    color: #4a5568;
    line-height: 1.7;
}

.info-content p {
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.info-content ul {
    margin-left: 20px;
    margin-top: 15px;
}

.info-content li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 10px;
}

.info-content li::before {
    content: '•';
    color: #667eea;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* 底部样式 */
.footer {
    text-align: center;
    color: #5a6c7d;
    padding: 8px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    box-shadow: 0 -4px 25px rgba(99, 102, 241, 0.08);
    margin-top: auto;
    border: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(10px);
}

.footer p {
    margin: 3px 0;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.5;
}

.footer a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.footer a:hover {
    color: #4f46e5;
    text-decoration: none;
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transform: scaleX(1);
    transition: transform 0.3s ease;
    border-radius: 1px;
}

.footer a:hover::after {
    transform: scaleX(1.1);
}

.admin-link {
    color: #667eea;
    text-decoration: none;
    margin-top: 15px;
    display: inline-block;
    font-weight: 600;
    position: relative;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

.admin-link:hover {
    color: #764ba2;
    text-decoration: none;
}

.admin-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.admin-link:hover::after {
    transform: scaleX(1);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .info-card {
        grid-column: 1 / -1;
    }
    
    .result-success .converted-score {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 25px 15px;
        margin-bottom: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card {
        padding: 25px 20px;
    }
    
    .card h2 {
        font-size: 1.4rem;
    }
    
    .result-success .converted-score {
        font-size: 2.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 20px 10px;
    }
    
    .header h1 {
        font-size: 1.6rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .card {
        padding: 20px 15px;
    }
    
    .card h2 {
        font-size: 1.3rem;
        padding-bottom: 10px;
    }
    
    .result-success .converted-score {
        font-size: 2.3rem;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group select,
    .form-group input {
        padding: 12px 14px;
    }
    
    .btn {
        padding: 12px 20px;
    }
}

/* 加载动画 */
.loading-container {
    text-align: center;
    color: #667eea;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-container .loading {
    margin-bottom: 15px;
}

.loading {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误提示样式 */
.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    border-left: 4px solid #f56565;
    font-size: 0.95rem;
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

/* 友情提示样式 */
.info-message {
    background: #e6fffa;
    color: #234e52;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    border-left: 4px solid #38b2ac;
    font-size: 0.95rem;
    font-weight: 500;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

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

/* 成绩比较功能样式 */
.compare-content {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.compare-placeholder {
    color: #a0aec0;
    font-style: italic;
    text-align: center;
    font-size: 1.1rem;
    padding: 20px;
    border-radius: 10px;
    background: #f7fafc;
    border: 2px dashed #e2e8f0;
    width: 100%;
}

.compare-success {
    text-align: center;
    color: #2d3748;
    padding: 20px;
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border-radius: 15px;
    border-left: 5px solid #38a169;
    animation: fadeIn 0.6s ease-out;
}

.compare-success h3 {
    color: #38a169;
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.compare-success p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.match-details {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    text-align: left;
}

.match-details p {
    margin-bottom: 8px;
    font-size: 1rem;
}

.compare-excellent {
    text-align: center;
    color: #2d3748;
    padding: 20px;
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-radius: 15px;
    border-left: 5px solid #e53e3e;
    animation: fadeIn 0.6s ease-out;
}

.compare-excellent h3 {
    color: #e53e3e;
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.compare-excellent p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.excellent-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    text-align: left;
}

.compare-warning {
    text-align: center;
    color: #2d3748;
    padding: 20px;
    background: linear-gradient(135deg, #fffaf0 0%, #feebc8 100%);
    border-radius: 15px;
    border-left: 5px solid #d69e2e;
    animation: fadeIn 0.6s ease-out;
}

.compare-warning h3 {
    color: #d69e2e;
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.compare-warning p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.warning-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    text-align: left;
}

.compare-info {
    text-align: center;
    color: #2d3748;
    padding: 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%);
    border-radius: 15px;
    border-left: 5px solid #667eea;
    animation: fadeIn 0.6s ease-out;
}

.compare-info h3 {
    color: #667eea;
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.compare-info p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.closest-details {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    text-align: left;
}

.closest-details p {
    margin-bottom: 8px;
    font-size: 1rem;
}

.compare-error {
    text-align: center;
    color: #e53e3e;
    padding: 20px;
    background: #fed7d7;
    border-radius: 10px;
    border-left: 4px solid #f56565;
    animation: shake 0.5s ease-in-out;
}

.compare-error h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.compare-error p {
    font-size: 1rem;
    line-height: 1.5;
}