html {
scrollbar-width: none;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f5f6f8;
color: #333;
}
a {
color: aquamarine;
text-decoration: none;
}
/* 搜索栏样式 */
.search-header {
position: sticky;
top: 0;
background: white;
padding: .8em 1em;
display: flex;
justify-content: center;
z-index: 2;
}
.search-box {
display: flex;
width: 100%;
max-width: 600px;
font-size: 1em;
}
.search-box>* {
padding: .8em 1em;
margin: 0;
}
.search-box input {
flex: 1;
border: 1px solid #ddd;
border-radius: .5em 0 0 .5em;
outline: none;
transition: border-color 0.2s;
min-width: 50px;
}
.search-box input:focus {
border-color: #007bff;
}
.search-box button {
border: 1px solid #1565b9;
;
border-radius: 0 .5em .5em 0;
background-color: #007bff;
color: white;
cursor: pointer;
transition: background-color 0.2s;
}
.search-box button:hover {
background-color: #0056b3;
}
/* 画廊网格布局 */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1em;
}
.section-title {
font-size: 1.2rem;
font-weight: 600;
color: #555;
display: none;
user-select: none;
}
.gallery {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: .5em;
}
.card {
background: white;
border-radius: .5em;
overflow: hidden;
text-decoration: none;
color: inherit;
display: flex;
flex-direction: column;
height: 220px;
position: relative;
}
.card img {
width: 100%;
height: 100%;
object-fit: contain;
background-color: #e9ecef;
position: absolute;
top: 0;
left: 0;
}
.card-info {
padding: .6em .8em;
position: absolute;
bottom: 0;
left: 0;
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
width: 100%;
height: 25%;
z-index: 1;
box-sizing: border-box;
}
.card-info>* {
margin: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.card-title {
font-weight: bold;
font-size: .8em;
height: 1.5em;
color: #fff;
}
.card-subtitle {
display: block;
font-size: .6em;
color: #ddd;
}
a.card-subtitle {
color: aquamarine;
}
.badge {
display: inline-block;
background: #eef2f5;
color: #007bff;
padding: .1em .3em;
border-radius: .4em;
font-size: .8em;
}
.status-text {
text-align: center;
padding: 24px;
color: #888;
font-size: 14px;
user-select: none;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #121212;
color: #e0e0e0;
}
.search-header {
background-color: #1e1e1e;
}
.search-box input {
background-color: #2c2c2c;
border-color: #444;
color: #fff;
}
.search-box input:focus {
border-color: #339af0;
}
.search-box button {
background-color: #1971c2;
}
.search-box button:hover {
background-color: #1864ab;
}
.section-title {
color: #ccc;
}
.card {
background-color: #1e1e1e;
}
.card img {
background-color: #2a2a2a;
mask-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
}
.card-subtitle {
color: #ddd;
}
.badge {
background-color: #233549;
color: #66b2ff;
}
.status-text {
color: #aaa;
}
}