267 lines
11 KiB
CSS
267 lines
11 KiB
CSS
|
|
:root {
|
||
|
|
--blue: #005eb8;
|
||
|
|
--blue-dark: #00427f;
|
||
|
|
--blue-light: #0a7bd8;
|
||
|
|
--ink: #1c2b3a;
|
||
|
|
--ink-light: #3d5a75;
|
||
|
|
--bg-soft: #f4f8fd;
|
||
|
|
--line: #e3ecf5;
|
||
|
|
--danger: #c0392b;
|
||
|
|
--ok: #1e8449;
|
||
|
|
--radius: 10px;
|
||
|
|
}
|
||
|
|
|
||
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||
|
|
|
||
|
|
body {
|
||
|
|
font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
|
||
|
|
color: var(--ink);
|
||
|
|
background: #fff;
|
||
|
|
line-height: 1.6;
|
||
|
|
}
|
||
|
|
|
||
|
|
.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 32px; }
|
||
|
|
.container.narrow { max-width: 720px; margin: 0 auto; }
|
||
|
|
|
||
|
|
a { color: var(--blue); text-decoration: none; }
|
||
|
|
a:hover { color: var(--blue-dark); }
|
||
|
|
|
||
|
|
/* Header */
|
||
|
|
.site-header {
|
||
|
|
position: sticky;
|
||
|
|
top: 0;
|
||
|
|
background: rgba(255, 255, 255, 0.97);
|
||
|
|
border-bottom: 1px solid var(--line);
|
||
|
|
z-index: 100;
|
||
|
|
}
|
||
|
|
.header-inner {
|
||
|
|
display: flex; align-items: center; justify-content: space-between;
|
||
|
|
min-height: 60px; padding: 10px 0; gap: 12px;
|
||
|
|
position: relative;
|
||
|
|
}
|
||
|
|
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); flex-shrink: 0; }
|
||
|
|
.brand img { width: 26px; height: 26px; }
|
||
|
|
.brand-name { color: var(--blue); font-size: 1.1rem; white-space: nowrap; }
|
||
|
|
|
||
|
|
.nav-toggle {
|
||
|
|
display: none; margin-left: auto;
|
||
|
|
background: none; border: 1px solid var(--line); border-radius: 6px;
|
||
|
|
font-size: 1.3rem; line-height: 1; color: var(--blue);
|
||
|
|
padding: 6px 12px; cursor: pointer;
|
||
|
|
}
|
||
|
|
|
||
|
|
.main-nav { display: flex; gap: 20px; align-items: center; flex-wrap: nowrap; }
|
||
|
|
.main-nav a { color: var(--ink-light); font-size: 0.93rem; font-weight: 500; white-space: nowrap; }
|
||
|
|
.main-nav a:hover, .main-nav a.active { color: var(--blue); }
|
||
|
|
|
||
|
|
@media (max-width: 1280px) {
|
||
|
|
.main-nav { gap: 14px; }
|
||
|
|
.main-nav a { font-size: 0.88rem; }
|
||
|
|
}
|
||
|
|
|
||
|
|
@media (max-width: 1080px) {
|
||
|
|
.nav-toggle { display: block; }
|
||
|
|
.main-nav {
|
||
|
|
display: none; position: absolute; top: 100%; left: 0; right: 0;
|
||
|
|
background: #fff; border-bottom: 1px solid var(--line);
|
||
|
|
flex-direction: column; align-items: stretch; gap: 0;
|
||
|
|
padding: 8px 0; box-shadow: 0 12px 24px rgba(0, 30, 60, 0.10);
|
||
|
|
}
|
||
|
|
.main-nav.open { display: flex; }
|
||
|
|
.main-nav a { padding: 12px 32px; font-size: 0.95rem; }
|
||
|
|
.main-nav a:hover { background: var(--bg-soft); }
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Buttons */
|
||
|
|
.btn {
|
||
|
|
display: inline-block; padding: 11px 24px; border-radius: 6px;
|
||
|
|
font-weight: 600; font-size: 0.95rem; border: 1px solid transparent;
|
||
|
|
cursor: pointer; font-family: inherit; text-align: center;
|
||
|
|
transition: background 0.15s ease, color 0.15s ease;
|
||
|
|
}
|
||
|
|
.btn-primary { background: var(--blue); color: #fff; }
|
||
|
|
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
|
||
|
|
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
|
||
|
|
.btn-ghost:hover { background: #e8f2ff; }
|
||
|
|
.btn-danger { background: #fff; color: var(--danger); border-color: var(--danger); }
|
||
|
|
.btn-danger:hover { background: #fdf0ee; }
|
||
|
|
.btn-block { width: 100%; }
|
||
|
|
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
|
||
|
|
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
|
||
|
|
|
||
|
|
/* Hero */
|
||
|
|
.hero {
|
||
|
|
background: linear-gradient(135deg, #003766 0%, #005eb8 55%, #0a7bd8 100%);
|
||
|
|
color: #fff; padding: 76px 0 84px; position: relative; overflow: hidden;
|
||
|
|
}
|
||
|
|
.hero { max-width: none; }
|
||
|
|
.hero::before, .hero::after {
|
||
|
|
content: ""; position: absolute; border-radius: 50%;
|
||
|
|
background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
|
||
|
|
}
|
||
|
|
.hero::before { width: 460px; height: 460px; right: -130px; top: -150px; }
|
||
|
|
.hero::after { width: 320px; height: 320px; left: -100px; bottom: -140px; }
|
||
|
|
.hero .container { position: relative; }
|
||
|
|
.hero h1 { font-size: 2.4rem; font-weight: 700; line-height: 1.2; }
|
||
|
|
.hero-eyebrow {
|
||
|
|
font-size: 0.9rem; letter-spacing: 0.18em;
|
||
|
|
color: #bcd9f5; margin-bottom: 18px;
|
||
|
|
}
|
||
|
|
.hero-sub { max-width: 640px; margin: 16px 0 28px; color: #e8f2ff; font-size: 1.05rem; }
|
||
|
|
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
|
||
|
|
|
||
|
|
/* 欧拉恒等式装饰 */
|
||
|
|
.hero-euler {
|
||
|
|
position: absolute; right: 18%; top: 50%;
|
||
|
|
transform: translateY(-50%);
|
||
|
|
font-family: Georgia, "Times New Roman", serif;
|
||
|
|
font-style: italic;
|
||
|
|
font-size: clamp(1.6rem, 4.5vw, 4rem);
|
||
|
|
color: rgba(255, 255, 255, 0.14);
|
||
|
|
pointer-events: none; user-select: none;
|
||
|
|
white-space: nowrap; letter-spacing: 0.02em;
|
||
|
|
}
|
||
|
|
.hero-euler sup { font-size: 0.6em; }
|
||
|
|
.btn-light { background: #fff; color: var(--blue); }
|
||
|
|
.btn-light:hover { background: #e8f2ff; color: var(--blue-dark); }
|
||
|
|
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
|
||
|
|
.btn-outline-light:hover { background: rgba(255,255,255,0.12); }
|
||
|
|
|
||
|
|
/* Sections & cards */
|
||
|
|
.section { padding: 64px 0; }
|
||
|
|
.section-alt { background: var(--bg-soft); }
|
||
|
|
.section-title {
|
||
|
|
font-size: 1.55rem; color: var(--blue-dark);
|
||
|
|
border-left: 4px solid var(--blue); padding-left: 14px; margin-bottom: 10px;
|
||
|
|
}
|
||
|
|
.section-desc { color: var(--ink-light); margin-bottom: 26px; }
|
||
|
|
|
||
|
|
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 26px; }
|
||
|
|
.card {
|
||
|
|
background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
|
||
|
|
padding: 26px 24px; transition: transform 0.15s ease, box-shadow 0.15s ease;
|
||
|
|
}
|
||
|
|
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,94,184,0.10); }
|
||
|
|
.card .icon { font-size: 1.7rem; color: var(--blue); margin-bottom: 12px; }
|
||
|
|
.card h3 { font-size: 1.05rem; color: var(--blue-dark); margin-bottom: 8px; }
|
||
|
|
.card p { font-size: 0.93rem; color: var(--ink-light); }
|
||
|
|
|
||
|
|
/* Forms */
|
||
|
|
.form-card {
|
||
|
|
background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
|
||
|
|
padding: 30px 28px; margin-top: 26px;
|
||
|
|
}
|
||
|
|
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
|
||
|
|
.form-group { margin-bottom: 16px; }
|
||
|
|
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; }
|
||
|
|
.form-group input, .form-group select, .form-group textarea {
|
||
|
|
width: 100%; padding: 10px 13px; border: 1px solid #cfdcea; border-radius: 6px;
|
||
|
|
font-size: 0.93rem; font-family: inherit; background: #fbfdff; color: var(--ink);
|
||
|
|
}
|
||
|
|
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
|
||
|
|
outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,94,184,0.12);
|
||
|
|
}
|
||
|
|
.form-hint { font-size: 0.82rem; color: var(--ink-light); margin-top: 4px; }
|
||
|
|
.form-tip { margin-top: 14px; font-size: 0.88rem; text-align: center; }
|
||
|
|
|
||
|
|
/* Result / alerts */
|
||
|
|
.alert { padding: 12px 16px; border-radius: 6px; font-size: 0.92rem; margin-top: 14px; display: none; }
|
||
|
|
.alert.show { display: block; }
|
||
|
|
.alert-ok { background: #e9f7ef; color: var(--ok); border: 1px solid #b8e6c8; }
|
||
|
|
.alert-err { background: #fdf0ee; color: var(--danger); border: 1px solid #f2c4be; }
|
||
|
|
|
||
|
|
.badge { display: inline-block; padding: 2px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
|
||
|
|
.badge-pending { background: #fef3dc; color: #9a6700; }
|
||
|
|
.badge-approved { background: #e9f7ef; color: var(--ok); }
|
||
|
|
.badge-denied { background: #fdf0ee; color: var(--danger); }
|
||
|
|
|
||
|
|
/* Admin table */
|
||
|
|
.toolbar { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 14px; flex-wrap: wrap; gap: 10px; }
|
||
|
|
.table-wrap { overflow-x: auto; }
|
||
|
|
table.admin { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 720px; }
|
||
|
|
table.admin th, table.admin td { padding: 11px 14px; text-align: left; font-size: 0.9rem; border-bottom: 1px solid var(--line); }
|
||
|
|
table.admin th { background: var(--bg-soft); color: var(--blue-dark); font-weight: 600; white-space: nowrap; }
|
||
|
|
table.admin tr:hover td { background: #f7fbff; }
|
||
|
|
table.admin .actions { white-space: nowrap; }
|
||
|
|
|
||
|
|
/* Footer */
|
||
|
|
.site-footer { background: var(--blue-dark); color: #d6e6f7; padding: 36px 0 24px; }
|
||
|
|
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.86rem; }
|
||
|
|
.site-footer a { color: #a9c6e3; }
|
||
|
|
.site-footer a:hover { color: #fff; }
|
||
|
|
|
||
|
|
.mono { font-family: Consolas, monospace; letter-spacing: 0.04em; }
|
||
|
|
|
||
|
|
/* Blog */
|
||
|
|
.breadcrumb { font-size: 0.85rem; color: var(--ink-light); margin-bottom: 14px; }
|
||
|
|
.breadcrumb a { color: var(--ink-light); }
|
||
|
|
.breadcrumb a:hover { color: var(--blue); }
|
||
|
|
|
||
|
|
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin-top: 26px; }
|
||
|
|
.post-card {
|
||
|
|
display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
|
||
|
|
padding: 22px 24px; transition: transform 0.15s ease, box-shadow 0.15s ease; color: var(--ink);
|
||
|
|
}
|
||
|
|
.post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0, 94, 184, 0.10); color: var(--ink); }
|
||
|
|
.post-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
|
||
|
|
.post-date { font-size: 0.8rem; color: var(--ink-light); }
|
||
|
|
.post-title { font-size: 1.08rem; color: var(--blue-dark); margin-bottom: 6px; }
|
||
|
|
.post-excerpt { font-size: 0.9rem; color: var(--ink-light); line-height: 1.55; }
|
||
|
|
|
||
|
|
.tag {
|
||
|
|
display: inline-block; font-size: 0.74rem; color: var(--blue);
|
||
|
|
background: #e8f2ff; border-radius: 20px; padding: 1px 10px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Article */
|
||
|
|
.article { line-height: 1.8; font-size: 0.98rem; color: var(--ink); margin-top: 20px; }
|
||
|
|
.article h1, .article h2, .article h3, .article h4 {
|
||
|
|
color: var(--blue-dark); margin: 1.6em 0 0.6em; line-height: 1.4;
|
||
|
|
}
|
||
|
|
.article h1 { font-size: 1.6rem; border-bottom: 1px solid var(--line); padding-bottom: 0.3em; }
|
||
|
|
.article h2 { font-size: 1.3rem; }
|
||
|
|
.article h3 { font-size: 1.1rem; }
|
||
|
|
.article p { margin: 0.8em 0; }
|
||
|
|
.article ul, .article ol { padding-left: 1.5em; margin: 0.8em 0; }
|
||
|
|
.article li { margin: 0.3em 0; }
|
||
|
|
.article code {
|
||
|
|
background: #eef4fb; color: #00518f; border-radius: 4px;
|
||
|
|
padding: 1px 6px; font-family: Consolas, monospace; font-size: 0.9em;
|
||
|
|
}
|
||
|
|
.article pre {
|
||
|
|
background: #0d2b4a; color: #d8ecff; border-radius: 8px;
|
||
|
|
padding: 16px 18px; overflow-x: auto; margin: 1em 0;
|
||
|
|
}
|
||
|
|
.article pre code { background: none; color: inherit; padding: 0; }
|
||
|
|
.article blockquote {
|
||
|
|
border-left: 4px solid var(--blue); background: var(--bg-soft);
|
||
|
|
padding: 10px 16px; margin: 1em 0; color: var(--ink-light); border-radius: 0 6px 6px 0;
|
||
|
|
}
|
||
|
|
.article table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 0.92rem; }
|
||
|
|
.article th, .article td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
|
||
|
|
.article th { background: var(--bg-soft); color: var(--blue-dark); }
|
||
|
|
.article img { max-width: 100%; border-radius: 8px; }
|
||
|
|
.article a { text-decoration: underline; }
|
||
|
|
|
||
|
|
/* Card as link */
|
||
|
|
.card-link { display: block; color: var(--ink); }
|
||
|
|
.card-link:hover { color: var(--ink); }
|
||
|
|
|
||
|
|
@media (max-width: 720px) {
|
||
|
|
.post-list { grid-template-columns: 1fr; }
|
||
|
|
}
|
||
|
|
|
||
|
|
@media (max-width: 1024px) {
|
||
|
|
.main-nav { gap: 12px 16px; }
|
||
|
|
.main-nav a { font-size: 0.88rem; }
|
||
|
|
}
|
||
|
|
|
||
|
|
@media (max-width: 720px) {
|
||
|
|
.form-row { grid-template-columns: 1fr; }
|
||
|
|
.hero h1 { font-size: 1.8rem; }
|
||
|
|
.hero { padding: 56px 0 64px; }
|
||
|
|
.section { padding: 48px 0; }
|
||
|
|
.container { padding: 0 18px; }
|
||
|
|
.hero-actions .btn { width: 100%; }
|
||
|
|
}
|