/* FlappyGir admin - the look is resorted-ui (ui/ui.css); only this page's own parts here. */
.fa-view { display: grid; gap: 18px; }
.fa-view .rui-head { margin-bottom: 4px; }
.fa-card { display: grid; gap: 14px; padding: 22px; }
.fa-card-title { margin: 0; font-size: 18px; }
.fa-card .note { margin: 0; }
.fa-card > .label { margin: 4px 0 -8px; }
.note { color: var(--muted); font-size: 13.5px; }

/* the leaderboard */
.fa-stats .stat b { font-size: 26px; }
@media (max-width: 900px) { .stats.fa-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fa-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fa-toolbar .spacer { flex: 1; }
.fa-search { display: flex; align-items: center; gap: 8px; width: min(100%, 320px); padding: 0 12px; color: var(--faint); }
.fa-search input { flex: 1; min-width: 0; padding: 9px 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; }
.fa-table-wrap { overflow-x: auto; margin: 0 -6px; }
.fa-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.fa-table th { padding: 8px 10px; border-bottom: 1px solid var(--line2); color: var(--faint); font: 600 12px var(--font); text-align: left; text-transform: uppercase; letter-spacing: 0.06em; }
.fa-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.fa-table tbody tr:hover td { background: rgba(79, 220, 255, 0.04); }
.fa-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.fa-table .fa-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fa-table .fa-score { font: 600 17px var(--font-display); color: var(--text); }
.fa-table .fa-actions { width: 1%; text-align: right; white-space: nowrap; }
.fa-medal { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #140b0e; font: 700 12.5px var(--font); }
.fa-medal.m1 { background: #ffd84a; }
.fa-medal.m2 { background: #d9dde4; }
.fa-medal.m3 { background: #e7a46a; }
.fa-more { justify-self: center; }
@media (max-width: 700px) { .fa-table .hide-s { display: none; } }
@media (max-width: 1000px) { .fa-table .hide-m { display: none; } }

/* a setting with its switch on the right */
.fa-setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fa-setting b { font-weight: 600; }
.fa-block .label { margin-top: 0; }
.fa-block .note { margin: 0 0 8px; }
.fa-slider { display: grid; gap: 4px; }
.fa-slider-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fa-slider-label { font-weight: 600; font-size: 14px; }
.fa-val { color: var(--c1); font: 500 13.5px var(--font-mono); }
.fa-slider input[type='range'] { width: 100%; margin: 2px 0; }
.fa-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fa-ask-check { margin-top: 10px; }

/* characters: 2 per row (1 on phones) */
.fa-chars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fa-char { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); }
.fa-char-pic { display: grid; place-items: center; flex: none; width: 76px; height: 76px; padding: 8px; border-radius: 10px; }
.fa-char-pic img { max-width: 100%; max-height: 100%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3)); }
.fa-char-side { display: grid; flex: 1; min-width: 0; gap: 8px; }
.fa-char-btns { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
@media (max-width: 640px) { .fa-chars { grid-template-columns: 1fr; } }
.fa-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fa-extra { width: min(100%, 300px); }

/* what players can pick: tiles that are on or off */
.fa-offer { display: grid; gap: 8px; }
.fa-offer.swatches { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
.fa-offer.bgs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .fa-offer.bgs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fa-offer-btn { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); color: var(--muted); font: 500 14px var(--font); text-align: left; cursor: pointer; opacity: 0.6; }
.fa-offer-btn:hover { border-color: var(--line3); opacity: 0.85; }
.fa-offer-btn[aria-pressed='true'] { border-color: rgba(79, 220, 255, 0.55); background: rgba(79, 220, 255, 0.07); color: var(--text); opacity: 1; box-shadow: 0 0 16px -8px rgba(79, 220, 255, 0.8); }
.fa-swatch { flex: none; width: 24px; height: 24px; border: 2px solid #140b0e; border-radius: 50%; background: linear-gradient(var(--t) 0 30%, #140b0e 30% 38%, var(--p) 38%); }
.fa-bg { position: relative; flex: none; width: 40px; height: 28px; border: 2px solid #140b0e; border-radius: 6px; overflow: hidden; background: linear-gradient(var(--a), var(--b)); }
.fa-bg::before { content: ''; position: absolute; inset: 30% 0 20% 0; background: var(--m); clip-path: polygon(0 100%, 0 55%, 22% 15%, 45% 60%, 62% 5%, 82% 50%, 100% 30%, 100% 100%); }
.fa-bg::after { content: ''; position: absolute; inset: 80% 0 0 0; background: var(--g); }

/* the player picture */
.fa-picture { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; align-items: center; }
.fa-picture-box { display: grid; place-items: center; aspect-ratio: 1; padding: 14px; border: 1px solid var(--line2); border-radius: 14px; }
.fa-picture-box img { max-width: 100%; max-height: 100%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3)); }
.fa-picture-side { display: grid; gap: 12px; }
@media (max-width: 560px) {
  .fa-picture { grid-template-columns: 1fr; }
  .fa-picture-box { width: 160px; justify-self: center; }
  .fa-picture-side .btn-row { display: grid; grid-template-columns: 1fr; }
}

/* colours: 3 + 3 (2 + 2 + 2 on phones) */
.fa-colours { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fa-colour { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); cursor: pointer; font-size: 14px; }
.fa-colour input[type='color'] { flex: none; }
@media (max-width: 640px) { .fa-colours { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Customize: the cards, and the preview beside them (below them on narrow screens) */
.fa-cards { display: grid; gap: 18px; }
.rui-main.fa-with-preview { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 24px; align-items: start; }
.rui-main.fa-with-preview > #problem-banner { grid-column: 1 / -1; }
.fa-preview { position: sticky; top: 24px; display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); }
.fa-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fa-preview-head .seg-btn { padding: 5px 10px; font-size: 13px; }
.fa-preview-phone { aspect-ratio: 9 / 16; border: 3px solid #140b0e; border-radius: 16px; overflow: hidden; background: #1b9fc4; box-shadow: 0 0 0 1px var(--line2), 0 18px 40px -16px rgba(0, 0, 0, 0.8); }
.fa-preview-frame { display: block; width: 100%; height: 100%; border: 0; }
.fa-preview-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fa-preview .note { margin: 0; }
@media (max-width: 1180px) {
  .rui-main.fa-with-preview { grid-template-columns: minmax(0, 1fr); }
  .fa-preview { position: static; width: min(100%, 360px); justify-self: center; margin-top: 18px; }
}

/* admins */
.fa-person { display: flex; align-items: center; gap: 12px; padding: 10px 4px; }
.fa-person-text { display: grid; flex: 1; min-width: 0; }
.fa-person-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fa-avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; object-fit: cover; }
.fa-avatar-empty { display: grid; place-items: center; background: var(--card2); color: var(--muted); font-weight: 600; }
.fa-add { display: flex; gap: 10px; }
.fa-add .field { flex: 1; min-width: 0; }
@media (max-width: 560px) { .fa-add { display: grid; } }
.fa-code { display: block; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 10px; background: var(--field); font: 500 13.5px var(--font-mono); overflow-wrap: anywhere; user-select: all; }

/* the bar that appears with unsaved changes */
.fa-savebar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(820px, calc(100% - 32px));
  padding: 12px 14px 12px 18px;
  border: 1px solid rgba(79, 220, 255, 0.45);
  border-radius: 14px;
  background: #131b26;
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, 0.85), 0 0 34px -14px rgba(79, 220, 255, 0.7);
  transform: translateX(-50%);
  animation: rui-rise 0.2s ease-out;
}
.fa-savebar > span:first-child { flex: 1; color: var(--muted); font-size: 14px; }
.fa-savebar b { color: var(--text); }
.fa-savebar-btns { display: flex; gap: 8px; }
body.fa-has-savebar .rui-main { padding-bottom: 96px; }
@media (max-width: 640px) {
  .fa-savebar { flex-direction: column; align-items: stretch; }
  .fa-savebar-btns { display: grid; grid-template-columns: 1fr 1fr; }
}
