Files
img-bed/public/api/i/gallery-meow/style.css
2026-01-01 23:55:35 +08:00

688 lines
12 KiB
CSS
Executable File

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary: #6366f1;
--primary-light: #818cf8;
--bg-dark: #0f172a;
--bg-card: #1e293b;
--bg-card-hover: #334155;
--text-white: #f1f5f9;
--text-gray: #94a3b8;
--border: #334155;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background: var(--bg-dark);
color: var(--text-white);
line-height: 1.6;
min-height: 100vh;
}
.container {
max-width: 1600px;
margin: 0 auto;
padding: 2rem;
}
.header {
text-align: center;
margin-bottom: 3rem;
animation: fadeInDown 0.8s ease;
position: relative;
}
.back-link {
position: absolute;
left: 0;
top: 0;
color: var(--text-gray);
text-decoration: none;
font-size: 0.9rem;
transition: color 0.3s ease;
display: flex;
align-items: center;
gap: 0.5rem;
}
.back-link:hover {
color: var(--primary);
}
@media (max-width: 768px) {
.back-link {
position: static;
display: block;
margin-bottom: 1rem;
}
}
.header h1 {
font-size: 3rem;
font-weight: 800;
background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 0.5rem;
letter-spacing: -0.02em;
}
.header p {
color: var(--text-gray);
font-size: 1.1rem;
}
.loading-container {
text-align: center;
padding: 4rem 2rem;
}
.loading-spinner {
width: 60px;
height: 60px;
border: 4px solid var(--bg-card);
border-top-color: var(--primary);
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 1rem;
}
.loading-text {
color: var(--text-gray);
font-size: 1.1rem;
}
.loading-progress {
margin-top: 1rem;
color: var(--primary);
font-weight: 600;
}
.stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
animation: fadeInUp 0.8s ease;
}
.stat-card {
background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
padding: 1.5rem;
border-radius: 16px;
border: 1px solid var(--border);
text-align: center;
transition: all 0.3s ease;
}
.stat-card:hover {
transform: translateY(-4px);
box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
border-color: var(--primary);
}
.stat-card .icon {
font-size: 2rem;
margin-bottom: 0.5rem;
}
.stat-card .label {
color: var(--text-gray);
font-size: 0.875rem;
margin-bottom: 0.5rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.stat-card .value {
font-size: 2.5rem;
font-weight: 700;
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.filter-bar {
background: var(--bg-card);
padding: 1rem 1.5rem;
border-radius: 16px;
border: 1px solid var(--border);
margin-bottom: 2rem;
display: flex;
gap: 1rem;
flex-wrap: wrap;
align-items: center;
animation: fadeInUp 0.8s ease 0.1s both;
}
.filter-group {
display: flex;
align-items: center;
gap: 0.75rem;
}
.filter-group label {
font-weight: 600;
color: var(--text-white);
font-size: 0.875rem;
}
.filter-group select,
.filter-group input {
padding: 0.625rem 1rem;
background: var(--bg-dark);
border: 1px solid var(--border);
border-radius: 8px;
color: var(--text-white);
font-size: 0.875rem;
transition: all 0.3s ease;
min-width: 120px;
}
.filter-group select:focus,
.filter-group input:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.filter-group select option {
background: var(--bg-card);
color: var(--text-white);
}
.timeline {
position: relative;
padding-left: 2rem;
animation: fadeInUp 0.8s ease 0.2s both;
}
.timeline::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 3px;
background: linear-gradient(180deg, var(--primary) 0%, transparent 100%);
border-radius: 3px;
}
.timeline-year {
margin-bottom: 3rem;
position: relative;
}
.timeline-year-marker {
position: absolute;
left: -2.75rem;
top: 0;
width: 3.5rem;
height: 3.5rem;
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1rem;
font-weight: 700;
box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}
.timeline-year-header {
background: var(--bg-card);
padding: 1rem 1.5rem;
border-radius: 12px;
border: 1px solid var(--border);
margin-bottom: 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem;
}
.timeline-year-header h2 {
font-size: 1.5rem;
font-weight: 700;
}
.timeline-year-header .count {
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
color: white;
padding: 0.375rem 1rem;
border-radius: 20px;
font-size: 0.875rem;
font-weight: 600;
}
.month-group {
margin-bottom: 2rem;
padding-left: 1.5rem;
}
.month-header {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 1rem;
color: var(--text-gray);
font-size: 1.125rem;
font-weight: 600;
}
.month-header .icon {
font-size: 1.5rem;
}
.gallery-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 1rem;
margin-bottom: 1rem;
}
.image-card {
background: var(--bg-card);
border-radius: 12px;
overflow: hidden;
border: 1px solid var(--border);
cursor: pointer;
transition: all 0.3s ease;
animation: fadeIn 0.5s ease;
}
.image-card:hover {
transform: translateY(-8px) scale(1.02);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
border-color: var(--primary);
z-index: 1;
}
.image-card .wrapper {
position: relative;
aspect-ratio: 16 / 10;
overflow: hidden;
background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
.image-card img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.5s ease;
}
.image-card:hover img {
transform: scale(1.1);
}
.image-card .overlay {
position: absolute;
inset: 0;
background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.8) 100%);
opacity: 0;
transition: opacity 0.3s ease;
display: flex;
align-items: flex-end;
padding: 1rem;
}
.image-card:hover .overlay {
opacity: 1;
}
.image-card .overlay .icon {
color: white;
font-size: 1.5rem;
}
.image-card .info {
padding: 0.75rem;
}
.image-card .filename {
font-size: 0.75rem;
color: var(--text-gray);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.image-card .date {
font-size: 0.625rem;
color: var(--text-gray);
opacity: 0.7;
margin-top: 0.25rem;
}
.lightbox {
display: none;
position: fixed;
inset: 0;
background: rgba(15, 23, 42, 0.98);
z-index: 1000;
animation: fadeIn 0.3s ease;
backdrop-filter: blur(10px);
}
.lightbox.active {
display: flex;
align-items: center;
justify-content: center;
}
.lightbox-content {
position: relative;
max-width: 90vw;
max-height: 90vh;
}
.lightbox img {
max-width: 100%;
max-height: 85vh;
object-fit: contain;
border-radius: 12px;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.lightbox .close {
position: fixed;
top: 2rem;
right: 2rem;
background: rgba(255, 255, 255, 0.1);
color: white;
border: none;
width: 56px;
height: 56px;
border-radius: 50%;
font-size: 2rem;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
}
.lightbox .close:hover {
background: rgba(255, 255, 255, 0.2);
transform: rotate(90deg) scale(1.1);
}
.lightbox .nav {
position: fixed;
top: 50%;
transform: translateY(-50%);
background: rgba(255, 255, 255, 0.1);
color: white;
border: none;
width: 64px;
height: 64px;
border-radius: 50%;
font-size: 2rem;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
}
.lightbox .nav:hover {
background: rgba(255, 255, 255, 0.2);
transform: translateY(-50%) scale(1.1);
}
.lightbox .nav.prev {
left: 2rem;
}
.lightbox .nav.next {
right: 2rem;
}
.lightbox-info {
position: fixed;
bottom: 2rem;
left: 50%;
transform: translateX(-50%);
background: rgba(30, 41, 59, 0.9);
padding: 1rem 2rem;
border-radius: 12px;
border: 1px solid var(--border);
text-align: center;
backdrop-filter: blur(10px);
max-width: 90%;
}
.lightbox-info .filename {
font-weight: 600;
margin-bottom: 0.25rem;
}
.lightbox-info .meta {
font-size: 0.875rem;
color: var(--text-gray);
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes fadeInDown {
from {
opacity: 0;
transform: translateY(-30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes spin {
to { transform: rotate(360deg); }
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
background: var(--bg-card-hover);
border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--primary);
}
.hidden {
display: none !important;
}
@media (max-width: 768px) {
.container {
padding: 1rem;
}
.header h1 {
font-size: 2rem;
}
.stats {
grid-template-columns: 1fr;
}
.gallery-grid {
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.timeline {
padding-left: 1.5rem;
}
.timeline::before {
width: 2px;
}
.timeline-year-marker {
width: 2.5rem;
height: 2.5rem;
left: -2rem;
font-size: 0.75rem;
}
.lightbox .nav {
width: 44px;
height: 44px;
font-size: 1.25rem;
}
.lightbox .nav.prev {
left: 0.5rem;
}
.lightbox .nav.next {
right: 0.5rem;
}
.lightbox .close {
width: 40px;
height: 40px;
font-size: 1.25rem;
top: 1rem;
right: 1rem;
}
.lightbox-info {
bottom: 1rem;
padding: 0.75rem 1rem;
font-size: 0.875rem;
}
.filter-bar {
flex-direction: column;
align-items: stretch;
}
.filter-group {
flex-direction: column;
align-items: stretch;
}
.filter-group select,
.filter-group input {
width: 100%;
}
}
/* 瀑布流布局 */
.gallery-masonry {
column-count: 3;
column-gap: 1rem;
margin-bottom: 1rem;
}
@media (max-width: 1024px) {
.gallery-masonry {
column-count: 2;
}
}
@media (max-width: 640px) {
.gallery-masonry {
column-count: 1;
}
}
.gallery-masonry .image-card {
break-inside: avoid;
margin-bottom: 1rem;
display: inline-block;
width: 100%;
}
/* 年份折叠样式 */
.timeline-year-header {
cursor: pointer;
transition: all 0.3s ease;
}
.timeline-year-header:hover {
background: var(--bg-card-hover);
}
.timeline-year-header .toggle-icon {
font-size: 1.25rem;
color: var(--primary);
transition: transform 0.3s ease;
}
.timeline-year-header.collapsed .toggle-icon {
transform: rotate(-90deg);
}
/* 懒加载样式 */
.lazy-image {
opacity: 0;
transition: opacity 0.3s ease;
}
.lazy-image.loaded {
opacity: 1;
}
.image-placeholder {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 2rem;
color: var(--text-gray);
background: var(--bg-card);
z-index: 1;
}
.lazy-image.loaded + .image-placeholder {
display: none;
}
/* 折叠动画 */
.month-group {
animation: slideDown 0.3s ease;
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}