@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

/* theme.css
   Single dark theme using CSS variables.
*/

:root {
  --font-ui: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Manrope", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-copy-light: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #131313;
  --text: #ffffff;
  --muted: #94a3b8;
  --border: #4c4d4b;
  --nav-bg: #a5d37e;
  --surface: #202020;
  --surface-2: #2a2a2a;
  --input-bg: #2a2a2a;
  --input-placeholder: #64748b;
  --btn-bg: #f1f5f9;
  --btn-text: #0f172a;
  --btn-hover-bg: #ffffff;
  --accent: #56974a;
  --tooltip-bg: #171717;
  --tooltip-text: #eef2f7;
  --data-pad-sm: 4px;
  --data-pad-md: 5px;
  --data-pad-lg: 6px;
}

body,
.lol-body,
button,
input,
select,
textarea {
  font-family: var(--font-ui);
}

h1,
h2,
h3,
h4,
h5,
h6,
#summonerName,
.text-xl.font-semibold,
.text-sm.font-semibold {
  font-family: var(--font-display);
}

.text-xs.lol-muted,
.md-sub,
.champ-stat-sub,
.recent-champ-kda,
.recent-champ-wl,
.recent-champ-kda-sub,
.recent-champ-wr {
  font-family: var(--font-copy-light);
  font-weight: 300;
}

/* App primitives (semantic classes) */
.lol-body {
  background: var(--bg);
  color: var(--text);
}

[data-tooltip],
[title] {
  position: relative;
}

[data-tooltip]::before,
[data-tooltip]::after,
[title]::before,
[title]::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 120;
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 140ms ease;
}

[data-tooltip]::before,
[title]::before {
  content: "";
  top: calc(100% + 4px);
  border-width: 0 6px 6px 6px;
  border-style: solid;
  border-color: transparent transparent var(--tooltip-bg) transparent;
  transform: translate(-50%, 4px);
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  top: calc(100% + 10px);
  transform: translate(-50%, 4px);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--tooltip-text);
  text-align: center;
  max-width: 240px;
  white-space: normal;
  word-break: break-word;
  background: var(--tooltip-bg);
  border-radius: 6px;
  padding: 6px 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

[title]::after {
  content: attr(title);
  top: calc(100% + 10px);
  transform: translate(-50%, 4px);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--tooltip-text);
  text-align: center;
  max-width: 240px;
  white-space: normal;
  word-break: break-word;
  background: var(--tooltip-bg);
  border-radius: 6px;
  padding: 6px 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after,
[title]:hover::before,
[title]:hover::after,
[data-tooltip]:focus-visible::before,
[data-tooltip]:focus-visible::after,
[title]:focus-visible::before,
[title]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.tooltips-js [data-tooltip]::before,
.tooltips-js [data-tooltip]::after,
.tooltips-js [title]::before,
.tooltips-js [title]::after {
  display: none !important;
}

.lol-global-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, 4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 999;
  max-width: 240px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--tooltip-text);
  text-align: center;
  white-space: normal;
  word-break: break-word;
  background: var(--tooltip-bg);
  border-radius: 6px;
  padding: 6px 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 140ms ease;
}

.lol-global-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: calc(50% + var(--tooltip-arrow-offset, 0px));
  transform: translateX(-50%);
  border-width: 0 6px 6px 6px;
  border-style: solid;
  border-color: transparent transparent var(--tooltip-bg) transparent;
}

.lol-global-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.lol-nav {
  position: relative;
  z-index: 50;
  background: #202020;
  border-bottom: 1px solid #5fc74f !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.home-header {
  background: var(--bg) !important;
  color: #f9f9f9;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  display: block;
  width: auto;
  height: 30px;
}

.profile-nav-layout {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  background: #202020;
}

.profile-nav-center {
  justify-self: center;
  gap: 0 !important;
}

