/* Roster member cards v2 — hover overlay + link tray */

.roster-page {
    --rc-gold: #ffcc00;
    --rc-gold-rgb: 255, 204, 0;
    --rc-red: #ff003c;
    --rc-red-rgb: 255, 0, 60;
    --rc-cyan: #00f2fe;
    --rc-cyan-rgb: 0, 242, 254;
    --rc-purple: #b142f5;
    --rc-purple-rgb: 177, 66, 245;
    --rc-neutral-rgb: 168, 168, 184;
    --rc-muted: #8e8e9f;
}

.roster-page .rc-scene {
    --rc-accent: var(--rc-gold);
    --rc-accent-rgb: var(--rc-gold-rgb);
    --rc-width: 220px;
    --rc-height: 304px;
    --rc-av: 84px;
    --rc-glow: rgba(var(--rc-accent-rgb), 0.22);
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    z-index: 2;
}

.roster-page .rc-scene.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.roster-page .rc-scene--leader {
    --rc-accent: var(--rc-gold);
    --rc-accent-rgb: var(--rc-gold-rgb);
    --rc-width: 230px;
    --rc-height: 314px;
    --rc-av: 88px;
}

.roster-page .rc-scene--deputy {
    --rc-accent: var(--rc-red);
    --rc-accent-rgb: var(--rc-red-rgb);
    --rc-width: 210px;
    --rc-height: 304px;
    --rc-av: 76px;
}

.roster-page .rc-scene--curator {
    --rc-accent: var(--rc-cyan);
    --rc-accent-rgb: var(--rc-cyan-rgb);
}

.roster-page .rc-scene--recruiter {
    --rc-accent: var(--rc-purple);
    --rc-accent-rgb: var(--rc-purple-rgb);
}

.roster-page .rc-scene--family {
    --rc-accent: #c9c9da;
    --rc-accent-rgb: var(--rc-neutral-rgb);
    --rc-width: 196px;
    --rc-height: 292px;
    --rc-av: 64px;
}

.roster-page .rc-card {
    position: relative;
    width: var(--rc-width);
    height: var(--rc-height);
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.roster-page .rc-card--locked {
    cursor: default;
}

.roster-page .rc-card:hover {
    transform: translateY(-6px);
    z-index: 5;
}

.roster-page .rc-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    border: 1.5px solid rgba(var(--rc-accent-rgb), 0.55);
    background:
        linear-gradient(165deg, rgba(var(--rc-accent-rgb), 0.07) 0%, transparent 42%),
        #111115;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.45),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        0 0 28px var(--rc-glow);
    overflow: hidden;
}

.roster-page .rc-card:hover .rc-frame {
    border-color: rgba(var(--rc-accent-rgb), 0.75);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.55),
        0 0 36px var(--rc-glow);
}

.roster-page .rc-chevron {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 14px;
    z-index: 4;
    color: rgba(var(--rc-accent-rgb), 0.85);
    filter: drop-shadow(0 0 6px rgba(var(--rc-accent-rgb), 0.45));
    pointer-events: none;
}

