/* =========================================
   TRAINER-SHELL.CSS - shared trainer chrome
   (tool nav, page header, bridge status)
   ========================================= */

.trainer-tools-row {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.trainer-tool-link {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35em 0.9em;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    letter-spacing: 0.03em;
}
.trainer-tool-link:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.35);
}
.trainer-tool-link.active {
    background: rgba(0,200,255,0.12);
    color: #00c8ff;
    border-color: rgba(0,200,255,0.4);
}

.trainer-header { padding: 0 4px; }

.trainer-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.trainer-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    border: 1px solid var(--accent-purple);
    color: var(--accent-purple);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(124, 58, 237, 0.07);
    margin-bottom: 10px;
}

.trainer-header h1 {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.trainer-sub {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: 480px;
}
.trainer-sub strong { color: var(--text-primary); font-weight: 600; }

.trainer-status-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 6px;
    white-space: nowrap;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: background 0.3s, box-shadow 0.3s;
}
.status-dot.connected  { background: var(--accent-green);  box-shadow: 0 0 8px var(--accent-green); }
.status-dot.adapter    { background: var(--accent-amber);  box-shadow: 0 0 8px var(--accent-amber); }
.status-dot.failed     { background: var(--accent-red);    box-shadow: 0 0 8px var(--accent-red); }

.status-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.status-dl-link {
    font-size: 0.8rem;
    color: #00c8ff;
    text-decoration: none;
    font-weight: 600;
    padding-left: 0.4rem;
    border-left: 1px solid rgba(255,255,255,0.12);
    white-space: nowrap;
    transition: color 0.15s;
}
.status-dl-link:hover { color: #fff; }
.status-dl-link[hidden] { display: none; }

/* ---- game over + leaderboard panel (shared by score-run trainers) ---- */
.trainer-gameover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 6, 14, 0.75);
    backdrop-filter: blur(3px);
    border-radius: inherit;
    z-index: 5;
}
.trainer-gameover[hidden] { display: none; }

.trainer-gameover-inner {
    text-align: center;
    padding: 1.75rem 2rem;
    border-radius: 14px;
    min-width: 280px;
    max-width: 400px;
    max-height: 100%;
    overflow-y: auto;
}

.tg-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0.3rem;
}
.tg-score {
    font-size: 3.4rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}
.tg-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.4rem 0 1.1rem;
}

.tg-submit-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.tg-submit-row[hidden] { display: none; }
.tg-username {
    flex: 1;
    min-width: 0;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 7px;
    color: #fff;
    font-size: 0.85rem;
    padding: 0.45em 0.7em;
    outline: none;
}
.tg-username:focus {
    border-color: rgba(0,200,255,0.5);
    background: rgba(255,255,255,0.08);
}
.tg-submit-msg {
    font-size: 0.78rem;
    color: var(--text-muted);
    min-height: 1.1em;
    margin-bottom: 0.5rem;
}

.tg-lb-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #00c8ff;
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.tg-lb-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    font-size: 0.85rem;
    text-align: left;
}
.tg-lb-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    color: var(--text-muted);
}
.tg-lb-mine {
    background: rgba(0,200,255,0.1);
    border: 1px solid rgba(0,200,255,0.2);
    color: #00c8ff;
}
.tg-lb-rank { width: 1.4em; text-align: right; font-weight: 700; }
.tg-lb-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-lb-score { font-weight: 700; color: var(--text-primary); }
.tg-lb-mine .tg-lb-score { color: #00c8ff; }
.tg-lb-empty { color: var(--text-muted); font-style: italic; padding: 0.3rem 0.5rem; }