.profile-nav-actions {
  justify-self: end;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Sun/moon theme toggle (visual only for now) */
.themeToggle {
  color: #bbb;
}

.icon-ms {
  font-variation-settings:
    "FILL" 0,
    "wght" 500,
    "GRAD" 0,
    "opsz" 24;
  line-height: 1;
  user-select: none;
}

.st-sunMoonThemeToggleBtn {
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
}

.st-sunMoonThemeToggleBtn .themeToggleInput {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.st-sunMoonThemeToggleBtn .theme-toggle-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 18px;
  color: #bbb;
  transform: translate(-50%, -50%);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
  pointer-events: none;
}

.st-sunMoonThemeToggleBtn .theme-toggle-icon-dark {
  opacity: 1;
}

.st-sunMoonThemeToggleBtn .theme-toggle-icon-light {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
}

.st-sunMoonThemeToggleBtn .themeToggleInput:checked ~ .theme-toggle-icon-dark {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
}

.st-sunMoonThemeToggleBtn .themeToggleInput:checked ~ .theme-toggle-icon-light {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.profile-nav-account {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 0.2rem;
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
}

.profile-nav-account .nav-account-icon {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.94);
}

.profile-card-title {
  font-weight: 700;
}

@media (max-width: 900px) {
  .profile-nav-layout {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .profile-nav-center {
    justify-self: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(70px, 96px) auto;
  }

  .profile-nav-actions {
    justify-self: end;
  }
}

#summonerSearchBtn {
  background: #f8faf7;
  border-color: #f8faf7;
  color: rgba(32, 32, 32, 0.6);
  font-family: var(--font-display);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 0.75rem !important;
  position: relative;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

#summonerSearchBtn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: #e3e9de;
}

#summonerSearchBtn:hover {
  background: #e8f2e0;
  border-color: #e8f2e0;
  box-shadow: inset 0 0 0 1px rgba(95, 199, 79, 0.14);
}

#summonerSearch {
  width: 21rem;
  background: #f8faf7;
  border-color: #f8faf7;
  color: rgba(17, 24, 39, 0.6);
  font-size: 0.6875rem;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: 0;
}

#summonerSearch::placeholder {
  color: rgba(107, 114, 128, 0.4);
}

#summonerSearch:focus {
  outline: none;
  box-shadow: none;
}

.region-dropdown {
  position: relative;
  min-width: 76px;
  border-right: 0;
}

.region-dropdown-btn {
  width: 100%;
  height: 100%;
  border: 0;
  background: #f8faf7;
  color: rgba(17, 24, 39, 0.6);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.6875rem;
  padding: 0 1.9rem 0 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  line-height: 1;
  transition:
    background-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.region-dropdown-btn:hover,
.region-dropdown-btn[aria-expanded="true"] {
  background: #e8f2e0;
}

.region-dropdown-btn:hover {
  box-shadow: inset 0 0 0 1px rgba(95, 199, 79, 0.14);
}

.region-dropdown-btn .region-dropdown-icon {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  font-size: 18px;
  transform: translateY(-50%);
  color: rgba(17, 24, 39, 0.6);
  pointer-events: none;
  transition: transform 160ms ease;
}

.region-dropdown-btn[aria-expanded="true"] .region-dropdown-icon {
  transform: translateY(-50%) rotate(180deg);
}

.region-dropdown-btn:focus,
.region-dropdown-btn:focus-visible {
  outline: none;
}

.region-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  border: 1px solid #dcecd0;
  border-radius: 0.35rem;
  background: #f8faf7;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  padding: 0.25rem;
  z-index: 70;
  transform-origin: top;
  animation: regionMenuIn 160ms ease-out;
}

.region-dropdown-item {
  width: 100%;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: rgba(17, 24, 39, 0.75);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.6875rem;
  text-align: left;
  padding: 0.4rem 0.5rem;
  line-height: 1.2;
}

.region-dropdown-item:hover,
.region-dropdown-item.is-active {
  background: #e8f2e0;
  color: rgba(17, 24, 39, 0.95);
}

.region-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
}

@keyframes regionMenuIn {
  0% {
    opacity: 0;
    transform: scale(0.98) translateY(-2px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#summonerSearch,
#regionSelect,
#regionDropdownBtn,
#summonerSearchBtn {
  height: 34px;
  font-family: var(--font-display);
  font-weight: 600;
}

#summonerSearchBtn {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  font-size: 0.6875rem;
}

.lol-surface {
  background: var(--surface);
  border-color: var(--border);
}

.lol-surface-2 {
  background: var(--surface-2);
}

.lol-border {
  border-color: var(--border);
}

.lol-muted {
  color: var(--muted);
}

.lol-input {
  background: var(--input-bg);
  border-color: var(--border);
  color: var(--text);
}

.lol-input::placeholder {
  color: var(--input-placeholder);
}

.lol-btn {
  background: var(--btn-bg);
  color: var(--btn-text);
}

.lol-btn:hover {
  background: var(--btn-hover-bg);
}

.lol-link {
  color: var(--muted);
}

.lol-link:hover {
  color: var(--text);
}

button,
.lol-btn,
a[href],
select,
[role="button"] {
  cursor: pointer;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
  cursor: text;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

.rounded-xl,
.lol-match-card,
.team-box,
.recent-champ-item,
.champ-stat-row {
  border-radius: 0.2rem !important;
}

/* Profile hero (splash art) */
.profile-hero-wrap {
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.lol-hero {
  position: relative;
  min-height: 255px;
}

.hero-splash-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10%;
  right: 10%;
  opacity: 0.65;
  z-index: 0;
  pointer-events: none;
  background-size: 100% 100%, cover;
  background-position: center, 50% var(--hero-pos-y, 50%);
  background-repeat: no-repeat, no-repeat;
  background-image:
    linear-gradient(0deg, var(--bg) 0%, transparent 10%),
    var(--hero-url, none);
}

@media (min-width: 1600px) {
  .hero-splash-bg {
    background-position: center, 50% var(--hero-pos-y, 50%);
  }
}

.hero-splash-bg::before,
.hero-splash-bg::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  z-index: 1;
  pointer-events: none;
}

.hero-splash-bg::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg) 0%, transparent 100%);
}

