:root {
  --bg-dark: #07121f;
  --bg-card: #101c2e;
  --bg-card-soft: #15243a;
  --bg-input: #0b1728;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --orange: #ff9f1c;
  --orange-dark: #f97316;
  --green: #22c55e;
  --blue: #38bdf8;
  --red: #ef4444;
  --yellow: #facc15;
  --border: rgba(255, 255, 255, 0.10);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 85% 70%, rgba(0, 180, 150, 0.45), transparent 34%),
    radial-gradient(circle at 25% 0%, rgba(40, 90, 180, 0.38), transparent 36%),
    linear-gradient(180deg, #101c3a 0%, #0b2342 46%, #063d3d 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 75%);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}

h2::before {
  display: none;
}

html,
body {
  overflow-x: hidden;
}

.app,
#app-section {
  overflow-x: hidden;
}

.tab-button,
.tab-button:hover,
.tab-button:active,
.tab-button.active {
  transform: none;
}

button {
  width: fit-content;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.28);
  cursor: pointer;
  font-weight: 950;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled,
input:disabled,
select:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-main);
  background: var(--bg-input);
  font: inherit;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(255, 159, 28, 0.75);
  box-shadow: 0 0 0 4px rgba(255, 159, 28, 0.16);
}

.app {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0;
  position: relative;
}

.hidden {
  display: none !important;
}

.error {
  color: #fecaca;
  font-weight: 800;
}

.success {
  color: #86efac;
  font-weight: 800;
}

.warning {
  color: #fde68a;
  font-weight: 800;
}

.hint {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.card {
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(21, 36, 58, 0.96), rgba(10, 23, 40, 0.96));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.26);
}

.form {
  display: grid;
  gap: 14px;
}

.secondary-button {
  width: 100%;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

/* Landing */

.landing {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 72%, rgba(31, 105, 117, 0.55), transparent 34%),
    linear-gradient(180deg, #101a31 0%, #102442 46%, #0e3c45 100%);
}

.landing::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
}

.landing-corner-logo {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: block;
  width: 118px;
  max-width: 34vw;
}

.landing-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 72px 16px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  text-align: center;
}

.landing-main-logo {
  display: block;
  width: 100%;
  max-width: 330px;
  height: auto;
  max-height: none;
  margin: 28px auto 38px;
  object-fit: contain;
}

.landing-mascots {
  width: 100%;
  max-width: 340px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  margin: 0 auto 34px;
}

.landing-mascot {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  overflow: visible;
}

.mascot-circle {
  width: 86px;
  max-width: 27vw;
  aspect-ratio: 1;
}

.mascot-circle img {
  display: block;
  width: 110%;
  height: 110%;
  object-fit: contain;
}

.landing-title-block {
  margin-bottom: 36px;
}

.landing-title-block h1 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(2.7rem, 13vw, 3.9rem);
  line-height: 1.08;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: -0.045em;
}

.landing-title-block p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.countdown {
  width: 100%;
  max-width: 360px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 32px;
}

.countdown-item {
  text-align: center;
}

.countdown-item strong {
  display: block;
  color: #ffffff;
  font-size: clamp(2.1rem, 10vw, 3rem);
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: 0.02em;
}

