Files
ai-nav/web10/resources/css/app.css
2026-02-07 22:55:07 +08:00

637 lines
10 KiB
CSS

:root {
--bg: #f5f3f0;
--bg-accent: #fff7ed;
--surface: #ffffff;
--surface-muted: #f1f5f9;
--text: #1f2937;
--text-muted: #6b7280;
--primary: #ff6b35;
--primary-dark: #e85a24;
--border: #e5e7eb;
--shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}
[data-theme='dark'] {
--bg: #0f172a;
--bg-accent: #111827;
--surface: #111827;
--surface-muted: #1f2937;
--text: #e5e7eb;
--text-muted: #9ca3af;
--primary: #f59e0b;
--primary-dark: #d97706;
--border: #334155;
--shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: "Alibaba PuHuiTi 2.0", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
color: var(--text);
background: radial-gradient(circle at top right, var(--bg-accent), var(--bg)) fixed;
}
a {
color: inherit;
text-decoration: none;
}
.app-shell {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px 40px;
background: var(--surface);
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 10;
}
.brand-link {
display: flex;
align-items: center;
gap: 12px;
}
.brand-logo {
height: 36px;
}
.brand-text {
font-size: 20px;
font-weight: 700;
}
.topnav {
display: flex;
gap: 20px;
font-weight: 500;
}
.topnav a {
color: var(--text-muted);
}
.topnav a:hover {
color: var(--text);
}
.theme-toggle {
border: 1px solid var(--border);
background: var(--surface-muted);
padding: 8px 12px;
border-radius: 999px;
cursor: pointer;
}
.app-body {
display: grid;
grid-template-columns: 240px 1fr;
gap: 24px;
padding: 24px 40px 60px;
}
.sidebar {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 18px;
padding: 20px;
box-shadow: var(--shadow);
height: fit-content;
position: sticky;
top: 90px;
}
.sidebar-title {
font-weight: 600;
margin-bottom: 12px;
}
.category-group {
margin-bottom: 10px;
border-bottom: 1px dashed var(--border);
padding-bottom: 8px;
}
.category-group summary {
display: flex;
justify-content: space-between;
cursor: pointer;
font-weight: 600;
}
.category-group .icon {
margin-right: 6px;
}
.category-group ul {
list-style: none;
padding-left: 0;
margin: 10px 0 0;
}
.category-group li {
margin-bottom: 6px;
}
.category-group a {
color: var(--text-muted);
display: flex;
justify-content: space-between;
}
.content {
min-width: 0;
}
.home-hero {
background: var(--surface);
border-radius: 24px;
padding: 32px;
box-shadow: var(--shadow);
display: grid;
gap: 20px;
margin-bottom: 24px;
}
.page-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 20px;
}
.detail-section {
margin-bottom: 20px;
}
.rich-text {
line-height: 1.7;
color: var(--text-muted);
}
.cover-image {
width: 100%;
border-radius: 12px;
}
.search-bar {
display: flex;
gap: 12px;
}
.search-bar input {
flex: 1;
padding: 12px 14px;
border-radius: 12px;
border: 1px solid var(--border);
background: var(--surface-muted);
}
.search-bar button,
.primary-button {
background: var(--primary);
color: #fff;
border: none;
padding: 12px 18px;
border-radius: 12px;
cursor: pointer;
font-weight: 600;
}
.filter-bar {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 16px;
}
.filter-bar input,
.filter-bar select {
padding: 10px 12px;
border-radius: 10px;
border: 1px solid var(--border);
background: var(--surface-muted);
}
.primary-button:hover {
background: var(--primary-dark);
}
.section {
margin: 32px 0;
}
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
}
.product-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 16px;
}
.product-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 16px;
overflow: hidden;
box-shadow: var(--shadow);
transition: transform 0.2s ease;
}
.product-card:hover {
transform: translateY(-4px);
}
.product-card-media {
height: 120px;
background: var(--surface-muted);
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.product-card-media img {
width: 100%;
height: 100%;
object-fit: cover;
}
.product-card-placeholder {
font-size: 28px;
font-weight: 700;
color: var(--primary);
}
.sponsor-badge {
position: absolute;
top: 8px;
right: 8px;
background: var(--primary);
color: #fff;
font-size: 12px;
padding: 4px 8px;
border-radius: 999px;
}
.product-card-body {
padding: 12px;
}
.product-card-title {
font-weight: 600;
margin-bottom: 6px;
}
.product-card-summary {
color: var(--text-muted);
font-size: 13px;
}
.category-block {
margin-bottom: 28px;
}
.category-block-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
}
.view-toggle {
display: inline-flex;
gap: 10px;
margin-bottom: 16px;
}
.view-toggle a {
padding: 6px 12px;
border-radius: 999px;
border: 1px solid var(--border);
background: var(--surface-muted);
font-size: 13px;
}
.view-toggle a.active {
background: var(--primary);
color: #fff;
border-color: transparent;
}
.more-panel {
display: flex;
align-items: center;
justify-content: space-between;
background: var(--surface);
border: 1px dashed var(--border);
padding: 12px 16px;
border-radius: 12px;
margin-bottom: 16px;
}
.more-link {
color: var(--primary);
font-weight: 600;
}
.article-summary {
color: var(--text-muted);
font-size: 13px;
}
.category-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 16px;
}
.category-card {
background: var(--surface);
padding: 16px;
border-radius: 16px;
border: 1px solid var(--border);
box-shadow: var(--shadow);
}
.tag-cloud {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.tag-chip {
padding: 6px 12px;
background: var(--surface-muted);
border-radius: 999px;
font-size: 13px;
}
.detail-grid {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 24px;
}
.detail-card {
background: var(--surface);
padding: 16px;
border-radius: 16px;
border: 1px solid var(--border);
box-shadow: var(--shadow);
margin-bottom: 16px;
}
.meta-item {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
}
.media-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 12px;
}
.media-grid img {
width: 100%;
border-radius: 12px;
}
.article-list {
display: grid;
gap: 16px;
}
.article-item {
background: var(--surface);
padding: 16px;
border-radius: 16px;
border: 1px solid var(--border);
box-shadow: var(--shadow);
}
.article-title {
font-weight: 600;
margin-bottom: 6px;
}
.article-meta {
color: var(--text-muted);
font-size: 13px;
display: flex;
gap: 10px;
}
.notice {
padding: 12px;
border-radius: 12px;
margin-bottom: 12px;
}
.notice.success {
background: #dcfce7;
color: #166534;
}
.notice.error {
background: #fee2e2;
color: #991b1b;
}
.comment-form {
display: grid;
gap: 12px;
margin-bottom: 20px;
}
.form-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 12px;
}
.comment-form input,
.comment-form textarea,
.contact-form input,
.contact-form textarea {
width: 100%;
padding: 10px 12px;
border-radius: 10px;
border: 1px solid var(--border);
background: var(--surface-muted);
}
.captcha-row {
align-items: center;
}
.captcha-image {
height: 44px;
border-radius: 10px;
border: 1px solid var(--border);
cursor: pointer;
}
.comment-item {
border-bottom: 1px dashed var(--border);
padding: 12px 0;
}
.comment-actions {
margin-top: 6px;
}
.like-button {
background: var(--surface-muted);
border: 1px solid var(--border);
border-radius: 999px;
padding: 4px 10px;
cursor: pointer;
}
.comment-reply {
margin-top: 6px;
color: var(--text-muted);
}
.ad-slot {
background: var(--surface);
border: 1px dashed var(--border);
border-radius: 16px;
padding: 16px;
margin: 20px 0 28px;
box-shadow: var(--shadow);
}
.ad-slot-title {
font-weight: 600;
margin-bottom: 10px;
}
.ad-list {
display: grid;
gap: 12px;
}
.ad-item {
display: grid;
grid-template-columns: auto 1fr;
gap: 12px;
padding: 12px;
background: var(--surface-muted);
border: 1px solid var(--border);
border-radius: 12px;
}
.ad-item img {
width: 72px;
height: 48px;
object-fit: cover;
border-radius: 8px;
}
.ad-item-title {
font-weight: 600;
margin-bottom: 4px;
}
.ad-item-desc {
font-size: 12px;
color: var(--text-muted);
}
.footer {
margin-top: auto;
padding: 20px 40px;
background: var(--surface);
border-top: 1px solid var(--border);
}
.footer-inner {
display: flex;
gap: 16px;
color: var(--text-muted);
flex-wrap: wrap;
}
.footer-links a {
margin-right: 10px;
color: var(--text-muted);
font-size: 13px;
}
.pagination {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 20px;
}
.pagination .page {
padding: 6px 12px;
border-radius: 10px;
border: 1px solid var(--border);
background: var(--surface);
font-size: 13px;
}
.pagination .page.active {
background: var(--primary);
color: #fff;
border-color: transparent;
}
.pagination .page.disabled {
color: var(--text-muted);
}
@media (max-width: 960px) {
.app-body {
grid-template-columns: 1fr;
}
.sidebar {
position: static;
}
.detail-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 640px) {
.topbar {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
.topnav {
flex-wrap: wrap;
}
.app-body {
padding: 16px;
}
}