.hero-splash-bg::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg) 0%, transparent 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 255px;
  display: grid;
  grid-template-columns: minmax(360px, 560px) 1fr;
  align-items: center;
  padding: 12px;
}

.hero-left {
  display: flex;
  align-items: stretch;
  gap: 14px;
  min-width: 0;
}

.hero-right {
  min-height: 1px;
}

@media (min-width: 768px) {
  .hero-inner {
    min-height: 270px;
    grid-template-columns: minmax(420px, 640px) 1fr;
    padding: 12px;
  }
}

@media (max-width: 640px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

/* Profile layout helpers (avoid relying on build-time utility classes) */
.profile-meta-grid,
.profile-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 1024px) {
  .profile-meta-grid {
    grid-template-columns: 4fr 8fr;
  }
  .profile-content-grid {
    grid-template-columns: 4fr 8fr;
    align-items: start;
  }
}

/* Match grid: always 1 per row */
.match-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

/* Profile avatar */
.profile-avatar {
  --ring-start: #6e6e6e;
  --ring-end: #3d3d3d;
  --glow-start: var(--ring-start);
  --glow-end: var(--ring-end);
  --outer-glow-opacity: 0;
  position: relative;
  width: 156px;
  height: 172px;
  flex: 0 0 156px;
}

.profile-avatar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 156px;
  height: 156px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--ring-start), var(--ring-end));
  filter: saturate(1.22) brightness(1.08);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.32);
  z-index: 1;
}

.profile-avatar::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 156px;
  height: 156px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--glow-start), var(--glow-end));
  transform: scale(0.84);
  filter: blur(24px) saturate(1.2) brightness(1.08);
  opacity: var(--outer-glow-opacity);
  pointer-events: none;
  z-index: 0;
}

.profile-avatar[data-rank-tier="iron"] {
  --ring-start: #8b8b8b;
  --ring-end: #4f4f4f;
}
.profile-avatar[data-rank-tier="bronze"] {
  --ring-start: #b5794f;
  --ring-end: #6d3f27;
}
.profile-avatar[data-rank-tier="silver"] {
  --ring-start: #cfd4da;
  --ring-end: #8a939d;
}
.profile-avatar[data-rank-tier="gold"] {
  --ring-start: #dfc271;
  --ring-end: #8f7530;
}
.profile-avatar[data-rank-tier="platinum"] {
  --ring-start: #74c5c0;
  --ring-end: #2d7273;
}
.profile-avatar[data-rank-tier="emerald"] {
  --ring-start: #5ed18f;
  --ring-end: #1f7a4f;
}
.profile-avatar[data-rank-tier="diamond"] {
  --ring-start: #80a9f8;
  --ring-end: #3f61b8;
}
.profile-avatar[data-rank-tier="master"] {
  --ring-start: #d7a8ff;
  --ring-end: #7a2fff;
  --glow-start: #e7c8ff;
  --glow-end: #9856ff;
  --outer-glow-opacity: 0.68;
}
.profile-avatar[data-rank-tier="grandmaster"] {
  --ring-start: #ff889d;
  --ring-end: #ff2e63;
  --glow-start: #ffc0cb;
  --glow-end: #ff4f7d;
  --outer-glow-opacity: 0.68;
}
.profile-avatar[data-rank-tier="challenger"] {
  --ring-start: #9fe0ff;
  --ring-end: #39a9ff;
  --glow-start: #dbf3ff;
  --glow-end: #59c0ff;
  --outer-glow-opacity: 0.82;
}

