.fr-game {
  padding: 7rem 1.5rem 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.fr-game-wide { width: 100%; max-width: 1200px; }
.fr-game-container { width: 100%; }

.fr-game-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.fr-game-head h1 {
  font-family: var(--font-display); font-weight: 800; font-size: 1.8rem;
  color: var(--white); margin: 0;
}
.fr-game-head p {
  font-family: var(--font-body); font-size: .85rem;
  color: rgba(244,247,242,.5); margin: 4px 0 0;
}

.fr-game-streak {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px;
  background: rgba(240,169,58,.1); border: 1px solid rgba(240,169,58,.25);
  color: var(--yellow); font-family: var(--font-data); font-weight: 700; font-size: .85rem;
}

.fr-game-score-wrap { text-align: center; margin-bottom: 1.5rem; }
.fr-game-score-label {
  display: block; font-family: var(--font-body); font-size: .75rem;
  color: rgba(244,247,242,.4); margin-bottom: 4px;
}
.fr-game-score {
  font-family: var(--font-data); font-weight: 800; font-size: 2.6rem;
  color: var(--yellow); transition: color .2s ease;
}
.fr-game-score.is-hit { color: var(--red); }

.fr-game-name {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
  margin: 0 0 1.75rem;
  min-height: 60px;
}
.fr-game-word { display: flex; gap: 6px; }
.fr-game-box {
  width: 38px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 3px solid rgba(244,247,242,.2);
  font-family: var(--font-data); font-weight: 800; font-size: 1.3rem;
  color: var(--white);
  transition: border-color .3s ease, color .3s ease;
}


@keyframes frWave {
  0%, 100% { transform: translateY(0); }
  30%      { transform: translateY(-14px); }
}
.fr-game-box.is-waving {
  animation: frWave .5s ease;
}
@keyframes frReveal {
  0%   { transform: translateY(-14px) scale(1.3); color: #fff; }
  100% { transform: translateY(0) scale(1); }
}
.fr-game-box.is-revealing {
  animation: frReveal .45s ease;
}

.fr-game-box.is-open {
  border-color: var(--green);
  color: var(--green);
}


.fr-game-result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

.fr-game-result::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 50%, currentColor 0%, transparent 60%);
  opacity: .06;
  pointer-events: none;
}

.fr-game-result.is-win {
  background: linear-gradient(135deg, rgba(46,189,107,.12), rgba(46,189,107,.04));
  border: 1px solid rgba(46,189,107,.35);
  color: var(--green);
}
.fr-game-result.is-lose {
  background: linear-gradient(135deg, rgba(229,72,77,.1), rgba(229,72,77,.03));
  border: 1px solid rgba(229,72,77,.3);
  color: var(--red);
}

.fr-game-result-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.fr-game-result-icon iconify-icon {
  font-size: 24px;
}

.fr-game-result.is-win .fr-game-result-icon {
  background: var(--green);
}
.fr-game-result.is-win .fr-game-result-icon iconify-icon {
  color: var(--white);
}

.fr-game-result.is-lose .fr-game-result-icon {
  background: var(--red);
}
.fr-game-result.is-lose .fr-game-result-icon iconify-icon {
  color: var(--white);
}

.fr-game-result-body { position: relative; z-index: 1; }

.fr-game-result strong {
  display: block;
  font-family: var(--font-display); font-weight: 800; font-size: 1rem;
  color: var(--white);
}
.fr-game-result span {
  font-family: var(--font-body); font-size: .85rem;
  color: rgba(244,247,242,.6);
}

