/* The Wall of Fame (#/wall-of-fame, fame.js). */

.fame { display: flex; flex-direction: column; gap: 18px; }

.fame-bar { display: flex; justify-content: flex-end; margin: -8px 0 10px; }
.fame-live {
    display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--green); border: 1px solid rgba(127, 174, 120, 0.4);
    border-radius: 999px; padding: 3px 11px; background: rgba(127, 174, 120, 0.07);
}
.fame-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: fame-pulse 2s ease-in-out infinite; }
@keyframes fame-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* the top three */
.fame-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; }
.fame-top {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
    padding: 22px 14px 18px; border-radius: var(--radius); border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(201, 168, 76, 0.1), var(--navy-800) 60%);
}
.fame-top.place-1 { order: 2; padding-top: 30px; border-color: var(--line-strong); box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.15), var(--shadow); }
.fame-top.place-2 { order: 1; }
.fame-top.place-3 { order: 3; }
.fame-medal { font-size: 30px; line-height: 1; }
.fame-top.place-1 .fame-medal { font-size: 38px; }
.fame-top .fame-name { font-family: var(--serif); font-size: 19px; color: var(--white); text-decoration: none; }
.fame-top.place-1 .fame-name { font-size: 22px; }
.fame-top a.fame-name:hover { color: var(--gold-bright); }

.fame-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; background: var(--navy-700); }
.fame-avatar.blank { display: inline-flex; align-items: center; justify-content: center; color: var(--faint); }
.fame-avatar.big { width: 76px; height: 76px; border: 2px solid var(--gold-dim); }
.fame-top.place-1 .fame-avatar.big { width: 92px; height: 92px; border-color: var(--gold-bright); }

.fame-tier {
    display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--gold-bright);
    border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 9px 2px 6px; white-space: nowrap;
}
.fame-tier img { width: 16px; height: 16px; }
.fame-since { font-size: 12.5px; color: var(--faint); }
.fame-sources { display: inline-flex; gap: 5px; }
.fame-src { font-size: 11px; letter-spacing: 0.04em; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.fame-src.kofi { border-color: rgba(114, 165, 242, 0.45); color: #9cc0f5; }
.fame-src.mee6 { border-color: rgba(165, 101, 227, 0.45); color: #c49ef0; }
.fame-amount { font-weight: 600; color: var(--green); font-size: 13px; }

/* fourth and down */
.fame-list { list-style: none; margin: 0; padding: 0; }
.fame-list li {
    display: grid; grid-template-columns: 34px 36px minmax(0, 1fr) auto; align-items: center; gap: 12px;
    padding: 9px 4px; border-bottom: 1px solid var(--line);
}
/* tier, where they gave and (admins) how much, lined up down the list */
.fame-tags { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.fame-tier-slot { min-width: 170px; display: flex; justify-content: flex-end; }
.fame-tags .fame-sources { min-width: 96px; }
.fame-tags .fame-amount { min-width: 48px; text-align: right; }
.fame-list li:last-child { border-bottom: 0; }
.fame-place { font-family: var(--serif); font-size: 18px; color: var(--gold); text-align: right; }
.fame-who { display: flex; flex-direction: column; min-width: 0; }
.fame-who .fame-name { color: var(--white); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fame-who a.fame-name:hover { color: var(--gold-bright); }

/* someone who's just arrived or moved up */
.fame-up { animation: fame-up 2.4s ease-out; }
@keyframes fame-up {
    0% { background-color: rgba(201, 168, 76, 0.35); }
    100% { background-color: transparent; }
}
.fame-top.fame-up { animation: fame-up-card 2.4s ease-out; }
@keyframes fame-up-card { 0% { box-shadow: 0 0 0 3px var(--gold-bright), var(--shadow); } 100% { box-shadow: var(--shadow); } }

.fame-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 10px; }
.fame-chip { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--navy-800); min-width: 0; }
.fame-chip > span { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.fame-chip .fame-name { color: var(--white); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.fame-title-emoji { width: 22px; height: 22px; }

/* join */
.fame-tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.fame-tier-card {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; text-align: center;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--navy-800);
}
.fame-tier-card img { width: 34px; height: 34px; }
.fame-tier-card strong { font-family: var(--serif); font-weight: 400; color: var(--white); }
.fame-tier-card span { color: var(--gold-bright); font-size: 13px; }
.fame-link-form { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.fame-link-form label { display: flex; flex-direction: column; }
.fame-link-form .hint { margin-top: 2px; }
.fame-link-form .row { display: flex; gap: 8px; }
.fame-link-form input { flex: 1; min-width: 0; }
.fame input[type="email"], .fame input[type="text"], .fame input[type="number"], .fame input[type="date"], .fame select {
    background: var(--navy-950); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 10px; color: var(--cream);
}

/* admins */
.fame-admin .members-table { overflow-x: auto; }
.fame-admin td .btn + .btn { margin-left: 6px; }
.fame-admin td .btn { display: inline-flex; align-items: center; vertical-align: middle; min-height: 30px; }
.fame-admin td .btn svg { width: 16px; height: 16px; }

@media (max-width: 760px) {
    .fame-podium { grid-template-columns: 1fr; }
    .fame-top.place-1, .fame-top.place-2, .fame-top.place-3 { order: 0; }
    /* the top three as compact rows: medal and picture, then the rest beside them */
    .fame-top, .fame-top.place-1 {
        display: grid; grid-template-columns: auto auto minmax(0, 1fr); justify-items: start; align-items: center;
        text-align: left; column-gap: 12px; row-gap: 4px; padding: 12px 14px;
    }
    .fame-top > * { grid-column: 3; }
    .fame-top > .fame-medal, .fame-top > .fame-avatar { grid-row: 1 / span 5; }
    .fame-top > .fame-medal { grid-column: 1; font-size: 28px; }
    .fame-top.place-1 .fame-medal { font-size: 32px; }
    .fame-top > .fame-avatar { grid-column: 2; }
    .fame-avatar.big, .fame-top.place-1 .fame-avatar.big { width: 60px; height: 60px; }
    .fame-top .fame-name, .fame-top.place-1 .fame-name { font-size: 18px; }
    .fame-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fame-list li { grid-template-columns: 26px 32px minmax(0, 1fr); row-gap: 6px; }
    .fame-tags { grid-column: 3; justify-content: flex-start; flex-wrap: wrap; gap: 6px; }
    .fame-tier-slot, .fame-tags .fame-sources, .fame-tags .fame-amount { min-width: 0; }
    .fame-tier-slot:empty { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .fame-live .dot, .fame-up, .fame-top.fame-up { animation: none; }
}