.profile-icon {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 148px;
  height: 148px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  background: var(--surface-2);
  box-shadow:
    0 0 0 1px rgba(18, 18, 18, 0.85),
    inset 0 0 14px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.brand-logo,
.profile-icon,
.recent-champ-icon,
.champ-stat-icon,
.match-card-champ-icon,
.match-team-champ-icon,
.md-champ-icon,
.match-card-spell,
.md-spell,
.match-item,
.md-item,
.rank-emblem,
.rank-last-season-emblem,
.match-card-rank-emblem {
  transition: opacity 180ms ease;
}

.riot-img-reveal {
  transition: opacity 80ms ease !important;
}

.riot-img-reveal-pending {
  opacity: 0 !important;
}

.champ-icon-reveal {
  transition: opacity 80ms ease !important;
}

.champ-icon-reveal-pending {
  opacity: 0 !important;
}

.brand-logo[data-img-state="loading"],
.profile-icon[data-img-state="loading"],
.recent-champ-icon[data-img-state="loading"],
.champ-stat-icon[data-img-state="loading"],
.match-card-champ-icon[data-img-state="loading"],
.match-team-champ-icon[data-img-state="loading"],
.md-champ-icon[data-img-state="loading"],
.match-card-spell[data-img-state="loading"],
.md-spell[data-img-state="loading"],
.match-item[data-img-state="loading"],
.md-item[data-img-state="loading"],
.rank-emblem[data-img-state="loading"],
.rank-last-season-emblem[data-img-state="loading"],
.match-card-rank-emblem[data-img-state="loading"] {
  opacity: 0.15;
}

.brand-logo[data-img-state="loaded"],
.profile-icon[data-img-state="loaded"],
.recent-champ-icon[data-img-state="loaded"],
.champ-stat-icon[data-img-state="loaded"],
.match-card-champ-icon[data-img-state="loaded"],
.match-team-champ-icon[data-img-state="loaded"],
.md-champ-icon[data-img-state="loaded"],
.match-card-spell[data-img-state="loaded"],
.md-spell[data-img-state="loaded"],
.match-item[data-img-state="loaded"],
.md-item[data-img-state="loaded"],
.rank-emblem[data-img-state="loaded"],
.rank-last-season-emblem[data-img-state="loaded"],
.match-card-rank-emblem[data-img-state="loaded"] {
  opacity: 1;
}


#summonerName {
  font-size: clamp(2rem, 3.2vw, 2.4rem);
  line-height: 1.05;
  font-weight: 700;
}

.hero-identity {
  height: 152px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-identity-top {
  padding-top: 4px;
}

.hero-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}

.summoner-verified-badge {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: inline-block;
  margin-left: -2px;
  filter: brightness(0) saturate(100%) invert(74%) sepia(21%) saturate(948%)
    hue-rotate(64deg) brightness(93%) contrast(92%);
}

.hero-sub-row {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 18px;
}

.hero-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-badge-icon {
  width: 14px;
  height: 14px;
  display: block;
}

#summonerTag {
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 3.2vw, 2.4rem);
  line-height: 1.05;
  white-space: nowrap;
}

#summonerName {
  white-space: nowrap;
}

.hero-badge-separator {
  width: 1px;
  height: 10px;
  background: var(--muted);
  opacity: 0.7;
  display: inline-block;
  align-self: center;
  transform: translateY(1px);
}

.hero-badges:empty + .hero-badge-separator {
  display: none;
}

.hero-region {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.hero-region-icon {
  width: 14px;
  height: 14px;
  display: block;
}

.summoner-level-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  min-width: 42px;
  height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: #101010;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: #f1f5f9;
}

.hero-identity-bottom {
  display: flex;
  align-items: flex-end;
  padding-bottom: 4px;
}

#refreshDataMeta {
  color: #d7d7d7 !important;
}

.refresh-status-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.refresh-meta-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.refresh-meta-label {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  font-family: var(--font-display);
  font-weight: 500;
}

.refresh-btn {
  --refresh-progress-pct: 0%;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #5fc74f;
  background: #5fc74f;
  color: #11210e;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 140ms ease,
    border-color 140ms ease;
}

.refresh-btn::before,
.refresh-btn::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
}

.refresh-btn::before {
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  opacity: 0;
  z-index: 1;
  transition: opacity 140ms ease;
}