.fr-game-keyboard { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.fr-kb-row { display: flex; gap: 5px; }
.fr-kb-key {
  min-width: 40px; height: 48px; padding: 0 10px;
  border-radius: 8px; border: 1px solid rgba(244,247,242,.1);
  background: rgba(244,247,242,.06); color: var(--white);
  font-family: var(--font-data); font-weight: 700; font-size: .95rem;
  cursor: pointer; transition: all .12s ease;
}
.fr-kb-key:hover:not(:disabled) { background: rgba(240,169,58,.15); border-color: rgba(240,169,58,.35); }
.fr-kb-key:disabled { cursor: not-allowed; opacity: .35; }
.fr-kb-key.is-correct { background: rgba(46,189,107,.25); border-color: var(--green); color: var(--green); opacity: 1; }
.fr-kb-key.is-wrong { background: rgba(229,72,77,.15); border-color: rgba(229,72,77,.3); color: var(--red); opacity: 1; }


.fr-wp-search { position: relative; margin-bottom: 1.5rem; }
.fr-wp-search > iconify-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: rgba(244,247,242,.4); font-size: 1.1rem; z-index: 1;
}
.fr-wp-search input {
  width: 100%; padding: 14px 14px 14px 42px;
  background: rgba(244,247,242,.04);
  border: 1px solid rgba(244,247,242,.1);
  border-radius: 12px;
  color: var(--white); font-family: var(--font-body); font-size: .9rem;
  outline: none;
}
.fr-wp-search input:focus { border-color: rgba(240,169,58,.4); }

.fr-wp-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  background: #16211c;
  border: 1px solid rgba(244,247,242,.1);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  overflow: hidden;
  max-height: 320px; overflow-y: auto;
}
.fr-wp-results[hidden] { display: none; }

.fr-wp-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(244,247,242,.04);
  transition: background .12s ease;
}
.fr-wp-result-item:last-child { border-bottom: none; }
.fr-wp-result-item:hover { background: rgba(240,169,58,.08); }

.fr-wp-result-photo {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; object-position: top center;
  background: rgba(244,247,242,.06);
}
.fr-wp-result-info { flex: 1; min-width: 0; }
.fr-wp-result-name {
  display: block; font-family: var(--font-body); font-weight: 600; font-size: .85rem;
  color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fr-wp-result-team {
  display: block; font-family: var(--font-body); font-size: .72rem;
  color: rgba(244,247,242,.45);
}
.fr-wp-result-pos {
  flex-shrink: 0; padding: 3px 8px; border-radius: 6px;
  background: rgba(244,247,242,.08);
  font-family: var(--font-data); font-weight: 700; font-size: .65rem;
  color: rgba(244,247,242,.6);
}

.fr-wp-head-row, .fr-wp-row {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr 1.3fr 0.6fr 0.5fr 0.5fr;
  gap: 4px;
  align-items: center;
}

.fr-wp-head-row {
  padding: 0 4px 8px;
  font-family: var(--font-data); font-size: .65rem;
  letter-spacing: .06em; text-transform: uppercase;
  color: rgba(244,247,242,.35);
  border-bottom: 1px solid rgba(244,247,242,.08);
  margin-bottom: 8px;
}
.fr-wp-col { text-align: center; }
.fr-wp-col-player { display: flex; align-items: center; gap: 8px; }
.fr-wp-col-player img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; object-position: top center; }

.fr-wp-guesses { display: flex; flex-direction: column; gap: 6px; }

.fr-wp-row {
  padding: 10px 4px;
  border-radius: 10px;
  animation: frWpRowIn .25s ease;
}
@keyframes frWpRowIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fr-wp-row .fr-wp-col-player {
  font-family: var(--font-body); font-weight: 600; font-size: .82rem; color: var(--white);
}

.fr-wp-cell {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding:  8px 4px; border-radius: 8px;
  font-family: var(--font-data); font-weight: 700; font-size: .72rem;
  color: rgba(244,247,242,.55);
  background: rgba(244,247,242,.04);
  opacity: 0; transform: scale(.9);
  animation: frWpCellIn .35s ease forwards;
}
.fr-wp-cell.is-match { background: rgba(84, 197, 84, 0.574); color: var(--white) }
.fr-wp-cell.is-miss  { background: rgba(229, 72, 77, 0.4); color: white }
.fr-wp-cell iconify-icon { font-size: 13px; }
.fr-wp-mini-logo { width: 16px; height: 16px; object-fit: contain; }

@keyframes frWpCellIn {
  from { opacity: 0; transform: scale(.85) rotateY(90deg); }
  to   { opacity: 1; transform: scale(1) rotateY(0); }
}

