/* ===================== ELDCRAFT: yangiliklar, Eld TV, jamoa ===================== */
.ftools { display: flex; justify-content: center; gap: 10px; margin: -10px 0 22px; min-height: 0; }
.ftools:empty { display: none; }
.more-wrap { display: flex; justify-content: center; margin-top: 26px; }
.more-wrap .btn[hidden] { display: none; }
.small { font-size: 13px; }
.danger { color: #ff8a95 !important; border-color: rgba(255, 71, 87, .4) !important; }
.face { border-radius: 8px; image-rendering: pixelated; flex: none; background: rgba(255, 255, 255, .05); }
.rbadge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-left: 6px; border-radius: 99px; font-size: 11px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); vertical-align: middle; }
.stats-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 12px; }
.stats-row b { color: var(--text); font-weight: 600; }
.rsum { margin-left: auto; color: var(--text); }
.skel { height: 300px; border-radius: var(--r); background: linear-gradient(100deg, rgba(255,255,255,.03) 30%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.03) 70%);
  background-size: 300% 100%; animation: skel 1.4s infinite linear; border: 1px solid var(--line); }
@keyframes skel { to { background-position: -150% 0; } }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }

/* ---------- news ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 22px; }
.ncard { position: relative; display: flex; flex-direction: column; border-radius: var(--r); background: var(--card); border: 1px solid var(--line);
  overflow: hidden; cursor: pointer; transition: transform .3s, border-color .3s, box-shadow .3s; outline: none; }
.ncard:hover, .ncard:focus-visible { transform: translateY(-6px); border-color: var(--line2); box-shadow: 0 30px 60px -30px rgba(139, 77, 255, .5); }
.ncard.pinned { border-color: rgba(255, 210, 74, .45); box-shadow: 0 0 0 1px rgba(255, 210, 74, .2), 0 20px 50px -25px rgba(255, 170, 0, .4); }
.nmedia { position: relative; aspect-ratio: 16 / 9; background: #0a0716; overflow: hidden; }
.nmedia img, .nmedia video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.ncard:hover .nmedia img, .ncard:hover .nmedia video { transform: scale(1.05); }
.vbadge { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(0, 0, 0, .6); font-size: 12px; font-weight: 700; backdrop-filter: blur(4px); }
.nbody { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.nbody h3 { font-family: var(--font-d); font-size: 18px; line-height: 1.3; margin: 8px 0; }
.nbody > .muted { font-size: 14.5px; flex: 1; }
.ncard.nomedia .nbody { padding-top: 24px; }
.ncard.nomedia::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--grad); }
.nmeta { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); }
.pin { color: var(--gold); font-weight: 700; }

/* ---------- Eld TV ---------- */
#eldtv { position: relative; }
#eldtv::before { content: ""; position: absolute; inset: 40px -40px; border-radius: 40px; z-index: -1;
  background: radial-gradient(600px 300px at 50% 0, rgba(255, 71, 87, .12), transparent 70%); }