.refresh-btn::after {
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--refresh-progress-pct);
  max-width: 100%;
  background: linear-gradient(90deg, rgba(27, 88, 21, 0.65), rgba(255, 255, 255, 0.32));
  z-index: 0;
  transition: width 120ms linear;
}

.refresh-btn:hover {
  background: #53b844;
  border-color: #53b844;
}

.refresh-btn:hover::before {
  opacity: 1;
}

.refresh-btn:disabled {
  background: #3d463c;
  border-color: #3d463c;
  color: rgba(255, 255, 255, 0.8);
}

.refresh-btn-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  color: #1d3120;
  position: relative;
  z-index: 2;
  transform-origin: 50% 50%;
  transition: transform 140ms ease;
}

.refresh-btn:hover .refresh-btn-icon {
  transform: translateY(-1px);
}

.refresh-btn:disabled .refresh-btn-icon {
  color: rgba(236, 242, 235, 0.88);
}

.refresh-btn.is-running,
.refresh-btn.is-completing {
  background: #53b844;
  border-color: #53b844;
}

.refresh-btn.is-running::before,
.refresh-btn.is-completing::before {
  opacity: 0;
}

.refresh-btn.is-running .refresh-btn-icon,
.refresh-btn.is-completing .refresh-btn-icon {
  color: #1d3120;
}

.refresh-btn.is-running .refresh-btn-icon {
  animation:
    refreshIconPop 220ms cubic-bezier(0.18, 0.89, 0.32, 1.28),
    refreshIconSpin 880ms linear 220ms infinite;
}

.refresh-btn.is-completing .refresh-btn-icon {
  animation: none;
}

@keyframes refreshIconPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes refreshIconSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .refresh-btn,
  .refresh-btn::before,
  .refresh-btn::after,
  .refresh-btn-icon {
    transition: none;
  }

  .refresh-btn.is-running .refresh-btn-icon {
    animation: none;
  }
}

/* Match cards */

/* --- Match selection --- */
.lol-match-card {
  cursor: pointer;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease;
}
.lol-match-card:hover {
  transform: none;
}
.lol-match-card.is-selected {
  border-color: var(--match-accent);
}

/* --- Details panel --- */
.match-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.team-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--data-pad-lg);
  background: var(--surface-2);
  overflow-x: auto;
}

.team-blue {
  background: rgba(37, 99, 235, 0.08);
}
.team-red {
  background: rgba(220, 38, 38, 0.08);
}

.team-roles {
  display: grid;
  gap: 4px;
}
.role-row {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  font-size: 12px;
}
.role-row .role {
  color: var(--muted);
}
.role-row .pick {
  font-weight: 600;
}

.team-board {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.md-head,
.md-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.6fr) 0.8fr 0.8fr 0.65fr 0.65fr minmax(148px, 1.2fr);
  gap: 4px;
  align-items: center;
}

.md-head {
  font-size: 11px;
  color: var(--muted);
  padding: 0 2px;
  text-align: center;
}

.md-body {
  display: grid;
  gap: 3px;
}

.md-row {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 12px;
}

.md-row.is-self {
  color: var(--text);
}

