.fk-card {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  border-radius: 2rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  user-select: none;
  position: relative;
  background: var(--bg-surface);
  border: 2px solid var(--border-base);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.fk-bar {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-base);
}

.fk-bar-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-dimmed);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.1s, background 0.15s;
}

.fk-bar-btn:active {
  transform: scale(0.75);
  background: var(--bg-muted);
}

.fk-bar-btn svg {
  width: 1.35rem;
  height: 1.35rem;
  pointer-events: none;
  display: block;
}

.fk-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem 1.5rem;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.fk-team-a {
  background: linear-gradient(180deg, rgba(231,76,60,0.12) 0%, rgba(231,76,60,0.03) 100%);
}

.fk-team-b {
  background: linear-gradient(180deg, rgba(52,152,219,0.12) 0%, rgba(52,152,219,0.03) 100%);
}

.fk-team + .fk-team {
  border-top: 2px solid var(--border-base);
}

.fk-name {
  background: transparent;
  border: none;
  outline: none;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  width: 100%;
  max-width: 12rem;
  border-radius: 0.5rem;
  letter-spacing: 0.03em;
  transition: background 0.15s;
}

.fk-name:focus {
  background: var(--bg-muted);
  color: var(--text-base);
}

.fk-score {
  font-size: 7rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  transition: transform 0.12s;
  text-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.fk-score-a {
  color: #e74c3c;
}

.fk-score-b {
  color: #3498db;
}

.fk-score-boom {
  animation: fk-goal-boom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fk-goal-boom {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  25% {
    transform: scale(1.6);
    filter: brightness(1.4);
  }
  50% {
    transform: scale(0.9);
    filter: brightness(1);
  }
  75% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.fk-score-rise {
  animation: fk-goal-rise 1.4s ease-out;
}

@keyframes fk-goal-rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  30% {
    transform: translateY(-4rem) scale(1.3);
    opacity: 1;
  }
  50% {
    transform: translateY(-4rem) scale(1.3);
    opacity: 0.6;
  }
  70% {
    transform: translateY(0.5rem) scale(1.1);
    opacity: 1;
  }
  85% {
    transform: translateY(-0.3rem) scale(1);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.fk-score-ball {
  animation: fk-goal-ball 1.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

@keyframes fk-goal-ball {
  0% {
    transform: translateY(-8rem) scale(0.6);
    opacity: 0;
  }
  20% {
    transform: translateY(0.5rem) scale(1.15);
    opacity: 1;
  }
  35% {
    transform: translateY(-4rem) scale(1.1);
  }
  50% {
    transform: translateY(0.3rem) scale(1.05);
  }
  65% {
    transform: translateY(-1.5rem) scale(1.02);
  }
  80% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.fk-score-glow {
  animation: fk-goal-glow 2s ease-in-out;
}

@keyframes fk-goal-glow {
  0% {
    transform: scale(1);
    text-shadow: 0 0 0 transparent;
    color: inherit;
  }
  20% {
    transform: scale(1.2);
    text-shadow: 0 0 20px currentcolor, 0 0 40px currentcolor;
  }
  40% {
    transform: scale(1.3);
    text-shadow: 0 0 30px currentcolor, 0 0 60px currentcolor;
    color: #f1c40f;
  }
  60% {
    transform: scale(1.2);
    text-shadow: 0 0 20px currentcolor, 0 0 40px currentcolor;
    color: #f1c40f;
  }
  80% {
    transform: scale(1.05);
    text-shadow: 0 0 10px currentcolor;
  }
  100% {
    transform: scale(1);
    text-shadow: 0 0 0 transparent;
    color: inherit;
  }
}

.fk-score-quake {
  animation: fk-goal-quake 0.7s ease-out;
}

@keyframes fk-goal-quake {
  0% {
    transform: translateX(0) rotate(0deg) scale(1);
  }
  8% {
    transform: translateX(-14px) rotate(-4deg) scale(1.1);
  }
  18% {
    transform: translateX(14px) rotate(4deg) scale(1.2);
  }
  28% {
    transform: translateX(-10px) rotate(-3deg) scale(1.15);
  }
  38% {
    transform: translateX(10px) rotate(3deg) scale(1.1);
  }
  50% {
    transform: translateX(-6px) rotate(-1.5deg) scale(1.05);
  }
  62% {
    transform: translateX(6px) rotate(1.5deg) scale(1.02);
  }
  76% {
    transform: translateX(-3px) rotate(0deg) scale(1);
  }
  88% {
    transform: translateX(2px);
  }
  100% {
    transform: translateX(0);
  }
}

.fk-score-wave {
  animation: fk-goal-wave 1.2s ease-in-out;
}

@keyframes fk-goal-wave {
  0% {
    transform: scaleY(1) scaleX(1);
  }
  15% {
    transform: scaleY(1.5) scaleX(0.8);
  }
  30% {
    transform: scaleY(0.7) scaleX(1.3);
  }
  45% {
    transform: scaleY(1.3) scaleX(0.85);
  }
  60% {
    transform: scaleY(0.85) scaleX(1.15);
  }
  75% {
    transform: scaleY(1.1) scaleX(0.95);
  }
  90% {
    transform: scaleY(0.98) scaleX(1.02);
  }
  100% {
    transform: scaleY(1) scaleX(1);
  }
}

.fk-score-warp {
  animation: fk-goal-warp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fk-goal-warp {
  0% {
    transform: scaleX(0.3) scaleY(1.5);
    opacity: 0;
    filter: blur(4px);
  }
  30% {
    transform: scaleX(1.3) scaleY(0.9);
    opacity: 1;
    filter: blur(0);
  }
  55% {
    transform: scaleX(0.9) scaleY(1.1);
  }
  75% {
    transform: scaleX(1.05) scaleY(0.98);
  }
  100% {
    transform: scaleX(1) scaleY(1);
  }
}

.fk-score-breath {
  animation: fk-goal-breath 1.8s ease-in-out;
}

@keyframes fk-goal-breath {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  25% {
    transform: scale(1.4);
    opacity: 0.4;
  }
  50% {
    transform: scale(0.85);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.15);
    opacity: 1;
  }
  85% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

.fk-team-terremoto {
  animation: fk-team-terremoto 0.6s ease-out;
}

@keyframes fk-team-terremoto {
  0% {
    transform: translateX(0);
  }
  12% {
    transform: translateX(-10px) rotate(-0.8deg);
  }
  25% {
    transform: translateX(10px) rotate(0.8deg);
  }
  40% {
    transform: translateX(-7px) rotate(-0.5deg);
  }
  55% {
    transform: translateX(7px) rotate(0.5deg);
  }
  70% {
    transform: translateX(-4px);
  }
  85% {
    transform: translateX(4px);
  }
  100% {
    transform: translateX(0);
  }
}

.fk-team-elevate {
  animation: fk-team-elevate 0.8s ease-out;
}

@keyframes fk-team-elevate {
  0% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-12px);
  }
  70% {
    transform: translateY(3px);
  }
  90% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}

.fk-team-flash {
  animation: fk-team-flash 0.9s ease-out;
}

@keyframes fk-team-flash {
  0% {
    background: transparent;
  }
  30% {
    background: rgba(255,255,255,0.12);
  }
  60% {
    background: rgba(255,255,255,0.05);
  }
  100% {
    background: transparent;
  }
}

.fk-btn-plus {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 2.8rem;
  font-weight: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.1s, box-shadow 0.15s;
  color: #fff;
  line-height: 1;
  margin: 0.25rem 0;
}

.fk-btn-plus-a {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  box-shadow: 0 8px 24px rgba(231,76,60,0.35);
}

.fk-btn-plus-b {
  background: linear-gradient(135deg, #3498db, #2980b9);
  box-shadow: 0 8px 24px rgba(52,152,219,0.35);
}

.fk-btn-plus:active {
  transform: scale(0.82);
}

.fk-btn-plus-pop {
  animation: fk-btn-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fk-btn-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.fk-btn-minus {
  background: none;
  border: none;
  cursor: pointer;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.1s, background 0.15s, color 0.15s;
  opacity: 0.5;
}

.fk-btn-minus-a {
  color: #e74c3c;
}

.fk-btn-minus-b {
  color: #3498db;
}

.fk-btn-minus:active {
  transform: scale(0.75);
  opacity: 1;
}

.fk-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.fk-p {
  position: absolute;
  font-weight: 900;
  font-size: 1.4rem;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
  animation: fk-float 0.9s ease-out forwards;
}

.fk-p-a {
  color: #e74c3c;
}

.fk-p-b {
  color: #3498db;
}

@keyframes fk-float {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
  40% {
    transform: translateY(-2.5rem) scale(1.5) rotate(15deg);
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-4.5rem) scale(0.4) rotate(30deg);
  }
}

.fk-goal-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.08s;
}

.fk-goal-flash-on {
  opacity: 0.2;
}

.fk-goal-flash-a {
  background: #e74c3c;
}

.fk-goal-flash-b {
  background: #3498db;
}

.fk-goal-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 3rem;
  font-weight: 900;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  white-space: nowrap;
  color: #fff;
}

.fk-goal-text-a {
  color: #e74c3c;
}

.fk-goal-text-b {
  color: #3498db;
}

.fk-goal-text-show {
  animation: fk-goal-text 1s ease-out forwards;
}

@keyframes fk-goal-text {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.8);
  }
}

.fk-finish-wrap {
  display: flex;
  justify-content: center;
  padding: 1rem;
  border-top: 1px solid var(--border-base);
  background: var(--bg-surface);
}

.fk-btn-finish {
  border: none;
  cursor: pointer;
  padding: 0.75rem 2.5rem;
  border-radius: 1rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.1s, box-shadow 0.15s;
  color: #fff;
  background: linear-gradient(135deg, #f1c40f, #f39c12);
  box-shadow: 0 4px 16px rgba(241,196,15,0.3);
}

.fk-btn-finish:active {
  transform: scale(0.88);
}

.fk-winner {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.fk-winner-on {
  opacity: 1;
  pointer-events: auto;
}

.fk-winner-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
}

.fk-winner-box {
  position: relative;
  background: var(--bg-surface);
  border-radius: 2rem;
  padding: 2.5rem 3.5rem;
  text-align: center;
  z-index: 1;
  border: 3px solid #f1c40f;
  animation: fk-win-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 60px rgba(241,196,15,0.2);
}

@keyframes fk-win-pop {
  0% {
    transform: scale(0.2);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.fk-winner-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dimmed);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.1s;
}

.fk-winner-close:active {
  transform: scale(0.8);
}

.fk-winner-trophy {
  color: #f1c40f;
  margin-bottom: 0.5rem;
  animation: fk-float-trophy 1.2s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 12px rgba(241,196,15,0.4));
}

@keyframes fk-float-trophy {
  0% {
    transform: translateY(0) rotate(-5deg);
  }
  100% {
    transform: translateY(-8px) rotate(5deg);
  }
}

.fk-winner-label {
  font-size: 0.8rem;
  color: var(--text-dimmed);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.fk-winner-team {
  font-size: 2.2rem;
  font-weight: 900;
  margin: 0.25rem 0;
  color: var(--text-base);
}

.fk-winner-score {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-muted);
}

.fk-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 101;
  overflow: hidden;
}

.fk-c {
  position: absolute;
  animation: fk-c-fall linear forwards;
}

@keyframes fk-c-fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

.fk-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.fk-modal-on {
  opacity: 1;
  pointer-events: auto;
}

.fk-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.fk-modal-box {
  position: relative;
  background: var(--bg-surface);
  border-radius: 1.25rem;
  padding: 1.75rem;
  max-width: 18rem;
  width: 90%;
  text-align: center;
  z-index: 1;
  border: 1px solid var(--border-base);
  animation: fk-scale-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fk-scale-in {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.fk-modal-text {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text-base);
  font-weight: 600;
}

.fk-modal-btns {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.fk-modal-btn {
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
  transition: transform 0.1s;
}

.fk-modal-btn:active {
  transform: scale(0.9);
}

.fk-modal-btn-cancel {
  background: var(--bg-muted);
  color: var(--text-base);
}

.fk-modal-btn-reset {
  background: #ef4444;
  color: #fff;
}