.countdown-item span {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.62rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.auth-card,
.landing-auth-card {
  width: 100%;
  max-width: 360px;
  padding: 20px;
  margin: 0 auto 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(8, 20, 38, 0.68);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
}

.auth-card h2,
.landing-auth-card h2 {
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 1.25rem;
  text-align: center;
}

.auth-card h2::before,
.landing-auth-card h2::before {
  display: none;
}

.auth-card .form {
  max-width: none;
}

.auth-card input,
.auth-card select {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  background: rgba(7, 18, 31, 0.88);
}

.auth-card button[type="submit"],
.landing-auth-card button[type="submit"] {
  width: 100%;
  margin-top: 4px;
  padding: 18px 20px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #efd05b, #e7bc43);
  box-shadow: 0 14px 34px rgba(231, 188, 67, 0.22);
  font-size: 1.1rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.landing-footer {
  max-width: 340px;
  margin: auto 0 0;
  padding-top: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0.12em;
}

.landing-footer strong {
  color: #ffffff;
  font-weight: 600;
}

/* Registration team choice */

.team-choice {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.team-choice legend {
  padding: 0 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 900;
}

.radio-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.radio-line input {
  width: auto;
}

/* Connected app shell */

#app-section {
  position: relative;
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 8px 96px;
}

#app-section .app-header {
  width: 100%;
  height: 142px;
  margin: 0 0 18px;
  border: 0;
  border-radius: 0;
  background-image: url("/images/banniere-coupe-monde-01.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: none;
  overflow: hidden;
}

#app-section .app-header::before,
#app-section .app-header::after {
  content: none;
}

.user-panel {
  position: absolute;
  top: 58px;
  right: 18px;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  margin: 0;
}

.user-avatar-button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #101827;
  background: linear-gradient(135deg, #ffd04a, #ff8a00);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  font-size: 0.92rem;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.user-avatar-button:hover {
  transform: none;
}

/* Bottom navigation */

.tabs {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  width: auto;
  max-width: 410px;
  margin: 0 auto;
  transform: none;

  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 7px;

  z-index: 20;
  border-radius: 24px;
  background: rgba(7, 18, 31, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.46);
}

.tab-button {
  width: 100%;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 17px;
  color: var(--text-muted);
  background: transparent;
  box-shadow: none;
  font-size: 0.65rem;
  line-height: 1.1;
  white-space: nowrap;
}

.tab-button span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-button:hover {
  transform: none;
}

.tab-button.active {
  color: #111827;
  background: linear-gradient(135deg, #ffd04a, #ff8a00);
}

.tab-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.tab-panel-slide {
  animation: mobileSlideEnter 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes mobileSlideEnter {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Section header and filters */

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title-row h2 {
  margin-bottom: 0;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #ffd04a, #ff8a00);
  font-size: 0.76rem;
  font-weight: 950;
  white-space: nowrap;
}

.match-filter-tabs {
  display: flex;
  gap: 8px;
  margin: 0 -4px 18px;
  padding: 0 4px 4px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.match-filter-tabs::-webkit-scrollbar {
  display: none;
}

.match-filter-button {
  flex: 0 0 auto;
  min-width: max-content;
  padding: 10px 16px;
  scroll-snap-align: start;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 999px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 900;
}

.match-filter-button.active {
  border-color: transparent;
  color: #111827;
  background: linear-gradient(135deg, #ffd04a, #ff8a00);
}

.match-filter-button:hover {
  transform: none;
}

/* Match cards */

.matches-list {
  display: grid;
  gap: 14px;
}

.match-card {
  padding: 16px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 20px;
  background: #111827;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
}

.match-card::before {
  display: none;
}

.match-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  color: #818cf8;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.match-date {
  color: #60a5fa;
  white-space: nowrap;
}

.teams-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  padding-bottom: 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.team-block {
  display: flex;
  justify-content: center;
  text-align: center;
}

.team-name {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #f8fafc;
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.15;
}

.flag-icon,
.flag-placeholder {
  width: 3.6em;
  height: 2.45em;
  flex: 0 0 auto;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.flag-placeholder {
  display: inline-block;
  background: linear-gradient(135deg, #64748b, #cbd5e1);
}

.team-name .flag-icon,
.team-name .flag-placeholder {
  width: 5.2em;
  height: 3.45em;
  border-radius: 8px;
}

.team-name {
  gap: 12px;
}

.versus,
.versus-block {
  color: #64748b;
  font-size: 1rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.prediction-form,
.match-score-form {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 64px auto 64px;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 0;
}

.score-input-label {
  display: block;
}

.score-input-label input,
.prediction-form input {
  width: 64px;
  height: 58px;
  padding: 0;
  border: 2px solid rgba(99, 102, 241, 0.22);
  border-radius: 12px;
  color: #f8fafc;
  background: #0b1220;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  font-size: 1.9rem;
  font-weight: 950;
  text-align: center;
}

.score-input-label input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 159, 28, 0.16);
}

.score-separator {
  padding: 0;
  color: #64748b;
  font-size: 1.8rem;
  font-weight: 950;
}

.match-score-form button,
.prediction-form button {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 4px;
}

.qualified-team-wrapper {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 159, 28, 0.24);
  border-radius: 16px;
  background: rgba(255, 159, 28, 0.10);
}

.prediction-status {
  position: relative;
  z-index: 1;
  margin-top: 10px;
}

.match-result-big {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 14px auto 8px;
  color: #ffffff;
}

.match-result-big span {
  min-width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 159, 28, 0.45);
  border-radius: 16px;
  background: #0b1220;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.28);
  font-size: 2rem;
  font-weight: 950;
}

.match-result-big strong {
  color: #64748b;
  font-size: 1.8rem;
  font-weight: 950;
}

.prediction-registered,
.locked-label,
.prediction-open-label {
  width: fit-content;
  margin: 12px auto 0;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 900;
}

.prediction-registered,
.prediction-open-label {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
}

.locked-label {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.12);
}

.result {
  display: block;
  width: fit-content;
  margin: 0 auto 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.12);
  font-weight: 900;
  text-align: center;
}

/* My predictions cards */

.my-prediction-card .teams-grid {
  margin-bottom: 14px;
}

.prediction-detail-box,
.prediction-result-box,
.prediction-points-box {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.prediction-detail-box span,
.prediction-result-box span,
.prediction-points-box span {
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.prediction-detail-box strong,
.prediction-result-box strong,
.prediction-points-box strong {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 950;
  line-height: 1.1;
}

.prediction-detail-box strong {
  color: #ffb21a;
}

.prediction-result-box {
  border-color: rgba(250, 204, 21, 0.22);
  background: rgba(250, 204, 21, 0.10);
}

.prediction-result-box strong {
  color: #fde68a;
}

.prediction-result-box em {
  color: #fef3c7;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 800;
}

.prediction-points-box {
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(34, 197, 94, 0.10);
}

.prediction-points-box strong {
  color: #86efac;
  font-size: 1.55rem;
}

/* Ranking */

.ranking-section {
  padding-bottom: 20px;
}

.ranking-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 0 24px;
  padding: 6px;
  border: 1px solid rgba(99, 102, 241, 0.10);
  border-radius: 16px;
  background: #101827;
}

.ranking-tab-button {
  width: 100%;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 13px 8px;
  border: 0;
  border-radius: 12px;
  color: #64748b;
  background: transparent;
  box-shadow: none;
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ranking-tab-button.active {
  color: #101827;
  background: linear-gradient(135deg, #ffd04a, #ff8a00);
}

.ranking-tab-button:hover {
  transform: none;
}

.ranking-panel {
  margin-top: 12px;
}

.ranking-podium {
  min-height: 250px;
  display: grid;
  grid-template-columns: 1fr 1.18fr 1fr;
  align-items: end;
  gap: 12px;
  margin: 8px 0 22px;
}

.podium-player {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-items: end;
  text-align: center;
}

.podium-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: #1b2444;
  font-size: 1.1rem;
  font-weight: 950;
}

.podium-first .podium-avatar {
  width: 76px;
  height: 76px;
  color: #101827;
  background: linear-gradient(135deg, #ffd04a, #ff8a00);
  font-size: 1.25rem;
}

.podium-second .podium-avatar {
  color: #101827;
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
}

.podium-third .podium-avatar {
  color: #101827;
  background: linear-gradient(135deg, #f59e0b, #92400e);
}

.podium-name {
  max-width: 100%;
  overflow: hidden;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-points {
  margin-top: 4px;
  color: #ffd04a;
  font-size: 1.15rem;
  font-weight: 950;
}

.podium-block {
  width: 100%;
  max-width: 92px;
  margin-top: 10px;
  border-radius: 12px 12px 0 0;
}

.podium-first .podium-block {
  height: 118px;
  background: linear-gradient(180deg, #ffd04a, #ff8a00);
}

.podium-second .podium-block {
  height: 90px;
  background: linear-gradient(180deg, #f8fafc, #94a3b8);
}

.podium-third .podium-block {
  height: 72px;
  background: linear-gradient(180deg, #d97706, #7c3f16);
}

.ranking-card-list {
  display: grid;
  gap: 10px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 34px 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 14px;
  background: #101827;
}

.ranking-card.is-current-user {
  border-color: rgba(255, 208, 74, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 208, 74, 0.14);
}

.ranking-position {
  color: #64748b;
  font-size: 1rem;
  font-weight: 950;
  text-align: center;
}

.ranking-position.rank-gold {
  color: #ffd04a;
}

.ranking-position.rank-silver {
  color: #cbd5e1;
}

.ranking-position.rank-bronze {
  color: #d97706;
}

.ranking-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #94a3b8;
  background: #1b2444;
  font-size: 0.85rem;
  font-weight: 950;
}

.ranking-avatar.rank-gold {
  color: #101827;
  background: linear-gradient(135deg, #ffd04a, #ff8a00);
}

.ranking-avatar.rank-silver {
  color: #101827;
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
}

.ranking-avatar.rank-bronze {
  color: #101827;
  background: linear-gradient(135deg, #f59e0b, #92400e);
}

.ranking-user-info {
  min-width: 0;
}

.ranking-user-info h3 {
  margin: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-user-info h3 span {
  color: #ffd04a;
  font-size: 0.8rem;
}

.ranking-user-info p {
  margin: 4px 0 0;
  overflow: hidden;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-points {
  text-align: right;
  white-space: nowrap;
}

.ranking-points strong {
  color: #ffd04a;
  font-size: 1.35rem;
  font-weight: 950;
}

.ranking-points span {
  margin-left: 2px;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
}

/* Trophies */

.trophies-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.trophy-card {
  position: relative;
  min-height: 170px;
  padding: 18px 14px;
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(6, 16, 44, 0.95);
  text-align: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.trophy-card.unlocked {
  border-color: rgba(255, 191, 36, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 191, 36, 0.08),
    0 16px 32px rgba(0, 0, 0, 0.24);
}

.trophy-card.locked {
  opacity: 0.48;
}

.trophy-lock {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.9rem;
}

.trophy-icon {
  margin-bottom: 12px;
  font-size: 2rem;
}

.trophy-title {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.15;
}

.trophy-description {
  margin: 0;
  color: #8da2c5;
  font-size: 0.8rem;
  line-height: 1.35;
}

.trophy-progress {
  margin: 10px 0 0;
  color: #ffd04a;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.3;
}

/* Profile */

.profile-section {
  padding-bottom: 24px;
}

.profile-card {
  margin: 18px 0 26px;
  padding: 28px 18px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 28px;
  background: rgba(16, 28, 48, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.profile-avatar {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 999px;
  color: #101827;
  background: linear-gradient(135deg, #ffd04a, #ff8a00);
  box-shadow: 0 16px 34px rgba(255, 138, 0, 0.18);
  font-size: 1.8rem;
  font-weight: 950;
}

.profile-card h2 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 950;
}

.profile-login {
  margin: 0 0 6px;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 700;
}

.profile-entity {
  margin: 0 0 10px;
  color: #60a5fa;
  font-size: 0.92rem;
  font-weight: 900;
}

.profile-team {
  width: fit-content;
  margin: 0 auto 22px;
  padding: 8px 14px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 999px;
  color: #2dd4bf;
  background: rgba(20, 184, 166, 0.14);
  font-size: 0.88rem;
  font-weight: 950;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.profile-stat {
  padding: 16px 8px;
  border-radius: 14px;
  background: #070d19;
}

.profile-stat strong {
  display: block;
  color: #ffd04a;
  font-size: 1.7rem;
  font-weight: 950;
  line-height: 1;
}

.profile-stat span {
  display: block;
  margin-top: 9px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.rules-section {
  margin-top: 28px;
}

.rules-section h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.rules-item {
  margin-bottom: 10px;
  border-radius: 18px;
  overflow: hidden;
  background: #101827;
  border: 1px solid rgba(99, 102, 241, 0.14);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.20);
}

.rules-item summary {
  cursor: pointer;
  position: relative;
  display: block;
  padding: 17px 44px 17px 18px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 950;
  list-style: none;
}

.rules-item summary::-webkit-details-marker {
  display: none;
}

.rules-item summary::after {
  content: "▼";
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.9rem;
}

.rules-item[open] summary::after {
  content: "▲";
}

.rules-content {
  padding: 0 18px 18px;
  color: #a7b1d5;
  font-size: 0.92rem;
  line-height: 1.7;
}

.rules-content h3 {
  margin: 16px 0 12px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 950;
}

.rules-content p {
  margin: 0 0 18px;
}

.rules-content strong {
  color: #ffffff;
  font-weight: 950;
}

.rules-points-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.86rem;
}

.rules-points-table th,
.rules-points-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  text-align: left;
}

.rules-points-table th {
  color: #ffd04a;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rules-points-table th:last-child,
.rules-points-table td:last-child {
  text-align: right;
  font-weight: 950;
}

.rules-points-table td {
  color: #a7b1d5;
}

.rules-points-table td:last-child {
  color: #a7b1d5;
}

.rules-points-table .points-good {
  color: #4ade80;
}

.rules-points-table .points-blue {
  color: #60a5fa;
}

.trophy-rules-list p {
  margin: 0 0 8px;
  line-height: 1.45;
}

.trophy-rules-list strong {
  color: #ffd04a;
}

.profile-logout-button {
  width: 100%;
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 16px;
  color: #fb7185;
  background: rgba(239, 68, 68, 0.12);
  box-shadow: none;
  font-weight: 950;
}

.profile-logout-button:hover {
  transform: none;
}

/* Responsive */

@media (min-width: 600px) {
  .landing-content {
    max-width: 560px;
    padding-top: 92px;
  }

  .landing-main-logo {
    max-width: 470px;
  }

  .landing-mascots {
    max-width: 440px;
    gap: 18px;
  }

  .mascot-circle {
    width: 116px;
  }

  .landing-title-block h1 {
    font-size: 4.6rem;
  }

  .countdown {
    max-width: 460px;
    gap: 18px;
  }
}

@media (min-width: 900px) {
  #app-section {
    width: 430px;
    padding-bottom: 110px;
  }

  .tabs {
    max-width: 430px;
  }
}

@media (max-width: 430px) {
  .landing-content {
    padding-top: 76px;
  }

  .landing-main-logo {
    margin-bottom: 40px;
  }

  .landing-mascots {
    margin-bottom: 34px;
  }

  .landing-title-block {
    margin-bottom: 40px;
  }

  .countdown {
    margin-bottom: 34px;
  }

  .landing-title-block h1 {
    font-size: clamp(2.8rem, 12vw, 4rem);
  }

  .landing-title-block p {
    letter-spacing: 0.16em;
  }
}

@media (max-width: 420px) {
  .match-card {
    padding: 14px;
  }

  .teams-grid {
    gap: 10px;
  }

  .team-name {
    font-size: 0.84rem;
  }

  .flag-icon,
  .flag-placeholder {
    width: 2.1em;
    height: 1.5em;
  }

  .match-score-form,
  .prediction-form {
    grid-template-columns: 58px auto 58px;
  }

  .score-input-label input,
  .prediction-form input {
    width: 58px;
    height: 54px;
    font-size: 1.7rem;
  }
}

@media (max-width: 390px) {
  #app-section .app-header {
    height: 128px;
  }

  .user-panel {
    top: 52px;
    right: 14px;
  }

  .user-avatar-button {
    width: 42px;
    height: 42px;
    font-size: 0.82rem;
  }
}

@media (max-width: 370px) {
  .ranking-card {
    grid-template-columns: 26px 42px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 12px;
  }

  .ranking-avatar {
    width: 42px;
    height: 42px;
  }

  .ranking-user-info h3 {
    font-size: 0.92rem;
  }

  .ranking-points strong {
    font-size: 1.15rem;
  }

  .ranking-podium {
    gap: 8px;
  }

  .podium-avatar {
    width: 56px;
    height: 56px;
  }

  .podium-first .podium-avatar {
    width: 66px;
    height: 66px;
  }
}

@media (max-width: 360px) {
  .landing-content {
    padding-right: 12px;
    padding-left: 12px;
  }

  .landing-main-logo {
    max-width: 300px;
  }

  .landing-mascots {
    max-width: 310px;
    gap: 6px;
  }

  .mascot-circle {
    width: 76px;
  }

  .landing-title-block h1 {
    font-size: 2.65rem;
  }

  .countdown {
    gap: 8px;
  }

  .countdown-item span {
    letter-spacing: 0.12em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tab-panel-slide {
    animation: none;
  }
}

.user-kpi-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: -2px 0 18px;
  padding: 0;
}

.user-kpi-card {
  min-width: 0;
  padding: 13px 6px 11px;
  border-radius: 12px;
  background: #101827;
  border: 1px solid rgba(99, 102, 241, 0.16);
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.user-kpi-card strong {
  display: block;
  color: #ffd04a;
  font-size: clamp(1.15rem, 5vw, 1.55rem);
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.user-kpi-card span {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 370px) {
  .user-kpi-bar {
    gap: 6px;
  }

  .user-kpi-card {
    padding: 11px 4px 9px;
  }

  .user-kpi-card strong {
    font-size: 1.05rem;
  }

  .user-kpi-card span {
    font-size: 0.52rem;
    letter-spacing: 0.05em;
  }

  .rules-item summary {
    padding: 15px 40px 15px 16px;
    font-size: 0.94rem;
  }

  .rules-content {
    padding: 0 16px 16px;
    font-size: 0.86rem;
  }

  .rules-points-table th,
  .rules-points-table td {
    padding: 10px 8px;
  }

}

.pwa-install-banner {
  position: fixed;
  left: 50%;
  bottom: 88px;
  width: min(410px, calc(100% - 24px));
  transform: translateX(-50%);
  z-index: 60;
}

.pwa-install-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 46px 14px 14px;
  border-radius: 20px;
  background: rgba(16, 24, 39, 0.96);
  border: 1px solid rgba(255, 208, 74, 0.28);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

.pwa-install-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 208, 74, 0.12);
  font-size: 1.35rem;
}

.pwa-install-content {
  min-width: 0;
}

.pwa-install-content strong {
  display: block;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 950;
}

.pwa-install-content p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 0.78rem;
  line-height: 1.35;
}

.pwa-install-button {
  padding: 10px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd04a, #ff8a00);
  color: #101827;
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: none;
  white-space: nowrap;
}

.pwa-install-close {
  position: absolute;
  top: 7px;
  right: 9px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  box-shadow: none;
  font-size: 1.25rem;
  line-height: 1;
}

.pwa-install-close:hover,
.pwa-install-button:hover {
  transform: none;
}

@media (max-width: 380px) {
  .pwa-install-card {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .pwa-install-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 370px) {
  .team-name .flag-icon,
  .team-name .flag-placeholder {
    width: 4.4em;
    height: 2.95em;
  }
}