.md-player {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.md-player-text {
  min-width: 0;
}

.md-left-icons {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.md-spells {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  gap: 1px;
}

.md-spell {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.md-spell-empty {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
}

.md-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.md-sub {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.md-champ-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

.md-champ-fallback {
  background: var(--surface);
}

.md-kda,
.md-dmg,
.md-wards,
.md-cs {
  text-align: center;
}

.md-items {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  align-items: center;
}

.md-item {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.md-item-empty {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
}

/* --- Proportion tweaks (reduce bulky cards) --- */
.rank-card-compact,
.match-details-card-compact {
  padding: 6px !important;
  border: 0 !important;
}

.champ-stats-card-compact {
  --champ-card-pad-x: 10px;
  --champ-card-pad-y: 8px;
  display: flex;
  flex-direction: column;
  padding: 8px 10px !important;
  border: 0 !important;
}

.recent-card-compact {
  padding: 8px 10px !important;
  border: 0 !important;
  display: flex;
  flex-direction: column;
}

.rank-card-compact {
  --rank-bottom-row-h: 56px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 4px;
  align-items: stretch;
  min-height: 156px;
}

.rank-left-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr) var(--rank-bottom-row-h);
  align-items: stretch;
  gap: 2px;
  justify-items: center;
}

.rank-rd-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.rank-games-cell {
  padding-left: 10px;
}

.rank-emblem {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  padding: 0 8px;
  align-self: center;
  justify-self: center;
}

.rank-stat-grid {
  display: grid;
  gap: 2px;
}

.rank-stat-grid-2x2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) var(--rank-bottom-row-h);
  align-content: center;
}

.rank-stat-grid-2x2 .rank-stat-plain {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 8px 4px 20px;
}

.rank-last-season-emblem {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.rank-stat-grid-2x2 .rank-stat-plain.rank-last-season-cell {
  padding-left: 0;
  padding-right: 0;
  align-items: center;
}

.rank-stat-plain {
  padding: 0 2px;
  min-width: 0;
}

.rank-stat-plain .text-xs.lol-muted {
  font-size: 10px;
  line-height: 1.15;
}

.rank-top-row-plain {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4px;
}

.rank-bottom-row-plain {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.rank-value-wide {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#rankText {
  font-weight: 700;
}

.recent-champs-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: auto;
}

.recent-champ-item {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  padding: var(--data-pad-sm);
}

.recent-champ-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  object-fit: cover;
  flex: 0 0 auto;
}

.recent-champ-icon-fallback {
  background: rgba(12, 18, 32, 0.35);
}

.recent-champ-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.recent-champ-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-champ-kda,
.recent-champ-wl {
  font-size: 11px;
  line-height: 1.25;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-champ-kda-sub,
.recent-champ-wr {
  font-size: 11px;
  line-height: 1.25;
  color: var(--muted);
  white-space: nowrap;
}

.recent-champ-right {
  margin-left: auto;
  text-align: right;
  flex: 0 0 auto;
  padding-top: 16px;
}

.skeleton-block {
  position: relative;
  display: inline-block;
  overflow: hidden;
  background: rgba(167, 179, 199, 0.2);
}

.skeleton-line {
  border-radius: 999px;
}

.skeleton-circle {
  border-radius: 999px;
}

.skeleton-rect {
  border-radius: 4px;
}

.skeleton-block::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.28) 52%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: skeletonShimmer 1.2s ease-in-out infinite;
}

.recent-champ-item-skeleton {
  pointer-events: none;
}

.recent-champ-item-skeleton .recent-champ-icon {
  border-color: transparent;
}

@keyframes skeletonShimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-block::after {
    animation: none;
  }
}

#champStats .champ-stat-row {
  width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 0.9fr;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 0;
  background-color: #202020;
  transition: background-color 180ms ease;
  padding: 10px 6px;
  margin-bottom: 0 !important;
}

#champStats .champ-stat-row:hover,
#champStats .champ-stat-row:active,
#champStats .champ-stat-row:focus,
#champStats .champ-stat-row:focus-visible {
  text-decoration: none;
  outline: none;
}

#champStats .champ-stat-row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 88%;
  height: 1px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.2);
}

#champStats .champ-stat-row:first-child::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 88%;
  height: 1px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.2);
  top: 0;
}

#champStats .champ-stat-row:last-child::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 88%;
  height: 1px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.2);
  bottom: 0;
}

#champStats .champ-stat-row:hover {
  background-color: #2a2a2a;
}

#champStats .champ-stat-row.champ-stat-row-skeleton {
  pointer-events: none;
}

#champStats .champ-stat-row.champ-stat-row-skeleton:hover {
  background-color: #202020;
}

#champStats {
  margin-top: 8px;
  width: calc(100% + (var(--champ-card-pad-x, 10px) * 2));
  box-sizing: border-box;
  margin-left: calc(-1 * var(--champ-card-pad-x, 10px));
  margin-bottom: 0;
  padding: 0 4px;
  background: #202020;
  border-radius: 0;
}

.champ-stat-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 0.9fr;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 0 var(--data-pad-sm);
}

.champ-stat-head > :first-child {
  padding-left: 42px;
}


.champ-stat-head-label {
  font-size: 13px;
  font-weight: 600;
  color: #f3f6fc;
  opacity: 0.7;
  line-height: 1.2;
}

.champ-stat-main {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.champ-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  object-fit: cover;
}

.champ-stat-icon-fallback {
  background: rgba(12, 18, 32, 0.35);
}

