@font-face {font-family:"MathLogo";src:url("/static/fonts/Orbitron-Bold.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap;}
/* ===== mathabc.xyz 公共样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
}

/* 导航栏 */
.navbar { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.08); padding: 0 40px; display: flex; align-items: center; justify-content: space-between; height: 70px; position: sticky; top: 0; z-index: 1000; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 45px; width: auto; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-card { background: #f8f9fa; border: 1px solid #e9ecef; padding: 8px 16px; border-radius: 6px; text-decoration: none; color: #495057; font-size: 14px; transition: all 0.3s; white-space: nowrap; }
.nav-card:hover { background: #007bff; color: #fff; border-color: #007bff; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,123,255,0.3); }
.auth-buttons { display: flex; gap: 10px; }
.btn-login, .btn-register { padding: 8px 20px; border-radius: 6px; font-size: 14px; cursor: pointer; transition: all 0.3s; text-decoration: none; }
.btn-login { background: transparent; border: 1px solid #007bff; color: #007bff; }
.btn-login:hover { background: #007bff; color: #fff; }
.btn-register { background: #007bff; border: 1px solid #007bff; color: #fff; }
.btn-register:hover { background: #0056b3; border-color: #0056b3; }

/* Banner 基础样式（各页面通过内联style覆写高度） */
.banner { width: 100%; overflow: hidden; position: relative; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner-title { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 48px; font-weight: 700; color: #fff; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); z-index: 10; }
.banner-subtitle { position: absolute; top: calc(50% + 40px); left: 50%; transform: translate(-50%, -50%); font-size: 20px; color: #fff; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); z-index: 10; }

/* 页脚 */
.footer { background: #2c3e50; color: #ecf0f1; padding: 50px 40px 30px; margin-top: 60px; }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.footer-section h3 { font-size: 18px; margin-bottom: 20px; color: #fff; }
.footer-logo img { height: 50px; width: auto; }
.qr-codes { display: flex; gap: 15px; margin-top: 15px; }
.qr-code img { width: 80px; height: 80px; border-radius: 8px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #bdc3c7; text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: #fff; }
.contact-info { list-style: none; }
.contact-info li { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.footer-bottom { max-width: 1200px; margin: 30px auto 0; padding-top: 20px; border-top: 1px solid #34495e; text-align: center; color: #95a5a6; font-size: 14px; }

/* 通用section标题 */
.section-title { font-size: 32px; font-weight: 600; margin-bottom: 30px; text-align: center; color: #2c3e50; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; }
.card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-content { padding: 20px; }
.card-title { font-size: 18px; font-weight: 600; margin-bottom: 10px; color: #2c3e50; line-height: 1.4; }
.card-desc { color: #6c757d; font-size: 14px; line-height: 1.6; }

/* 首页特有 */
.blog-section { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.blog-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; }
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.blog-card img { width: 100%; height: 200px; object-fit: cover; }
.blog-content { padding: 20px; }
.blog-date { color: #6c757d; font-size: 13px; margin-bottom: 8px; }
.blog-title { font-size: 18px; font-weight: 600; margin-bottom: 10px; color: #2c3e50; line-height: 1.4; }
.blog-excerpt { color: #6c757d; font-size: 14px; line-height: 1.6; }

/* 模块section */
.module-section { max-width: 1200px; margin: 40px auto; padding: 0 20px; }

/* 响应式 */
@media (max-width: 768px) {
    .navbar { flex-direction: column; height: auto; padding: 15px 20px; }
    .nav-links { margin: 15px 0; justify-content: center; }
    .footer-content { grid-template-columns: 1fr; gap: 30px; }
    .banner-title { font-size: 32px; }
    .banner-subtitle { font-size: 16px; }
}
