/* ── Trainer static profile page styles ─────────────────────────── */

.trainer-hero {
    position: relative;
    padding: 2.5rem 3rem 2.5rem;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.trainer-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, var(--trainer-glow, rgba(77,144,213,0.12)), transparent 65%);
    pointer-events: none;
}
.trainer-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--trainer-color, #4d90d5), transparent 80%);
    opacity: 0.6;
}
.trainer-hero-inner {
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.hero-breadcrumb {
    font-family: 'Outfit', sans-serif;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.hero-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.hero-breadcrumb a:hover { color: var(--gold); }

.hero-layout {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.hero-sprite-wrap {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    background: var(--trainer-bg, rgba(77,144,213,0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--trainer-border, rgba(77,144,213,0.25));
}
.hero-sprite {
    width: 120px;
    height: 120px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}
.hero-sprite-placeholder {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--trainer-color, #4d90d5);
    opacity: 0.7;
}
.hero-text { flex: 1; min-width: 0; }
.hero-trainer-name {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1.0;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}
.hero-trainer-name em {
    font-style: italic;
    color: var(--trainer-color, #4d90d5);
    -webkit-text-fill-color: var(--trainer-color, #4d90d5);
}
.hero-sub {
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.hero-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.hero-chip {
    font-family: 'Outfit', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-secondary);
    white-space: nowrap;
}
.hero-chip.filled {
    background: var(--trainer-color, #4d90d5);
    border-color: var(--trainer-color, #4d90d5);
    color: #0a0a12;
}
.hero-chip.games {
    font-family: 'DM Mono', monospace;
    font-size: 0.62rem;
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* Profile */
.profile-section {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2.5rem 3rem;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
    border-bottom: 1px solid var(--border);
}
.photo-col { display: flex; flex-direction: column; gap: 0.75rem; }
.photo-placeholder {
    width: 200px;
    aspect-ratio: 2/3;
    background: var(--bg-elevated);
    border: 2px dashed var(--border-hover);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text-muted);
}
.photo-placeholder svg { opacity: 0.35; }
.photo-placeholder span {
    font-family: 'DM Mono', monospace;
    font-size: 0.62rem;
    color: var(--text-muted);
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.photo-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.58rem;
    color: var(--text-muted);
    opacity: 0.45;
    max-width: 200px;
    line-height: 1.6;
}
.info-col { display: flex; flex-direction: column; justify-content: center; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.15rem;
}
.info-card-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}
.info-card-value {
    font-family: 'DM Mono', monospace;
    font-size: 0.88rem;
    color: var(--text-primary);
    font-weight: 500;
}
.info-card-value.accent { color: var(--trainer-color, #4d90d5); }

/* Cards section */
.cards-section {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 3rem 4rem;
}
.cards-section-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.cards-section-title {
    font-family: 'Instrument Serif', serif;
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.cards-section-title em {
    font-style: italic;
    color: var(--trainer-color, #4d90d5);
}
.cards-section-count {
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Flat card grid */
.cards-flat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.cards-flat-grid .card-thumb {
    position: relative;
    flex: 0 0 auto;
}
.cards-flat-grid .card-thumb.card-hidden {
    display: none;
}

/* Card label legibility overrides */
.cards-flat-grid .card-thumb-label {
    font-size: 0.62rem;
    color: var(--text-secondary);
    padding: 0.3rem 0.45rem 0.15rem;
}

/* Set tag on each card */
.card-set-tag {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    color: rgba(255,255,255,0.55);
    background: rgba(0,0,0,0.6);
    padding: 0.2rem 0.45rem;
    border-radius: 3px;
    margin-top: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Filter bar */
.cards-filter-bar {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.cards-filter-chip {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.cards-filter-chip:hover {
    border-color: var(--trainer-color, #4d90d5);
    color: var(--trainer-color, #4d90d5);
}
.cards-filter-chip.active {
    background: var(--trainer-color, #4d90d5);
    border-color: var(--trainer-color, #4d90d5);
    color: #0a0a12;
}

/* Quote */
.hero-quote {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0.85rem 0 0;
    padding-left: 0.8rem;
    border-left: 2px solid var(--trainer-color, #4d90d5);
    max-width: 540px;
    line-height: 1.55;
    opacity: 0.85;
}

/* Signature Pokémon */
.signature-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem;
    background: var(--trainer-bg, rgba(77,144,213,0.08));
    border: 1px solid var(--trainer-border, rgba(77,144,213,0.2));
    border-radius: 12px;
    width: 200px;
}
.signature-sprite {
    width: 120px;
    height: 120px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 4px 16px var(--trainer-glow));
}
.signature-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}
.signature-caption {
    font-family: 'DM Mono', monospace;
    font-size: 0.56rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Team row */
.team-row {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.team-row-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}
.team-mons {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    align-items: flex-end;
}
.team-mon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}
.team-mon img {
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}
.team-mon-lvl {
    font-family: 'DM Mono', monospace;
    font-size: 0.58rem;
    color: var(--trainer-color, #4d90d5);
    text-align: center;
    font-weight: 500;
    line-height: 1;
    margin-top: 0.15rem;
}
.team-mon-name {
    font-family: 'DM Mono', monospace;
    font-size: 0.5rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Loading */
.page-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 300px;
    color: var(--text-muted);
    font-family: 'DM Mono', monospace;
    font-size: 0.82rem;
}
.spinner {
    width: 32px; height: 32px;
    border: 2px solid rgba(255,255,255,0.08);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
    .trainer-hero { padding: 1.75rem 1.25rem 2rem; }
    .hero-layout { gap: 1.25rem; }
    .hero-sprite-wrap { width: 100px; height: 100px; }
    .hero-sprite { width: 80px; height: 80px; }
    .hero-trainer-name { font-size: 2rem; }
    .profile-section { grid-template-columns: 1fr; padding: 1.75rem 1.25rem; }
    .photo-col { flex-direction: row; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
    .cards-section { padding: 1.5rem 1.25rem 3rem; }
}
@media (max-width: 480px) {
    .hero-sprite-wrap { width: 72px; height: 72px; }
    .hero-sprite { width: 60px; height: 60px; }
    .hero-trainer-name { font-size: 1.65rem; }
}
