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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 顶部导航栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 8px 15px;
    border-bottom: 1px solid #e0e0e0;
    height: 56px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav-left .back-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.nav-left .back-btn:active {
    background-color: #f5f5f5;
}

.back-icon {
    width: 24px;
    height: 24px;
    fill: #666;
}

.nav-center {
    display: flex;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.logo-text {
    color: #333;
    font-weight: bold;
    font-size: 16px;
}

.nav-title {
    color: #666;
    font-size: 16px;
    font-weight: 400;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-right button {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.nav-right button:active {
    background-color: #f5f5f5;
}

.search-icon,
.menu-icon,
.close-icon {
    width: 20px;
    height: 20px;
    fill: #666;
}

/* 语言选择栏 */
.language-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.language-options {
    display: flex;
    align-items: center;
    gap: 15px;
}

.lang-label {
    color: #666;
    font-size: 14px;
}

.lang-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 14px;
    padding: 4px 8px;
    cursor: pointer;
}

.lang-btn.active {
    color: #1976d2;
    border-bottom: 2px solid #1976d2;
}

.download-btn {
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.download-btn:active {
    background-color: #e0e0e0;
}

.download-icon {
    width: 18px;
    height: 18px;
    fill: #666;
}

/* 主内容区域 */
.main-content {
    background-color: #fff;
    margin: 0;
    padding: 20px;
    min-height: calc(100vh - 200px);
}

/* 报告标题 */
.report-title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.4;
}

/* 学生照片容器 */
.photo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.photo-placeholder {
    width: 120px;
    height: 160px;
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.student-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 信息表格 */
.info-table {
    width: 100%;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    width: 90px;
    color: #666;
    font-size: 14px;
    flex-shrink: 0;
    text-align: right;
    margin-right: 20px;
}

.info-value {
    flex: 1;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.verification-code {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    color: #1976d2;
    font-weight: bold;
}

/* 底部版权信息 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 20px;
    margin-top: auto;
}

.footer-content {
    text-align: center;
}

.footer-text {
    font-size: 12px;
    color: #ccc;
    margin-bottom: 8px;
}

.copyright {
    font-size: 11px;
    color: #999;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .header {
        padding: 6px 12px;
        height: 52px;
    }
    
    .nav-center {
        gap: 10px;
    }
    
    .logo-img {
        width: 24px;
        height: 24px;
    }
    
    .logo-text {
        font-size: 15px;
    }
    
    .nav-title {
        font-size: 15px;
    }
    
    .search-icon,
    .menu-icon,
    .close-icon {
        width: 18px;
        height: 18px;
    }
    
    .back-icon {
        width: 22px;
        height: 22px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .report-title {
        font-size: 16px;
        margin-bottom: 25px;
    }
    
    .photo-placeholder {
        width: 100px;
        height: 135px;
    }
    
    .info-label {
        width: 80px;
        font-size: 13px;
        margin-right: 15px;
    }
    
    .info-value {
        font-size: 13px;
    }
    
    .info-row {
        padding: 10px 0;
    }
}

/* 状态栏适配 */
@media (max-width: 375px) {
    .nav-center {
        font-size: 14px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .nav-title {
        font-size: 14px;
    }
}

/* 图片占位符样式 */
.photo-placeholder::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    display: none;
}

/* 隐藏默认的图片占位符，当没有图片时显示渐变背景 */
.student-photo {
    display: block;
}

/* 如果图片加载失败，显示占位符 */
.student-photo:not([src]),
.student-photo[src=""] {
    display: none;
}

.photo-placeholder:has(.student-photo:not([src])),
.photo-placeholder:has(.student-photo[src=""]) {
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
}

.photo-placeholder:has(.student-photo:not([src]))::after,
.photo-placeholder:has(.student-photo[src=""])::after {
    content: '照片';
    color: white;
    font-size: 14px;
    font-weight: bold;
}
