Vibed deck viewer

This commit is contained in:
2026-06-18 13:30:46 -04:00
parent c3c8aa1403
commit 111bc36fd4
12 changed files with 1062 additions and 34 deletions
+390
View File
@@ -0,0 +1,390 @@
.deck-detail-page {
max-width: 800px;
margin: 0 auto;
padding: 0 1rem 3rem;
}
.back-link {
display: inline-flex;
align-items: center;
gap: 0.4rem;
color: var(--text-secondary);
text-decoration: none;
font-size: 0.85rem;
margin-bottom: 1.5rem;
transition: color var(--transition);
}
.back-link:hover {
color: var(--accent);
}
.deck-article {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 2rem;
}
.deck-header {
margin-bottom: 2rem;
padding-bottom: 1.5rem;
border-bottom: 1px solid var(--border);
}
.deck-header h1 {
margin: 0 0 0.5rem;
}
.deck-factions {
display: flex;
gap: 0.4rem;
margin-bottom: 0.5rem;
flex-wrap: wrap;
}
.faction-badge {
display: inline-block;
font-size: 0.75rem;
font-weight: 600;
padding: 0.2rem 0.7rem;
border-radius: 999px;
background: var(--bg-elevated);
color: var(--accent);
border: 1px solid var(--border);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.deck-card-count {
font-size: 0.85rem;
color: var(--text-muted);
margin: 0;
}
.deck-section {
margin-bottom: 2rem;
}
.deck-section:last-child {
margin-bottom: 0;
}
.deck-section h2 {
font-size: 1.05rem;
font-weight: 600;
margin: 0 0 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
color: var(--text-primary);
}
.deck-card-row {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
}
.mini-card-btn {
background: none;
border: none;
padding: 0;
cursor: pointer;
font-family: inherit;
display: block;
}
.mini-card {
width: 110px;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
overflow: hidden;
transition: border-color var(--transition), transform var(--transition);
}
.mini-card:hover {
border-color: var(--accent);
transform: translateY(-2px);
}
.mini-card-img {
width: 110px;
height: 100px;
overflow: hidden;
background: var(--bg-primary);
display: flex;
align-items: center;
justify-content: center;
}
.mini-card-img img {
width: 100%;
height: 100%;
object-fit: cover;
}
.mini-card-name {
font-size: 0.75rem;
font-weight: 500;
padding: 0.35rem 0.4rem;
text-align: center;
color: var(--text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.deck-description {
font-size: 0.95rem;
line-height: 1.7;
color: var(--text-secondary);
}
.deck-description p {
margin: 0 0 1rem;
}
.deck-description p:last-child {
margin-bottom: 0;
}
.empty-state {
text-align: center;
padding: 4rem 1rem;
color: var(--text-muted);
}
.empty-state i {
font-size: 3rem;
display: block;
margin-bottom: 1rem;
}
/* ── Detail Modal (shared with Cards page) ── */
.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.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-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;
}
.card-detail::-webkit-scrollbar {
width: 4px;
}
.card-detail::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 2px;
}
@media (max-width: 768px) {
.detail-layout {
flex-direction: column;
padding: 1rem;
}
.detail-image {
flex: 0 0 auto;
max-width: 180px;
margin: 0 auto;
}
.card-detail {
max-height: 90vh;
}
}