.tvk { color: #ff6b81 !important; background: rgba(255, 71, 87, .08) !important; border-color: rgba(255, 71, 87, .3) !important; }
.rec { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff4757; margin-right: 8px; vertical-align: 1px; animation: rec 1.2s infinite; }
@keyframes rec { 50% { opacity: .25; } }
.tvhint { text-align: center; margin: -8px 0 20px; }
.tvhint[hidden] { display: none; }
.tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.tvcard { cursor: pointer; outline: none; }
.tvmedia { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #0a0716; border: 1px solid var(--line);
  transition: transform .3s, box-shadow .3s, border-color .3s; }
.tvcard:hover .tvmedia, .tvcard:focus-visible .tvmedia { transform: translateY(-5px) scale(1.02); border-color: rgba(255, 71, 87, .5); box-shadow: 0 25px 50px -25px rgba(255, 71, 87, .6); }
.tvmedia video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tvplay { position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; padding-left: 4px;
  background: rgba(255, 71, 87, .85); box-shadow: 0 10px 30px -5px rgba(255, 71, 87, .8); opacity: 0; transform: scale(.7); transition: .25s; }
.tvcard:hover .tvplay { opacity: 1; transform: none; }
.tvlive { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 900; letter-spacing: .08em;
  background: #ff4757; color: #fff; box-shadow: 0 4px 14px -4px #ff4757; }
.tvlive.inline { position: static; }
.tvinfo { display: flex; gap: 12px; padding: 12px 4px 0; }
.tvinfo h3 { font-size: 15.5px; line-height: 1.35; margin-bottom: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tvinfo .stats-row { margin-top: 6px; gap: 12px; }
.tvinfo .rsum { margin-left: 0; }

/* ---------- team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 20px; }
.tcard { position: relative; padding: 30px 20px 24px; border-radius: var(--r); text-align: center; background: var(--card); border: 1px solid var(--line);
  overflow: hidden; transition: transform .3s, border-color .3s; }
.tcard:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.tglow { position: absolute; inset: -40% -20% auto; height: 200px; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 35%, transparent), transparent); opacity: .6; pointer-events: none; }
.thead { position: relative; width: 96px; height: 96px; image-rendering: pixelated; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .55)); transition: transform .4s; }
.tcard:hover .thead { transform: translateY(-4px) rotate(-4deg) scale(1.05); }
.tcard h3 { position: relative; font-family: var(--font-d); font-size: 18px; margin: 14px 0 8px; word-break: break-word; }
.trole { position: relative; display: inline-block; padding: 5px 14px; border-radius: 99px; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.tduty { position: relative; color: var(--muted); font-size: 14px; margin-top: 14px; }
.tadmin { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.tadmin button { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(0, 0, 0, .35); color: var(--text); }
.tadmin button:hover { border-color: var(--cyan); }

/* ---------- post modal ---------- */
.post-modal .modal-box { width: min(760px, 100%); padding: 24px; }
.post-modal.tvmode .modal-box { width: min(1180px, 100%); }
.pgrid { display: grid; gap: 22px; }
.post-modal.tvmode .pgrid { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); }
.pmedia { margin: 26px -24px 18px; background: #000; }
.post-modal .pmedia { margin-top: 30px; }
.post-modal.tvmode .pmedia { margin: 30px 0 18px; border-radius: 16px; overflow: hidden; }
.pmedia img, .pmedia video { width: 100%; max-height: 70vh; object-fit: contain; display: block; background: #000; }
.pmeta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 8px; }
.ptitle { font-family: var(--font-d); font-size: clamp(20px, 3vw, 28px); line-height: 1.25; margin: 10px 50px 10px 0; }
.pauthor { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 14px; }
.ptext { font-size: 15.5px; line-height: 1.7; color: #dcd6f5; word-wrap: break-word; }
.ptext a, .cm a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.reacts { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 6px; }
.rbtn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line2);
  background: rgba(255, 255, 255, .03); color: var(--text); font-size: 18px; transition: .2s; }
.rbtn b { font-size: 13px; font-weight: 700; color: var(--muted); }
.rbtn:hover { transform: translateY(-2px) scale(1.05); border-color: var(--violet); }
.rbtn.on { background: rgba(180, 107, 255, .22); border-color: var(--violet); box-shadow: 0 6px 20px -8px var(--violet); }
.rbtn.on b { color: var(--text); }
.rbtn:active span { transform: scale(1.4); }
.rbtn span { display: inline-block; transition: transform .2s; }
.padmin { margin-top: 16px; }
.pside { border-top: 1px solid var(--line); padding-top: 18px; }
.post-modal.tvmode .pside { border-top: 0; padding-top: 30px; display: flex; flex-direction: column; max-height: calc(100vh - 110px); }
.post-modal.tvmode .clist { overflow-y: auto; flex: 1; }
.cform { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.cform textarea, .eform textarea, .tform textarea { width: 100%; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1.5px solid var(--line2);
  color: var(--text); font: inherit; font-size: 15px; resize: vertical; outline: none; transition: .2s; }
.cform textarea:focus, .eform textarea:focus, .tform textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(107, 243, 255, .12); }
.cform .btn { flex: none; }
.clist { display: flex; flex-direction: column; gap: 14px; }
.cm { display: flex; gap: 10px; animation: cmIn .35s ease; }
@keyframes cmIn { from { opacity: 0; transform: translateY(-8px); } }
.cmb { flex: 1; min-width: 0; }
.cmh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.cmh .rbadge { margin-left: 0; }
.cm p { font-size: 14.5px; color: #dcd6f5; word-wrap: break-word; margin-top: 2px; }
.cdel { margin-left: auto; width: 26px; height: 26px; border-radius: 8px; color: var(--muted); border: 1px solid transparent; }
.cdel:hover { color: #ff8a95; border-color: rgba(255, 71, 87, .4); }

/* ---------- editor ---------- */
.editor-modal .modal-box { width: min(620px, 100%); }
.drop { display: block; cursor: pointer; border-radius: 16px; border: 2px dashed var(--line2); background: rgba(255, 255, 255, .02); transition: .2s; overflow: hidden; }
.drop:hover, .drop.over { border-color: var(--cyan); background: rgba(107, 243, 255, .05); }
.dprev { min-height: 120px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.dprev > span { padding: 30px 14px; }
.dprev img, .dprev video { width: 100%; max-height: 280px; object-fit: contain; display: block; background: #000; }
.dprev small { display: block; padding: 8px; font-size: 12.5px; }
.prog { position: relative; height: 26px; border-radius: 10px; margin-top: 10px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.prog i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--grad); transition: width .2s; }
.prog span { position: relative; display: block; text-align: center; font-size: 12.5px; line-height: 26px; font-weight: 700; }
.drop + .btn { margin-top: 10px; }

/* ---------- team editor / roles ---------- */
.tprev { display: flex; justify-content: center; margin: -6px 0 14px; }
.tprev img { width: 72px; height: 72px; image-rendering: pixelated; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 34px; height: 34px; border-radius: 10px; background: var(--c); border: 2px solid transparent; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25); transition: .15s; }
.sw.on { border-color: #fff; transform: scale(1.12); }
.field input[type=number] { width: 140px; }
#profExtra { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: -6px 0 16px; padding: 10px 14px;
  border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
#profExtra:empty { display: none; }
.prof-role { font-size: 14px; color: var(--muted); }
.roles-modal .modal-box { width: min(560px, 100%); }
.rlist { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.ruser { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.ruser .rbadge { margin-left: 0; }
.ruser select, .ruser > .muted { margin-left: auto; }
.ruser select { padding: 8px 10px; border-radius: 10px; background: #1a1233; color: var(--text); border: 1px solid var(--line2); font: inherit; font-size: 14px; }

/* ---------- nav with more links ---------- */
.links a { white-space: nowrap; }
.links a.tvlink { color: #ff8a95; }
.links a.tvlink::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff4757; margin-right: 6px; vertical-align: 1px; animation: rec 1.2s infinite; }
@media (max-width: 1400px) and (min-width: 921px) {
  .links a { padding: 8px 8px; font-size: 13.5px; }
  .ip-mini b { display: none; }
}
@media (max-width: 1100px) and (min-width: 921px) {
  .links a[href="#join"] { display: none; }
}
@media (max-width: 900px) {
  .post-modal.tvmode .pgrid { grid-template-columns: 1fr; }
  .post-modal.tvmode .pside { max-height: none; padding-top: 0; }
}
@media (max-width: 640px) {
  .post-modal .modal-box { padding: 18px; }
  .pmedia { margin: 26px -18px 16px; }
  .cform { flex-direction: column; align-items: stretch; }
  .rbtn { height: 36px; padding: 0 11px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .rec, .links a.tvlink::before, .skel { animation: none; }
}
