- Replace per-frame scroll reattach with 300ms debounced scroll-end reattach to prevent cascade during fast/momentum scrolling - Add overflow-anchor: none to grid containers and sentinels to prevent browsers from auto-scrolling when content is added below
105 lines
2.0 KiB
CSS
105 lines
2.0 KiB
CSS
.cosplayers-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
|
gap: 8px;
|
|
padding: 0 8px;
|
|
overflow-anchor: none;
|
|
}
|
|
|
|
.cosplayer-card {
|
|
position: relative;
|
|
overflow: hidden;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
background: var(--surface-bg);
|
|
transition: filter 0.2s, transform 0.2s, box-shadow 0.2s;
|
|
aspect-ratio: 1;
|
|
display: block;
|
|
color: inherit;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.cosplayer-card:hover {
|
|
filter: brightness(1.15);
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.cosplayer-card-img-wrap {
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
}
|
|
|
|
.cosplayer-card-img {
|
|
position: absolute;
|
|
left: 50%;
|
|
top: 50%;
|
|
height: auto;
|
|
display: block;
|
|
}
|
|
|
|
.cosplayer-card-img-wrap .cosplayer-card-fallback {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--surface-bg);
|
|
color: var(--text-muted);
|
|
font-size: 3.5rem;
|
|
}
|
|
|
|
.cosplayer-card-info {
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
padding: 12px 10px 8px;
|
|
background: var(--gradient-overlay);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.cosplayer-card-name {
|
|
display: block;
|
|
color: #fff;
|
|
font-size: 0.9rem;
|
|
font-weight: 600;
|
|
line-height: 1.3;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.cosplayer-card-count {
|
|
display: block;
|
|
color: rgba(255, 255, 255, 0.6);
|
|
font-size: 0.75rem;
|
|
line-height: 1.3;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.cosplayer-card-select {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
.cosplayer-card-check {
|
|
position: absolute;
|
|
top: 6px;
|
|
left: 6px;
|
|
z-index: 2;
|
|
font-size: 1.3rem;
|
|
text-shadow: var(--shadow-sm);
|
|
pointer-events: none;
|
|
}
|
|
|
|
@media (max-width: 576px) {
|
|
.cosplayers-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
}
|