.roster-page .rc-chevron svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.roster-page .rc-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    min-width: 34px;
    height: 28px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.roster-page .rc-rank.rank-s { color: #ffd700; border-color: rgba(255, 215, 0, 0.35); }
.roster-page .rc-rank.rank-a { color: #ff6b6b; border-color: rgba(255, 107, 107, 0.35); }
.roster-page .rc-rank.rank-b { color: #7dd3fc; border-color: rgba(125, 211, 252, 0.35); }
.roster-page .rc-rank.rank-c { color: #86efac; border-color: rgba(134, 239, 172, 0.35); }
.roster-page .rc-rank.rank-d { color: #7dd3fc; border-color: rgba(125, 211, 252, 0.25); }
.roster-page .rc-rank.rank-e { color: #d1d5db; border-color: rgba(209, 213, 219, 0.25); }
.roster-page .rc-rank.rank-f { color: #d1d5db; border-color: rgba(209, 213, 219, 0.25); }

.roster-page .rc-medal-slot {
    position: absolute;
    top: 10px;
    right: 10px;
    left: 52px;
    z-index: 3;
    pointer-events: none;
    display: flex;
    justify-content: flex-end;
}

.roster-page .rc-medal-empty {
    height: 28px;
    max-width: 100%;
    padding: 0 9px;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.24);
    background: rgba(0, 0, 0, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.roster-page .rc-medal-empty-text {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #b8b8c8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roster-page .rc-medal-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1px solid rgba(var(--med-rgb, 142, 142, 159), 0.45);
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(var(--med-rgb, 142, 142, 159), 0.15);
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.roster-page .rc-medal-icon svg {
    width: 16px;
    height: 16px;
    color: var(--med-color, #8e8e9f);
}

.roster-page .rc-medal-icon--custom {
    border-style: dashed;
}

.roster-page .rc-card:hover .rc-medal-icon {
    border-color: rgba(var(--med-rgb, 142, 142, 159), 0.75);
    background: rgba(var(--med-rgb, 142, 142, 159), 0.12);
    box-shadow: 0 0 14px rgba(var(--med-rgb, 142, 142, 159), 0.28);
}

.roster-page .rc-front {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px 18px;
    text-align: center;
    transition: filter 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
}

.roster-page .rc-card:hover .rc-front {
    filter: blur(5px);
    opacity: 0.35;
    transform: scale(0.96);
}

.roster-page .rc-av-wrap {
    position: relative;
    width: var(--rc-av);
    height: var(--rc-av);
    margin-bottom: 14px;
}

.roster-page .rc-av {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.roster-page .rc-status {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid #111115;
}

.roster-page .rc-status.st-ingame { background: #00e676; box-shadow: 0 0 10px rgba(0, 230, 118, 0.7); }
.roster-page .rc-status.st-on { background: #4a9eff; }
.roster-page .rc-status.st-idle { background: #ffaa00; }
.roster-page .rc-status.st-dnd { background: #ff003c; }
.roster-page .rc-status.st-off { background: #5c5c6a; }

.roster-page .rc-name {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roster-page .rc-scene--leader .rc-name { font-size: 16px; }

.roster-page .rc-handle {
    font-size: 11px;
    font-weight: 600;
    color: var(--rc-muted);
    margin-bottom: 12px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roster-page .rc-role {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rc-accent);
    border: 1px solid rgba(var(--rc-accent-rgb), 0.45);
    background: rgba(var(--rc-accent-rgb), 0.08);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roster-page .rc-hover {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    padding: 30px 10px 34px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s;
    pointer-events: none;
    overflow: hidden;
}

.roster-page .rc-card:hover .rc-hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.roster-page .rc-hover::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 8, 12, 0.88) 0%, rgba(10, 10, 14, 0.96) 100%),
        radial-gradient(ellipse 90% 60% at 50% 0%, rgba(var(--rc-accent-rgb), 0.14), transparent 70%);
    border-radius: inherit;
    pointer-events: none;
}

.roster-page .rc-hover-body {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-bottom: 28px;
}

.roster-page .rc-hover-foot {
    position: absolute;
    z-index: 3;
    right: 8px;
    bottom: 8px;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.roster-page .rc-link-hub {
    position: relative;
    flex-shrink: 0;
}

.roster-page .rc-link-tray {
    position: absolute;
    z-index: 6;
    right: 0;
    bottom: calc(100% + 6px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    min-width: 128px;
    padding: 8px;
    border-radius: 11px;
    background: rgba(10, 10, 14, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(5px) scale(0.96);
    transform-origin: bottom right;
    transition:
        opacity 0.22s ease,
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.22s;
}

.roster-page .rc-link-tray::after {
    content: '';
    position: absolute;
    right: 9px;
    bottom: -4px;
    width: 8px;
    height: 8px;
    background: rgba(10, 10, 14, 0.97);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: rotate(45deg);
}

.roster-page .rc-link-tray-head {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rc-muted);
    padding: 0 2px 2px;
}

.roster-page .rc-link-tray--loading {
    font-size: 9px;
    font-weight: 700;
    color: var(--rc-muted);
    padding: 4px 2px;
}

.roster-page .rc-link-hub:hover .rc-link-tray,
.roster-page .rc-link-hub:focus-within .rc-link-tray {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.roster-page .rc-link-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(var(--rc-accent-rgb), 0.45);
    border-radius: 7px;
    background: rgba(var(--rc-accent-rgb), 0.1);
    color: var(--rc-accent);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.roster-page .rc-link-btn svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.roster-page .rc-link-hub:hover .rc-link-btn,
.roster-page .rc-link-hub:focus-within .rc-link-btn {
    border-color: rgba(var(--rc-accent-rgb), 0.75);
    background: rgba(var(--rc-accent-rgb), 0.2);
    box-shadow: 0 0 12px rgba(var(--rc-accent-rgb), 0.22);
}

.roster-page .rc-link-hub--empty .rc-link-btn {
    opacity: 0.28;
    cursor: not-allowed;
    box-shadow: none;
}

.roster-page .rc-link-hub--empty:hover .rc-link-tray {
    display: none;
}

.roster-page .rc-soc {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    padding: 0 8px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.18s, background 0.18s, transform 0.18s;
}

.roster-page .rc-soc:hover {
    transform: translateX(-2px);
}

.roster-page .rc-soc-mark {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.roster-page .rc-soc-mark svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.roster-page .rc-soc-label {
    flex: 1;
    min-width: 0;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ececf2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roster-page .rc-soc-go {
    font-size: 11px;
    font-weight: 700;
    color: var(--rc-muted);
    opacity: 0.45;
    transition: opacity 0.18s, color 0.18s, transform 0.18s;
}

.roster-page .rc-soc:hover .rc-soc-go {
    opacity: 1;
    color: var(--rc-accent);
    transform: translateX(2px);
}

.roster-page .rc-soc--yt {
    border-left: 2px solid rgba(255, 59, 59, 0.65);
}

.roster-page .rc-soc--yt .rc-soc-mark {
    color: #ff5555;
    background: rgba(255, 59, 59, 0.12);
    border: 1px solid rgba(255, 59, 59, 0.22);
}

.roster-page .rc-soc--yt:hover {
    border-color: rgba(255, 59, 59, 0.35);
    background: rgba(255, 59, 59, 0.08);
}

.roster-page .rc-soc--tw {
    border-left: 2px solid rgba(145, 70, 255, 0.65);
}

.roster-page .rc-soc--tw .rc-soc-mark {
    color: #b47aff;
    background: rgba(145, 70, 255, 0.12);
    border: 1px solid rgba(145, 70, 255, 0.22);
}

.roster-page .rc-soc--tw:hover {
    border-color: rgba(145, 70, 255, 0.35);
    background: rgba(145, 70, 255, 0.08);
}

.roster-page .rc-hover-medal {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid rgba(var(--med-rgb, 142, 142, 159), 0.32);
    background: rgba(var(--med-rgb, 142, 142, 159), 0.08);
    min-width: 0;
}

.roster-page .rc-hover-medal--empty {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.roster-page .rc-hover-medal--empty .rc-hover-medal-title {
    color: var(--rc-muted);
    font-size: 9px;
    font-weight: 800;
}

.roster-page .rc-hover-medal--custom {
    border-style: dashed;
}

.roster-page .rc-hover-medal-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(var(--med-rgb, 142, 142, 159), 0.35);
}

.roster-page .rc-hover-medal-mark svg {
    width: 16px;
    height: 16px;
    color: var(--med-color, #8e8e9f);
}

.roster-page .rc-hover-medal-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.roster-page .rc-hover-medal-title {
    font-size: 10px;
    font-weight: 800;
    color: #f2f2f7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roster-page .rc-hover-medal-sub {
    font-size: 8px;
    font-weight: 700;
    color: var(--med-color, #8e8e9f);
}

.roster-page .rc-hover-medal-cat {
    flex-shrink: 0;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rc-muted);
    padding: 3px 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.roster-page .rc-hover-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(var(--rc-accent-rgb), 0.28);
    background: rgba(var(--rc-accent-rgb), 0.1);
    color: var(--rc-accent);
    align-self: flex-start;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.roster-page .rc-hover-status-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.roster-page .rc-hover-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
    flex-shrink: 0;
}

.roster-page .rc-hover-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    flex: 1 1 auto;
}

.roster-page .rc-hover-line {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 5px;
    align-items: baseline;
    padding: 4px 7px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 0;
}

.roster-page .rc-hover-line--stack {
    grid-template-columns: 1fr;
    gap: 3px;
    align-items: start;
}

.roster-page .rc-hover-line span {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rc-muted);
    line-height: 1.2;
}

.roster-page .rc-hover-line b {
    font-size: 10px;
    font-weight: 800;
    color: #f0f0f5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.roster-page .rc-hover-line--stack b,
.roster-page .rc-hover-line--wrap b {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    word-break: break-word;
    text-overflow: unset;
}

@media (prefers-reduced-motion: reduce) {
    .roster-page .rc-scene,
    .roster-page .rc-scene.is-visible,
    .roster-page .rc-card,
    .roster-page .rc-front,
    .roster-page .rc-hover,
    .roster-page .rc-link-tray,
    .roster-page .rc-link-btn {
        transition: none !important;
        animation: none !important;
    }

    .roster-page .rc-scene {
        opacity: 1;
        transform: none;
    }

    .roster-page .rc-card:hover .rc-front {
        filter: none;
        opacity: 1;
        transform: none;
    }

    .roster-page .rc-hover {
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
    }
}
