Files
ChronoCCG/Chrono/Web/Pages/Cards.razor.css
T
2026-06-18 21:07:28 -04:00

774 lines
14 KiB
CSS

.gallery-container {
max-width: 1400px;
margin: 0 auto;
padding: 1.5rem;
}
/* ── Header ── */
.gallery-header {
margin-bottom: 1.5rem;
}
.gallery-header h1 {
margin-bottom: 0.25rem;
}
.gallery-header p {
font-size: 0.9rem;
margin: 0;
}
/* ── Category Tabs ── */
.category-tabs {
display: flex;
gap: 0.4rem;
margin-bottom: 1rem;
flex-wrap: wrap;
}
.tab {
display: flex;
align-items: center;
gap: 0.35rem;
padding: 0.5rem 1rem;
border: 1px solid var(--border);
border-radius: 100px;
background: transparent;
color: var(--text-secondary);
font-size: 0.85rem;
font-weight: 500;
cursor: pointer;
transition: all var(--transition);
font-family: inherit;
}
.tab:hover {
background: var(--bg-hover);
color: var(--text-primary);
border-color: var(--text-muted);
}
.tab.active {
background: var(--bg-elevated);
color: var(--text-primary);
border-color: var(--accent);
box-shadow: 0 0 12px var(--accent-glow);
}
.tab.active.agent {
border-color: #4fc3f7;
box-shadow: 0 0 12px rgba(79, 195, 247, 0.3);
}
.tab.active.spell {
border-color: #ce93d8;
box-shadow: 0 0 12px rgba(206, 147, 216, 0.3);
}
.tab.active.token {
border-color: #ffd54f;
box-shadow: 0 0 12px rgba(255, 213, 79, 0.3);
}
.tab i {
font-size: 0.9rem;
}
/* ── Filter Bar ── */
.filter-bar {
display: flex;
gap: 0.5rem;
margin-bottom: 0.75rem;
align-items: stretch;
}
.search-wrapper {
position: relative;
flex: 1;
min-width: 0;
}
.search-icon {
position: absolute;
left: 0.75rem;
top: 50%;
transform: translateY(-50%);
color: var(--text-muted);
z-index: 3;
pointer-events: none;
font-size: 0.85rem;
}
.search-input {
padding-left: 2.2rem;
padding-right: 2.2rem;
height: 100%;
}
.search-clear {
position: absolute;
right: 0.5rem;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
color: var(--text-muted);
cursor: pointer;
padding: 0.2rem;
display: flex;
align-items: center;
font-size: 0.7rem;
z-index: 3;
}
.search-clear:hover {
color: var(--text-primary);
}
.filter-select {
width: auto;
min-width: 140px;
}
/* ── Active Filter Chips ── */
.active-filters {
display: flex;
align-items: center;
gap: 0.4rem;
margin-bottom: 0.75rem;
flex-wrap: wrap;
font-size: 0.85rem;
}
.filter-label {
color: var(--text-muted);
font-weight: 500;
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.filter-chip {
display: inline-flex;
align-items: center;
gap: 0.3rem;
padding: 0.25rem 0.5rem;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: 100px;
color: var(--text-secondary);
font-size: 0.8rem;
}
.filter-chip i:first-child {
font-size: 0.7rem;
}
.filter-chip button {
background: none;
border: none;
color: var(--text-muted);
cursor: pointer;
padding: 0;
display: flex;
align-items: center;
font-size: 0.65rem;
line-height: 1;
}
.filter-chip button:hover {
color: var(--text-primary);
}
.clear-all {
background: none;
border: none;
color: var(--accent);
cursor: pointer;
font-size: 0.8rem;
padding: 0.25rem 0.5rem;
font-family: inherit;
}
.clear-all:hover {
text-decoration: underline;
}
/* ── Result Count ── */
.result-count {
font-size: 0.85rem;
color: var(--text-secondary);
margin-bottom: 1rem;
display: flex;
gap: 0.3rem;
}
/* ── Card Grid ── */
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
gap: 1rem;
}
.card-grid.detailed-view {
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card-grid.detailed-view .card-cell {
display: flex;
flex-direction: row;
height: 180px;
animation: none;
}
.card-grid.detailed-view .card-image-wrapper {
width: 130px;
height: 100%;
flex-shrink: 0;
}
.card-grid.detailed-view .card-label {
flex: 1;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
padding: 0.75rem;
gap: 0.4rem;
background: var(--bg-surface);
}
.card-grid.detailed-view .card-name {
font-size: 1rem;
font-weight: 700;
white-space: normal;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
line-height: 1.2;
}
.card-stats {
display: flex;
gap: 0.75rem;
font-size: 0.85rem;
font-weight: 600;
}
.card-stats .stat {
display: flex;
align-items: center;
gap: 0.25rem;
}
.card-stats .stat i {
font-size: 0.75rem;
}
.card-stats .stat:nth-child(1) {
color: #ffab40;
}
/* Attack */
.card-stats .stat:nth-child(2) {
color: #f44336;
}
/* Health */
.card-description-preview {
font-size: 0.8rem;
color: var(--text-secondary);
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
line-height: 1.4;
margin-top: 0.2rem;
}
.sort-group {
min-width: 200px;
}
.sort-select {
border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.sort-dir-btn {
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
border-left: none;
background: var(--bg-surface);
}
.view-toggle-btn {
min-width: 40px;
background: var(--bg-surface);
}
/* ── Card Cell ── */
.card-cell {
cursor: pointer;
border-radius: var(--radius);
overflow: hidden;
background: var(--bg-surface);
transition: transform 0.25s ease, box-shadow 0.25s ease;
border: 2px solid transparent;
animation: card-enter 0.4s ease-out both;
animation-delay: calc(var(--i, 0) * 25ms);
will-change: transform;
}
.card-cell:hover {
transform: translateY(-6px);
box-shadow: 0 8px 30px rgba(108, 99, 255, 0.2);
border-color: rgba(108, 99, 255, 0.2);
}
.card-cell.selected {
border-color: var(--gold);
box-shadow: 0 0 20px var(--gold-glow);
}
.card-cell.selected:hover {
box-shadow: 0 8px 30px var(--gold-glow);
}
@keyframes card-enter {
from {
opacity: 0;
transform: translateY(16px) scale(0.97);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
/* ── Card Image ── */
.card-image-wrapper {
position: relative;
width: 100%;
aspect-ratio: 5 / 7;
overflow: hidden;
background: #111128;
}
.card-shimmer {
position: absolute;
inset: 0;
background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
background-size: 200% 100%;
animation: shimmer 2.5s infinite;
pointer-events: none;
z-index: 0;
}
@keyframes shimmer {
0% {
background-position: -200% 0;
}
100% {
background-position: 200% 0;
}
}
.card-image-wrapper img {
position: relative;
width: 100%;
height: 100%;
object-fit: cover;
display: block;
z-index: 1;
}
.card-cost-badge {
position: absolute;
top: 0.4rem;
left: 0.4rem;
background: rgba(0, 0, 0, 0.75);
backdrop-filter: blur(4px);
color: var(--gold);
font-weight: 700;
font-size: 0.8rem;
padding: 0.15rem 0.5rem;
border-radius: 100px;
border: 1px solid rgba(255, 215, 0, 0.3);
z-index: 2;
line-height: 1.4;
}
.card-cost-badge::before {
content: "⚡";
margin-right: 0.15rem;
}
.card-immortalize-badge {
position: absolute;
top: 0.4rem;
right: 0.4rem;
background: rgba(0, 0, 0, 0.75);
backdrop-filter: blur(4px);
color: var(--gold);
font-size: 0.7rem;
padding: 0.25rem;
border-radius: 50%;
z-index: 2;
width: 1.5rem;
height: 1.5rem;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid rgba(255, 215, 0, 0.3);
}
/* ── Card Label ── */
.card-label {
display: flex;
justify-content: space-between;
align-items: center;
gap: 0.3rem;
padding: 0.4rem 0.6rem;
background: var(--bg-elevated);
min-height: 2.4rem;
}
.card-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
min-width: 0;
font-size: 0.8rem;
font-weight: 500;
color: var(--text-primary);
}
.card-category-badge {
flex-shrink: 0;
font-size: 0.65rem;
font-weight: 600;
padding: 0.15rem 0.45rem;
border-radius: 100px;
text-transform: uppercase;
letter-spacing: 0.04em;
background: var(--bg-hover);
color: var(--text-secondary);
border: 1px solid var(--border);
}
.card-category-badge.agent {
background: rgba(79, 195, 247, 0.15);
color: #4fc3f7;
border-color: rgba(79, 195, 247, 0.3);
}
.card-category-badge.spell {
background: rgba(206, 147, 216, 0.15);
color: #ce93d8;
border-color: rgba(206, 147, 216, 0.3);
}
.card-category-badge.token {
background: rgba(255, 213, 79, 0.15);
color: #ffd54f;
border-color: rgba(255, 213, 79, 0.3);
}
/* ── Empty State ── */
.empty-state {
text-align: center;
padding: 3rem 1rem;
color: var(--text-muted);
}
.empty-state i {
font-size: 2.5rem;
display: block;
margin-bottom: 1rem;
}
.empty-state p {
font-size: 1.1rem;
margin-bottom: 1rem;
}
/* ── Detail Modal ── */
.modal-backdrop {
position: fixed;
inset: 0;
z-index: 1040;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(4px);
animation: fade-in 0.2s ease-out;
}
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.card-detail {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1050;
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: 16px;
padding: 0;
max-width: 720px;
width: 92vw;
max-height: 88vh;
overflow-y: auto;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
color: var(--text-primary);
animation: detail-enter 0.25s ease-out;
}
@keyframes detail-enter {
from {
opacity: 0;
transform: translate(-50%, -50%) scale(0.92);
}
to {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
}
.detail-close {
position: absolute;
top: 0.75rem;
right: 0.75rem;
z-index: 1;
background: rgba(0, 0, 0, 0.5);
border: 1px solid rgba(255, 255, 255, 0.1);
color: var(--text-primary);
width: 2rem;
height: 2rem;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 0.8rem;
transition: all var(--transition);
}
.detail-close:hover {
background: rgba(255, 255, 255, 0.15);
}
.detail-layout {
display: flex;
gap: 1.5rem;
padding: 1.5rem;
}
.detail-image {
flex: 0 0 260px;
}
.detail-image img {
width: 100%;
border-radius: var(--radius);
box-shadow: var(--shadow);
}
.detail-info {
flex: 1;
min-width: 0;
}
.detail-header {
margin-bottom: 1rem;
}
.detail-header h2 {
margin: 0 0 0.75rem;
font-size: 1.4rem;
line-height: 1.3;
}
.detail-meta {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
}
.meta-badge {
display: inline-flex;
align-items: center;
gap: 0.3rem;
font-size: 0.75rem;
font-weight: 600;
padding: 0.25rem 0.6rem;
border-radius: 100px;
background: var(--bg-hover);
color: var(--text-secondary);
border: 1px solid var(--border);
}
.meta-badge.category {
}
.meta-badge.category.agent {
background: rgba(79, 195, 247, 0.15);
color: #4fc3f7;
border-color: rgba(79, 195, 247, 0.3);
}
.meta-badge.category.spell {
background: rgba(206, 147, 216, 0.15);
color: #ce93d8;
border-color: rgba(206, 147, 216, 0.3);
}
.meta-badge.category.token {
background: rgba(255, 213, 79, 0.15);
color: #ffd54f;
border-color: rgba(255, 213, 79, 0.3);
}
.meta-badge.cost {
background: rgba(255, 215, 0, 0.12);
color: var(--gold);
border-color: rgba(255, 215, 0, 0.3);
}
.meta-badge.attack {
background: rgba(239, 83, 80, 0.15);
color: #ef5350;
border-color: rgba(239, 83, 80, 0.3);
}
.meta-badge.health {
background: rgba(102, 187, 106, 0.15);
color: #66bb6a;
border-color: rgba(102, 187, 106, 0.3);
}
.meta-badge.speed {
background: rgba(79, 195, 247, 0.12);
color: #4fc3f7;
border-color: rgba(79, 195, 247, 0.3);
}
/* ── Detail Fields ── */
.detail-field {
display: flex;
gap: 0.5rem;
margin-bottom: 0.6rem;
font-size: 0.88rem;
line-height: 1.45;
}
.detail-field.description {
background: var(--bg-elevated);
padding: 0.6rem 0.75rem;
border-radius: var(--radius-sm);
border-left: 3px solid var(--accent);
margin-top: 0.25rem;
}
.field-label {
flex-shrink: 0;
color: var(--text-muted);
font-size: 0.8rem;
font-weight: 500;
min-width: 7.5rem;
display: flex;
align-items: flex-start;
gap: 0.3rem;
}
.detail-field.description .field-label {
min-width: auto;
color: var(--accent);
}
.field-value {
color: var(--text-secondary);
}
.detail-field.description .field-value {
color: var(--text-primary);
font-style: italic;
}
/* ── Scrollbar for modal ── */
.card-detail::-webkit-scrollbar {
width: 4px;
}
.card-detail::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 2px;
}
/* ── Responsive ── */
@media (max-width: 768px) {
.gallery-container {
padding: 1rem;
}
.filter-bar {
flex-direction: column;
}
.filter-select {
width: 100%;
min-width: 0;
}
.card-grid {
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 0.75rem;
}
.detail-layout {
flex-direction: column;
padding: 1rem;
}
.detail-image {
flex: 0 0 auto;
max-width: 180px;
margin: 0 auto;
}
.card-detail {
max-height: 90vh;
}
.tab {
padding: 0.4rem 0.8rem;
font-size: 0.8rem;
}
}
@media (max-width: 480px) {
.card-grid {
grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
gap: 0.5rem;
}
.category-tabs {
gap: 0.3rem;
}
.tab {
padding: 0.35rem 0.65rem;
font-size: 0.75rem;
}
.tab i {
display: none;
}
}