.champ-stat-name {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.champ-stat-cell {
  min-width: 0;
  display: flex;
  justify-content: flex-start;
}

.champ-stat-pair {
  display: grid;
  gap: 2px;
  justify-items: start;
}

.champ-stat-k {
  color: #e7eefb;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}

.champ-stat-v {
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  line-height: 1.1;
}

.champ-stat-v-last {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
}

.champ-stat-cell .champ-stat-k,
.champ-stat-cell .champ-stat-v {
  text-align: left;
}

.champ-stats-more-wrap {
  margin-top: auto;
  width: calc(100% + (var(--champ-card-pad-x, 10px) * 2));
  margin-left: calc(-1 * var(--champ-card-pad-x, 10px));
  margin-bottom: calc(-1 * var(--champ-card-pad-y, 8px));
}

.champ-stats-more-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 100%;
  padding: 14px 10px;
  border: 0;
  border-radius: 0.2rem;
  background: #202020;
  color: rgba(223, 232, 248, 0.4);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.champ-stats-more-link-arrow {
  width: 14px;
  height: 14px;
  font-size: 14px;
  transition: transform 160ms ease;
}

.champ-stats-more-link:hover {
  color: rgba(243, 248, 255, 0.7);
}

.champ-stats-more-link:hover .champ-stats-more-link-arrow {
  transform: translateX(2px);
}

@media (max-width: 640px) {
  .rank-card-compact {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 4px;
    min-height: 148px;
  }

  .rank-top-row-plain {
    grid-template-columns: 2fr 1fr;
  }

  .rank-bottom-row-plain {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .recent-champs-row {
    grid-template-columns: 1fr;
  }
}

.match-grid {
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr;
}

.lol-match {
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Recent match card tuning (single-row list) */
.lol-match-card {
  --card-pad-y: 8px;
  --card-pad-x: 10px;
  --card-border-w: 1px;
  --match-accent: #2d3d63;
  background: #1f2a43;
  border: var(--card-border-w) solid #2d3d63;
  border-radius: 6px;
  padding: var(--card-pad-y) var(--card-pad-x);
}

.lol-match-card.is-loss {
  --match-accent: #862c2c;
  background: #592727;
  border: 1px solid transparent;
}

.lol-match-card.is-loss:hover {
  --match-accent: #b93c3c;
  border-color: #b93c3c;
  background: #5f2a2a;
}

.lol-match-card.is-win {
  --match-accent: #1f63b5;
  background: #1f3f6d;
  border: 1px solid transparent;
}

.lol-match-card.is-win:hover {
  --match-accent: #3580dd;
  border-color: #3580dd;
  background: #224879;
}

.match-card-skeleton {
  cursor: default;
  pointer-events: none;
}

.match-card-skeleton .match-card-dropdown-btn {
  background: rgba(255, 255, 255, 0.08);
}

.match-card-layout {
  display: grid;
  grid-template-columns: 140px minmax(250px, 1.4fr) minmax(150px, 0.85fr) 26px;
  gap: 12px;
  align-items: stretch;
  min-height: 96px;
}

.match-card-left {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  padding-right: 12px;
  display: flex;
  flex-direction: column;
  align-self: start;
  min-height: 100%;
}

.match-card-left-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-left: 2px;
}

.match-card-left-bottom-meta {
  margin-top: auto;
}

.match-card-mode {
  font-size: 12px;
  font-weight: 600;
  color: #f3f6fc;
  line-height: 1.2;
}

.match-card-result {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  margin-top: 0;
  padding: 0;
}

.match-card-result.is-win {
  color: #f3f6fc;
}

.match-card-result.is-loss {
  color: #f3f6fc;
}

.match-card-ago {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.15;
  margin-top: -1px;
  margin-bottom: 3px;
}

.match-card-rank {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0 0 6px;
  border-radius: 6px;
  background: rgba(8, 12, 22, 0.36);
}

.match-card-duration {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  margin-top: -1px;
  margin-bottom: 0;
  padding-bottom: 2px;
}

.match-card-center {
  display: grid;
  grid-template-columns: 72px minmax(220px, 1fr);
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  height: 100%;
}

.match-card-center-col {
  min-width: 0;
  height: 100%;
}

.match-card-center-col-left {
  display: grid;
  gap: 6px;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.match-card-center-col-stats {
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 14px;
}

.match-card-champ-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 0;
  object-fit: cover;
}

.match-card-champ-fallback {
  background: rgba(12, 18, 32, 0.35);
}

.match-card-spells {
  display: grid;
  grid-template-columns: repeat(2, 20px);
  gap: 4px;
}

.match-card-spell {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 0;
  object-fit: cover;
}

.match-card-spell-empty {
  background: rgba(12, 18, 32, 0.35);
}

.match-card-score-line {
  color: #e7eefb;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}

.match-card-kda-ratio {
  color: #b9cbea;
  font-size: 11px;
}

.match-card-cs-line {
  color: #b9cbea;
  font-size: 11px;
}

.match-card-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  height: 46px;
  align-content: center;
  align-items: center;
}

.match-card-stat-pair {
  display: grid;
  gap: 2px;
}

.match-card-stat-k {
  color: #e7eefb;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
}

.match-card-stat-v {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  line-height: 1.1;
}

.match-card-stat-v-last {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
}

.match-card-items {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  white-space: nowrap;
}

.match-card-game-items {
  display: grid;
  grid-template-columns: repeat(7, 20px);
  gap: 3px;
  padding-right: 8px;
}

.match-card-rune-items {
  display: grid;
  grid-template-columns: 26px 20px;
  gap: 3px;
  justify-content: end;
}

.match-item {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 0;
  object-fit: cover;
  place-self: center;
}

.match-item-rune {
  border-radius: 999px;
  margin-right: 8px;
}

.match-item-rune-secondary {
  box-sizing: border-box;
  padding: 1.5px;
  background: rgba(12, 18, 32, 0.35);
}


.match-item-keystone {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(245, 214, 126, 0.7);
}

.match-item-empty {
  display: inline-block;
  background: rgba(12, 18, 32, 0.35);
}

.match-card-game-items > .match-item:nth-last-child(2),
.match-card-game-items > .match-item-empty:nth-last-child(2) {
  margin-right: 3px;
}

.match-card-rank-emblem {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.match-card-rank-text {
  font-size: 11px;
  font-weight: 600;
  color: #eef2f8;
  line-height: 1.1;
}

.match-card-right {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 10px;
  display: grid;
  gap: 6px;
  align-content: center;
  min-width: 0;
}

.match-card-dropdown-wrap {
  display: flex;
  align-items: stretch;
  margin-top: calc(-1 * (var(--card-pad-y) + var(--card-border-w)));
  margin-bottom: calc(-1 * (var(--card-pad-y) + var(--card-border-w)));
  margin-right: calc(-1 * (var(--card-pad-x) + var(--card-border-w)));
  align-self: stretch;
}

.match-card-dropdown-btn {
  width: 100%;
  min-height: 100%;
  border-radius: 0 0.2rem 0.2rem 0;
  background: var(--match-accent);
  color: rgba(255, 255, 255, 0.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.match-card-dropdown-btn svg {
  width: 14px;
  height: 14px;
  display: block;
}

.lol-match-card.is-win .match-card-left,
.lol-match-card.is-win .match-card-right {
  position: relative;
}

.lol-match-card.is-win .match-card-left {
  border-right-color: transparent;
}

.lol-match-card.is-win .match-card-right {
  border-left-color: transparent;
}

.lol-match-card.is-win .match-card-left::after {
  content: "";
  position: absolute;
  right: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.lol-match-card.is-win .match-card-right::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.lol-match-card.is-loss .match-card-left,
.lol-match-card.is-loss .match-card-right {
  position: relative;
}

.lol-match-card.is-loss .match-card-left {
  border-right-color: transparent;
}

.lol-match-card.is-loss .match-card-right {
  border-left-color: transparent;
}

.lol-match-card.is-loss .match-card-left::after {
  content: "";
  position: absolute;
  right: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.lol-match-card.is-loss .match-card-right::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}


.match-card-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.match-team-col {
  display: grid;
  gap: 2px;
}

.match-team-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.match-team-champ-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.match-team-champ-icon-empty {
  background: rgba(12, 18, 32, 0.35);
}

.match-team-name {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .match-card-layout {
    grid-template-columns: 1fr;
  }

  .match-card-left {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-right: 0;
    padding-bottom: 10px;
  }

  .match-card-right {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 0;
    padding-top: 8px;
  }

  .match-card-dropdown-wrap {
    min-height: 24px;
  }
}

#summonerName,
#summonerTag {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

#summonerTag {
  font-family: var(--font-copy-light);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 300;
}

.lol-match-card .lol-pill {
  padding: 2px var(--data-pad-md);
  font-size: 12px;
}

.lol-match-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-top: var(--data-pad-md);
  padding-top: var(--data-pad-md);
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.lol-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px var(--data-pad-md);
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

/* Tighter section spacing on profile page */
.profile-content-grid {
  margin-top: 12px !important;
}

#matchDetailsCard {
  margin-bottom: 10px !important;
}

#matchDetailsCard[hidden] {
  display: none !important;
}

main > section.mt-6.lol-surface {
  margin-top: 12px !important;
}
