.ff {
  --ff-panel-w: 360px;
}
.ff__layout {
  display: grid;
  gap: var(--space-8);
  align-items: start;
  grid-template-columns: minmax(0, 1fr) var(--ff-panel-w);
}
@media (max-width: 1100px) {
  .ff__layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}
@media (max-width: 940px) {
  .ff__layout {
    grid-template-columns: 1fr;
  }
}

.ff__meta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
.ff__pill {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  box-shadow: var(--shadow-sm);
}
.ff__pillLabel {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.ff__pillValue {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ff__toolbar {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  margin: 0 0 var(--space-4);
  flex-wrap: wrap;
}
.ff__hint {
  min-height: 22px;
  color: var(--color-danger);
  font-weight: 600;
  font-size: 0.9rem;
}
.ff__hint.is-ok {
  color: var(--color-success);
}
.ff__showAll {
  display: none;
}
@media (max-width: 566px) {
  .ff__showAll {
    display: inline-flex;
  }
}

.ff__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  transition: all 0.3s ease;
}
@media (max-width: 1200px) {
  .ff__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 991px) {
  .ff__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 475px) {
  .ff__grid {
    grid-template-columns: 1fr;
  }
}

.ff__card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: linear-gradient(
    180deg,
    var(--color-bg) 0%,
    var(--color-bg-soft) 140%
  );
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.ff__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
}
.ff__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(37, 99, 235, 0.18);
  background: var(--color-bg);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.ff__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ff__pos {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ff__name {
  font-weight: 800;
  letter-spacing: -0.01em;
}
.ff__club {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.ff__price {
  margin-top: 2px;
  color: var(--color-text);
  font-weight: 800;
}
.ff__add {
  margin-top: auto;
  width: 100%;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    transform var(--transition),
    background var(--transition),
    opacity var(--transition);
}
.ff__add:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}
.ff__add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.ff__card.is-hidden {
  opacity: 0;
  transform: scale(0.98);
}

.ff__right {
  position: sticky;
  top: calc(var(--header-h) + var(--space-6));
}
@media (max-width: 940px) {
  .ff__right {
    position: relative;
    top: auto;
  }
}
.ff__panel {
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.ff__panelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5);
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(90deg, #0f172a 0%, #111827 60%, #0f172a 100%);
  color: #fff;
}
.ff__panelTitle {
  font-weight: 900;
  letter-spacing: -0.01em;
}
.ff__clear {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  transition:
    background var(--transition),
    transform var(--transition);
}
.ff__clear:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.ff__panelBody {
  padding: var(--space-4);
}
.ff__empty {
  padding: var(--space-6);
  text-align: center;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
}
.ff__teamList {
  display: flex;
  flex-direction: column;
  margin-top: 0;
}
.ff__teamRow {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 6px;
  border-bottom: 1px solid var(--color-border);
}
.ff__teamRow:last-child {
  border-bottom: none;
}
.ff__mini {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}
.ff__mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ff__teamMain {
  min-width: 0;
  flex: 1;
}
.ff__teamName {
  font-weight: 900;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
}
.ff__teamName {
  text-transform: uppercase;
}
.ff__teamSub {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  /* white-space: nowrap; */
  overflow: hidden;
  text-overflow: ellipsis;
}
.ff__remove {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  border: 1px solid var(--color-border);
  background: var(--color-bg-soft);
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}
.ff__remove:hover {
  transform: translateY(-1px);
  border-color: var(--color-border-strong);
  background: var(--color-bg);
}

.ff__panelFooter {
  padding: var(--space-5);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-soft);
}
.ff__play {
  width: 100%;
  pointer-events: none;
  opacity: 0.5;
}
.ff__play.is-ready {
  pointer-events: auto;
  opacity: 1;
}
.ff__footnote {
  margin-top: 10px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-align: center;
}

@keyframes ffFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes ffFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}
.ff__teamRow.is-enter {
  animation: ffFadeIn 0.28s ease both;
}
.ff__teamRow.is-exit {
  animation: ffFadeOut 0.22s ease both;
}

.ff-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 5000;
}
.ff-modal.is-open {
  display: block;
}
.ff-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ff-modal__dialog {
  position: relative;
  max-width: 520px;
  margin: 12vh auto 0;
  background: var(--color-bg);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  transform: scale(0.95);
  opacity: 0;
  transition:
    opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ff-modal.is-open .ff-modal__overlay {
  opacity: 1;
}
.ff-modal.is-open .ff-modal__dialog {
  opacity: 1;
  transform: scale(1);
}
.ff-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}
.ff-modal__title {
  margin: 0 0 10px;
}
.ff-modal__text {
  color: var(--color-text-muted);
  margin: 0;
}
