/* ===========================================================================
   Flayr Community — the inverted part of the site: black, with teal type.
   Everything is scoped to body.community, so the rest of flayrfx.com is
   untouched. The site's own tokens are redefined here, so buttons, inputs,
   cards and the nav and footer all follow without being restyled one by one.
   ======================================================================== */

body.community {
  --bg:        #050708;
  --surface:   #0D1214;
  --surface-2: #131A1D;
  --surface-3: #1B2427;
  --ink:       #58C0B3;          /* headings: the brand teal */
  --text:      #8ED8CE;          /* body: a lighter teal, easy to read on black */
  --muted:     #5FA79D;
  --faint:     #3F756E;
  --teal-ink:  #7FE0D3;          /* links */
  --hairline:  rgba(88, 192, 179, .16);
  --ring:      0 0 0 3px rgba(88, 192, 179, .45);
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .6);
  background: var(--bg); color: var(--text);
  color-scheme: dark;
}
body.community ::selection { background: rgba(88, 192, 179, .45); color: #fff; }
body.community a { color: var(--teal-ink); }

/* nav, dropdown and footer */
body.community .nav { background: rgba(5, 7, 8, .82); box-shadow: inset 0 -1px 0 var(--hairline); }
body.community .nav-links a, body.community .nav-actions a, body.community .nav-actions button { color: var(--ink); }
body.community .nav-actions a:hover, body.community .nav-actions button:hover { background: rgba(88, 192, 179, .1); }
body.community .nav-sub > li > a, body.community .nav-sub a { color: var(--text); }
body.community .nav-sub ul, body.community .nav-sub { --surface: #0D1214; }
body.community .nav.is-open { background: var(--bg); }
body.community .footer { background: #0A0E10; color: var(--muted); }
body.community .footer a { color: var(--text); }
body.community .footer a:hover { color: #fff; }

/* buttons: teal on black */
body.community .btn { --btn-bg: var(--surface-2); --btn-fg: var(--ink); --btn-bg-hover: var(--surface-3); }
/* Filled teal buttons: white text on a deeper teal, so the label stands out. */
body.community .btn-accent, body.community .btn-primary { --btn-bg: #1F8076; --btn-fg: #FFFFFF; --btn-bg-hover: #279488; }
body.community .btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bg-hover: var(--surface-2); }
body.community .eyebrow { color: var(--muted); }
body.community .lead { color: var(--text); }
body.community .hero-title, body.community h1, body.community h2, body.community h3 { color: var(--ink); }
.cm-dim { color: var(--muted); }

/* ------------------------------------------------------------ layout -- */
.cm-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(28px, 4vw, 44px); text-align: center; }
.cm-hero .lead { max-width: 680px; margin-left: auto; margin-right: auto; }
.cm-hero .hero-actions { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.cm-hero-sm { padding-bottom: 12px; }
/* The Top Tens hero: public-domain classic posters (Wikimedia Commons) behind a dark teal wash. */
.cm-hero-posters { position: relative; padding: clamp(80px, 12vw, 150px) 0 clamp(40px, 5vw, 64px); margin-bottom: 36px; overflow: hidden;
  background: linear-gradient(180deg, rgba(5, 7, 8, .55) 0%, rgba(5, 7, 8, .78) 55%, #050708 100%), linear-gradient(90deg, rgba(10, 60, 56, .55), rgba(5, 7, 8, .25) 50%, rgba(10, 60, 56, .55)),
    url('../img/community/hero-posters.jpg') center 30% / cover no-repeat; }
body.community .cm-hero-posters .hero-title { color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, .6); }
body.community .cm-hero-posters .lead { color: #E3F7F4; text-shadow: 0 1px 14px rgba(0, 0, 0, .8); }
body.community .cm-hero-posters .eyebrow { color: #7FE0D3; }
.cm-hero-posters .cm-dim { color: #C9EEE8; }
.cm-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 72px; }
@media (max-width: 900px) { .cm-shell { grid-template-columns: minmax(0, 1fr); } }

.cm-side { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); max-height: calc(100vh - 92px); overflow-y: auto; }
.cm-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.cm-side a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text); font-size: var(--fs-sm); text-decoration: none; }
.cm-side a:hover { background: var(--surface-2); color: var(--ink); }
.cm-side a.is-active { background: rgba(88, 192, 179, .2); color: #fff; font-weight: 600; }
.cm-side a.is-active b { color: #fff; background: rgba(255, 255, 255, .12); }
.cm-side b { font-size: 11px; font-weight: 600; color: var(--muted); min-width: 20px; text-align: center; padding: 0 6px; border-radius: 999px; background: var(--surface-2); }
.cm-side-head { font-weight: 600; color: var(--ink) !important; justify-content: flex-start !important; }
.cm-side-head .icon { width: 17px; height: 17px; }
.cm-side-cta { margin-top: 10px; color: #fff !important; justify-content: center !important; }
@media (max-width: 900px) {
  .cm-side { position: static; max-height: none; }
  .cm-side ul { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .cm-side ul::-webkit-scrollbar { display: none; }
  .cm-side li { flex: none; }
  .cm-side li a { white-space: nowrap; background: var(--surface-2); }
}

.cm-main { min-width: 0; }
.cm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.cm-head h2 { margin: 0; font-size: var(--fs-3); }
.cm-head-lg h1 { font-size: var(--fs-1); margin: 6px 0 8px; letter-spacing: -0.03em; }
.cm-head-lg .lead { margin: 0; }
.cm-by { color: var(--muted); margin: 0 0 8px; }
.cm-empty { padding: 48px 24px; text-align: center; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); }
.cm-note { padding: 12px 16px; border-radius: var(--r); background: rgba(88, 192, 179, .16); color: #fff; margin-bottom: 18px; }
.cm-panel { padding: 24px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); }
.cm-attribution { margin: 40px 0 0; font-size: 12px; color: var(--faint); }
.cm-attribution a { color: var(--muted); }

/* list cards */
.cm-grid { display: grid; gap: 24px 18px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.cm-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); }
.cm-card:hover { text-decoration: none; }
.cm-card-posters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px; margin-bottom: 8px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); transition: box-shadow .2s; }
.cm-card:hover .cm-card-posters { box-shadow: inset 0 0 0 1px rgba(88, 192, 179, .5); }
.cm-card-poster { position: relative; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.cm-card-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-card-poster i { position: absolute; inset: 0; display: grid; place-items: center; padding: 4px; font-size: 10px; font-style: normal; text-align: center; color: var(--muted); }
.cm-card-poster b { position: absolute; left: 4px; bottom: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center; font-size: 10px; background: #050708; color: var(--ink); }
.cm-card-cat { font-size: 12px; color: var(--muted); font-weight: 500; }
.cm-card-title { color: var(--ink); font-size: var(--fs-sm); line-height: 1.3; }
.cm-card-meta { font-size: 12px; color: var(--faint); }

/* one list */
.cm-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cm-item { display: grid; grid-template-columns: 52px 128px minmax(0, 1fr); gap: 20px; align-items: start; padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); }
.cm-rank { font-size: 40px; font-weight: 700; line-height: 1; color: var(--ink); letter-spacing: -0.04em; text-align: center; font-variant-numeric: tabular-nums; }
.cm-item-poster { position: relative; aspect-ratio: 2 / 3; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.cm-item-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-item-poster i, .cm-slot-poster i { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; font-size: 12px; font-style: normal; text-align: center; color: var(--muted); }
.cm-item-text h2 { font-size: var(--fs-4); margin: 2px 0 8px; letter-spacing: -0.02em; }
.cm-item-text h2 span { color: var(--muted); font-weight: 400; }
.cm-item-text p { margin: 0 0 10px; color: var(--text); font-size: var(--fs-sm); line-height: 1.55; }
.cm-item-text blockquote { margin: 0 0 10px; padding-left: 12px; box-shadow: inset 2px 0 0 var(--ink); color: var(--ink); font-size: var(--fs-sm); }
.cm-item-text cite { color: var(--muted); font-style: normal; }
.cm-links { display: flex; gap: 16px; font-size: 13px; }
.cm-links a { display: inline-flex; align-items: center; gap: 3px; }
.cm-links .icon { width: 12px; height: 12px; }
@media (max-width: 640px) {
  .cm-item { grid-template-columns: 34px 90px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .cm-rank { font-size: 26px; }
}
.cm-report { margin-top: 28px; font-size: var(--fs-sm); color: var(--muted); }
.cm-report summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.cm-report summary .icon { width: 14px; height: 14px; }
.cm-report form { margin-top: 12px; max-width: 520px; }

/* profile */
.cm-profile { display: flex; gap: 18px; align-items: center; }
.cm-avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-weight: 700; background: #1F8076; color: #fff; }
.cm-profile h1 { margin: 0 0 4px !important; }

/* your lists */
.cm-me-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.cm-me-cat { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); color: var(--ink); text-decoration: none; }
.cm-me-cat:hover { box-shadow: inset 0 0 0 1px rgba(88, 192, 179, .5); text-decoration: none; }
.cm-me-state { font-size: 12px; color: var(--faint); }
.cm-state-published { color: #7FE0D3; } .cm-state-draft { color: var(--muted); } .cm-state-hidden { color: #F28B82; }
.cm-at { display: flex; align-items: center; gap: 0; }
.cm-at span { padding: 0 8px 0 12px; color: var(--muted); font-weight: 600; }

/* the editor */
.cm-editor { display: grid; gap: 18px; }
.cm-slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cm-slot { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); }
.cm-slot.is-set { grid-template-columns: 48px 70px minmax(0, 1fr) auto; align-items: start; }
.cm-slot .cm-rank { font-size: 28px; padding-top: 6px; }
.cm-slot-poster { position: relative; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.cm-slot-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-slot-body strong { color: var(--ink); }
.cm-slot-body p { margin: 4px 0 8px; font-size: 13px; color: var(--text); line-height: 1.45; }
.cm-note-input { max-width: 520px; }
.cm-slot-acts { display: flex; flex-direction: column; gap: 2px; }
.cm-search { position: relative; }
.cm-search > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.cm-search .input { padding-left: 38px; }
.cm-results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; border-radius: var(--r); background: #0D1214; box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--hairline); max-height: 380px; overflow-y: auto; }
.cm-results li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px; border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs-sm); color: var(--text); }
.cm-results li strong { color: var(--ink); }
.cm-results li small { color: var(--muted); font-size: 12px; }
.cm-results li em { color: var(--faint); font-size: 12px; }
.cm-results li:hover, .cm-results li.is-active { background: var(--surface-3); }
.cm-results li.is-taken { opacity: .5; cursor: default; }
.cm-results .cm-res-none { display: block; cursor: default; color: var(--muted); }
.cm-res-poster { width: 46px; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.cm-res-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-editor-bar { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-lg); background: rgba(13, 18, 20, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--hairline); }
@media (max-width: 640px) {
  .cm-slot.is-set { grid-template-columns: 30px 56px minmax(0, 1fr); }
  .cm-slot.is-set .cm-slot-acts { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
  .cm-slot { grid-template-columns: 30px minmax(0, 1fr); }
  .cm-slot .cm-rank { font-size: 20px; }
}

/* ------------------------------------------------- poster carousel -- */
/* A strip of well-known films gliding along the bottom of the hero. Pure CSS:
   two identical rows slide left by one row's width, so the loop never jumps.
   Hover or keyboard focus pauses it; reduced-motion users get a scrollable row. */
.cm-carousel { position: relative; margin-top: clamp(40px, 6vw, 64px); }
.cm-carousel-label { margin: 0 0 12px; text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #7FE0D3; }
.cm-carousel-track { display: flex; width: max-content; animation: cm-glide 140s linear infinite; }
.cm-carousel:hover .cm-carousel-track, .cm-carousel:focus-within .cm-carousel-track { animation-play-state: paused; }
.cm-carousel::before, .cm-carousel::after { content: ''; position: absolute; top: 0; bottom: 0; width: min(12vw, 140px); z-index: 2; pointer-events: none; }
.cm-carousel::before { left: 0; background: linear-gradient(90deg, #050708, rgba(5, 7, 8, 0)); }
.cm-carousel::after { right: 0; background: linear-gradient(270deg, #050708, rgba(5, 7, 8, 0)); }
.cm-carousel-row { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0 7px; }
.cm-carousel-row a { position: relative; display: block; width: 150px; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(88, 192, 179, .18); transition: transform .3s var(--ease), box-shadow .3s; }
.cm-carousel-row a:hover, .cm-carousel-row a:focus-visible { transform: translateY(-6px) scale(1.04); box-shadow: 0 16px 40px rgba(0, 0, 0, .7), 0 0 0 2px #58C0B3; outline: none; text-decoration: none; }
.cm-carousel-row img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-carousel-row span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 9px 8px; font-size: 12px; font-weight: 600; line-height: 1.25; color: #fff;
  background: linear-gradient(transparent, rgba(5, 7, 8, .92)); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.cm-carousel-row span b { display: block; font-weight: 400; color: #9FE6DC; }
.cm-carousel-row a:hover span, .cm-carousel-row a:focus-visible span { opacity: 1; transform: none; }
@keyframes cm-glide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 640px) { .cm-carousel-row a { width: 112px; } .cm-carousel-track { animation-duration: 110s; } }
@media (prefers-reduced-motion: reduce) {
  .cm-carousel-track { animation: none; width: auto; overflow-x: auto; scrollbar-width: thin; }
  .cm-carousel-row[aria-hidden="true"] { display: none; }
}

/* ------------------------------------------------- join panel ------ */
.cm-join { padding: 8px 0 48px; scroll-margin-top: 70px; }
.cm-join-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(28px, 5vw, 56px);
  border-radius: var(--r-xl); background: radial-gradient(120% 140% at 0% 0%, rgba(31, 128, 118, .55), rgba(13, 18, 20, .95) 55%), #0D1214;
  box-shadow: inset 0 0 0 1px rgba(88, 192, 179, .35), 0 30px 80px rgba(0, 0, 0, .5); }
@media (max-width: 900px) { .cm-join-card { grid-template-columns: minmax(0, 1fr); } }
body.community .cm-join h2 { font-size: var(--fs-1); color: #fff; margin: 8px 0 12px; letter-spacing: -0.03em; line-height: 1.05; }
body.community .cm-join .lead { color: #D6F4EF; margin-bottom: 20px; }
body.community .cm-join .eyebrow { color: #7FE0D3; }
.cm-join-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cm-join-points li { display: flex; gap: 10px; align-items: flex-start; color: #E3F7F4; font-size: var(--fs-sm); }
.cm-join-points .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; color: #58C0B3; }
.cm-join-count { margin: 18px 0 0; color: #7FE0D3; font-weight: 600; }
.cm-join-form { display: grid; gap: 14px; padding: clamp(20px, 3vw, 28px); border-radius: var(--r-lg); background: rgba(5, 7, 8, .75); box-shadow: inset 0 0 0 1px var(--hairline); }
.cm-join-form label { color: #D6F4EF; }
.cm-join-form .check span { font-size: 13px; color: var(--text); line-height: 1.45; }
.cm-join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cm-join-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 480px) { .cm-join-grid { grid-template-columns: 1fr; } }
.cm-join-hi { margin: 0; color: #E3F7F4; }
.cm-join-signin { text-align: center; }
.cm-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------- member profile -- */
/* A full-width banner with the member's picture overlapping its bottom edge. */
.cm-pbanner { position: relative; margin-bottom: 36px; }
.cm-pbanner-img { display: block; width: 100%; height: clamp(170px, 26vw, 340px); object-fit: cover; }
.cm-pbanner::before { content: ""; position: absolute; inset: 0 0 auto; height: clamp(170px, 26vw, 340px); pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 8, .1) 0%, rgba(5, 7, 8, .25) 55%, rgba(5, 7, 8, .92) 100%); }
.cm-pbanner-inner { position: relative; display: flex; align-items: flex-end; gap: 24px; margin-top: calc(clamp(110px, 13vw, 160px) / -2); flex-wrap: wrap; }
.cm-pavatar { flex: none; width: clamp(110px, 13vw, 160px); height: clamp(110px, 13vw, 160px); border-radius: 50%; object-fit: cover;
  background: #0D1214; border: 4px solid #050708; box-shadow: 0 0 0 3px #1F8076, 0 10px 30px rgba(0, 0, 0, .55); }
.cm-pid { flex: 1 1 260px; min-width: 0; padding-bottom: 6px; }
.cm-ptag { display: inline-block; margin-right: 6px; padding: 2px 9px; border-radius: 999px; background: #1F8076; color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; }
body.community .cm-pid h1 { color: #fff; font-size: var(--fs-1); letter-spacing: -0.03em; margin: 4px 0 4px; overflow-wrap: anywhere; }
.cm-pmeta { margin: 0; color: var(--muted); }
.cm-pedit { margin-bottom: 10px; }
.cm-pabout { margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--hairline); }
.cm-pabout .lead { margin: 0 0 12px; max-width: 62ch; }
.cm-pstats { display: flex; gap: 22px; flex-wrap: wrap; margin: 0; color: var(--muted); }
.cm-pstats strong { color: #fff; font-size: 1.15em; margin-right: 4px; }
@media (max-width: 600px) {
  .cm-pbanner-inner { gap: 14px; }
  .cm-pedit { margin-bottom: 0; }
}

/* the owner strip at the top of a list, and the mini avatar on cards */
.cm-owner { display: inline-flex; align-items: center; gap: 12px; margin: 2px 0 12px; padding: 6px 16px 6px 6px; border-radius: 999px;
  background: var(--surface-2); text-decoration: none; transition: background .15s; }
.cm-owner:hover { background: var(--surface-3); }
.cm-owner img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #1F8076; }
.cm-owner span { display: flex; flex-direction: column; line-height: 1.25; }
body.community .cm-owner strong { color: #fff; }
.cm-owner small { color: var(--muted); font-size: 12px; }
.cm-card-meta { display: flex; align-items: center; gap: 7px; }
.cm-card-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; }

/* profile form preview */
.cm-pf-preview { position: relative; border-radius: 12px; overflow: hidden; padding-bottom: 46px; }
.cm-pf-banner { display: block; width: 100%; aspect-ratio: 32 / 9; object-fit: cover; border-radius: 12px; }
.cm-pf-avatar { position: absolute; left: 18px; bottom: 0; width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--surface); box-shadow: 0 0 0 2px #1F8076; background: #0D1214; }
.cm-pf-files { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; }
.cm-pf-files .check { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