.fr-wp-row.is-new .fr-wp-cell:nth-child(2) { animation-delay: .05s; }
.fr-wp-row.is-new .fr-wp-cell:nth-child(3) { animation-delay: .15s; }
.fr-wp-row.is-new .fr-wp-cell:nth-child(4) { animation-delay: .25s; }
.fr-wp-row.is-new .fr-wp-cell:nth-child(5) { animation-delay: .35s; }
.fr-wp-row.is-new .fr-wp-cell:nth-child(6) { animation-delay: .45s; }

.fr-howto {
  background: rgba(244,247,242,.03);
  border: 1px solid rgba(244,247,242,.08);
  border-radius: 16px;
  padding: 1.75rem;
  height: 100%;
  max-height: 520px;
}

.fr-howto-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  background: rgba(240,169,58,.12); border: 1px solid rgba(240,169,58,.3);
  color: var(--yellow); font-family: var(--font-data); font-weight: 800; font-size: .7rem;
  letter-spacing: .05em; margin-bottom: 1rem;
}

.fr-howto h2 {
  font-family: var(--font-display); font-weight: 800; font-size: 1.4rem;
  color: var(--white); margin: 0 0 8px;
}
.fr-howto-sub {
  font-family: var(--font-body); font-size: .85rem; line-height: 1.5;
  color: rgba(244,247,242,.5); margin: 0 0 1.5rem;
}

.fr-howto-steps { display: flex; flex-direction: column; gap: 1.25rem; }
.fr-howto-step { display: flex; gap: 14px; }
.fr-howto-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(240,169,58,.12); border: 1px solid rgba(240,169,58,.3);
  color: var(--yellow); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-data); font-weight: 800; font-size: .85rem;
}
.fr-howto-step strong {
  display: block; font-family: var(--font-display); color: var(--white);
  font-size: .95rem; margin-bottom: 4px;
}
.fr-howto-step p {
  font-family: var(--font-body); font-size: .82rem; line-height: 1.55;
  color: rgba(244,247,242,.55); margin: 0;
}

.fr-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.fr-empty iconify-icon { font-size: 44px; color: rgba(244,247,242,.25); margin-bottom: 8px; }
.fr-empty p { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--white); margin: 0; }
.fr-empty > span { font-family: var(--font-body); font-size: .85rem; color: rgba(244,247,242,.45); }

.fr-empty-timer {
  margin-top: 12px;
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(240,169,58,.08);
  border: 1px solid rgba(240,169,58,.2);
  font-family: var(--font-data); font-weight: 700; font-size: 1rem;
  letter-spacing: .04em;
  color: var(--yellow);
  display: inline-flex; align-items: center; gap: 8px;
}

.fr-empty-timer iconify-icon { font-size: 1.1rem; }

.fr-game-head-badges {
  display: flex; align-items: center; gap: 10px;
}

.fr-game-next {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px;
  background: rgba(46,189,107,.08);
  border: 1px solid rgba(46,189,107,.25);
  color: var(--green);
  font-family: var(--font-data); font-weight: 700; font-size: .85rem;
}
.fr-game-next iconify-icon { font-size: 1rem; }


.fr-game-result-bar {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 1.5rem;
}
.fr-game-result-bar .fr-game-result {
  flex: 1;
  margin-bottom: 0;
}

.fr-game-score-badge {
  flex-shrink: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-width: 110px;
  padding: 0 1.25rem;
  border-radius: 14px;
}
.fr-game-score-badge.is-win {
  background: linear-gradient(135deg, rgba(46,189,107,.14), rgba(46,189,107,.05));
  border: 1px solid rgba(46,189,107,.3);
}
.fr-game-score-badge.is-lose {
  background: linear-gradient(135deg, rgba(229,72,77,.12), rgba(229,72,77,.04));
  border: 1px solid rgba(229,72,77,.3);
}
.fr-game-score-badge-label {
  font-family: var(--font-body); font-size: .7rem;
  color: rgba(244,247,242,.45); margin-bottom: 2px;
}
.fr-game-score-badge-value {
  font-family: var(--font-data); font-weight: 800; font-size: 1.8rem;
}
.fr-game-score-badge.is-win .fr-game-score-badge-value { color: var(--green); }
.fr-game-score-badge.is-lose .fr-game-score-badge-value { color: var(--red); }