/* Brymon Design Tokens */
:root {
  --background: #0e1117;
  --background-deep: #080b10;
  --surface: #171b24;
  --surface-light: #202633;
  --surface-dark: #10141c;
  --text: #f5f7fa;
  --text-muted: #aab2c0;
  --text-subtle: #778195;
  --accent: #f4c542;
  --accent-dark: #d9aa23;
  --accent-light: #ffda69;
  --blue: #2869df;
  --blue-light: #5b8ff3;
  --blue-dark: #153c8d;
  --border: #303848;
  --border-light: rgba(255, 255, 255, 0.08);
  --success: #52c77a;
  --warning: #ffbd59;
  --danger: #ff7474;
  --max-width: 1120px;
  --radius-small: 0.5rem;
  --radius-medium: 0.75rem;
  --radius-large: 1rem;
  --radius-extra-large: 1.5rem;
  --shadow-small: 0 8px 24px rgba(0, 0, 0, 0.18);
  --shadow-medium: 0 18px 45px rgba(0, 0, 0, 0.28);
  --shadow-large: 0 30px 80px rgba(0, 0, 0, 0.42);
  --app-background: #07162f;
  --app-header: #08172f;
  --app-panel: #0d1e3d;
  --app-panel-dark: #0a1933;
  --app-input: #091a36;
  --app-border: #29466f;
  --app-border-strong: #315783;
  --app-blue: #1484f5;
  --app-muted: #94a3b8;
}

/* Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}
img {
  display: block;
  max-width: 100%;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  max-width: 800px;
  margin-bottom: 1.5rem;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}
h3 {
  line-height: 1.2;
}
.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

/* Header and Navigation */
.site-header {
  position: relative;
  z-index: 20;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--app-header);
}
.navigation {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2.5rem;
  min-height: 82px;
}
.navigation.container {
  width: min(calc(100% - 3rem), 1380px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
}

.logo-symbol {
  width: 42px;
  height: 42px;
}

.logo-wordmark {
  height: 34px;
  width: auto;
}

.primary-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}
.primary-navigation a {
  position: relative;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms ease;
}
.primary-navigation a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.5rem;
  left: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 150ms ease;
}
.primary-navigation a:hover {
  color: var(--accent);
}
.primary-navigation a:hover::after {
  transform: scaleX(1);
}
.navigation-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.navigation-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  min-height: 46px;
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}
.navigation-button:hover {
  transform: translateY(-2px);
}
.navigation-button--login {
  border: 2px solid var(--blue);
  background: transparent;
  color: var(--text);
}
.navigation-button--login:hover {
  border-color: var(--blue-light);
  background: rgba(40, 105, 223, 0.12);
}
.navigation-button--register {
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #111827;
}
.navigation-button--register:hover {
  border-color: var(--accent-light);
  background: var(--accent-light);
}

.account-menu {
  position: relative;
}

.account-menu-button {
  gap: 0.55rem;
}

.account-menu-chevron {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.account-menu-button[aria-expanded="true"]
  .account-menu-chevron {
  transform: rotate(180deg);
}

.account-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;

    width: 200px;

    background: #1a2848;      
    border: 1px solid #35599a;
    border-radius: 14px;

    box-shadow:
        0 12px 35px rgba(0,0,0,.45),
        0 0 0 1px rgba(255,255,255,.03);

    overflow: hidden;
}

.account-menu-dropdown form {
  margin: 0;
}

.account-menu-link {
    display: flex;
    align-items: center;

    width: 100%;
    padding: .9rem 1rem;

    background: transparent;
    border: none;

    color: #f7b3b3;
    font-weight: 600;

    transition: background .15s ease;
}

.account-menu-link:hover {
    background: rgba(255,255,255,.06);
}

.account-menu-logout {
  color: #ffb4b4;
}

.mobile-navigation-username {
  padding: 0.75rem 0;
  color: var(--app-muted-text);
  font-size: 0.9rem;
}

.mobile-navigation-username strong {
  display: block;
  margin-top: 0.15rem;
  color: var(--app-text);
}

/* Reusable Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}
.button:hover {
  transform: translateY(-1px);
}
.button:active {
  transform: translateY(0);
}
.button-primary {
  background: var(--accent);
  color: #171717;
}
.button-primary:hover {
  background: var(--accent-dark);
}
.button-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}
.button-secondary:hover {
  background: var(--surface-light);
}

/* Homepage */
.status-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  width: fit-content;
  margin-bottom: 2rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 189, 89, 0.4);
  border-radius: var(--radius-medium);
  background: rgba(255, 189, 89, 0.08);
  color: var(--warning);
}
.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Homepage Hero */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 1rem 0 2rem;
  background:
    radial-gradient(
      circle at 75% 35%,
      rgba(40, 105, 223, 0.22),
      transparent 40%
    ),
    linear-gradient(135deg, #08152c, #071329 60%, #061126);
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(91, 143, 243, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 143, 243, 0.15) 1px, transparent 1px);
  background-size: 64px 64px;
}
.home-hero-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(500px, 1.15fr);
  align-items: center;
  gap: 3rem;
}
.home-hero-content {
  position: relative;
  z-index: 2;
  padding-block: 2rem;
}
.home-hero-eyebrow {
  display: inline-flex;
  margin-bottom: 1.5rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(244, 197, 66, 0.7);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.home-hero h1 {
  max-width: 680px;
  margin-bottom: 1.5rem;
  font-size: clamp(3.25rem, 6vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}
.home-hero h1 span {
  display: block;
}
.home-hero-description {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.55;
}
.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.home-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 470px;
}
.home-hero-image-wrapper {
  position: absolute;
  top: 0;
  right: -7rem;
  bottom: 0;
  left: -3rem;
  overflow: visible;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
.home-hero-image-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(7, 19, 41, 0.15) 60%,
    rgba(7, 19, 41, 0.45) 78%,
    rgba(7, 19, 41, 0.85) 92%,
    #071329 100%
  );
  pointer-events: none;
}
.home-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    black 55%,
    transparent 100%
  );
  mask-image: radial-gradient(ellipse at center, black 55%, transparent 100%);
}

/* Homepage Features */
.home-features {
  position: relative;
  z-index: 2;
  padding: 0 0 5rem;
  background: #071329;
}
.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.home-feature-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 130px;
  padding: 1.25rem;
  border: 1px solid rgba(66, 112, 203, 0.48);
  border-radius: 1rem;
  background: rgba(23, 46, 91, 0.8);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}
.home-feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 143, 243, 0.82);
  background: rgba(28, 57, 111, 0.92);
}
.home-feature-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(65, 126, 235, 0.65);
  border-radius: 14px;

  background:
    linear-gradient(
      145deg,
      rgba(42, 91, 180, 0.55),
      rgba(19, 48, 103, 0.85)
    );

  color: #4e8cff;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 20px rgba(0, 35, 100, 0.18);
}

.home-feature-icon svg {
  width: 28px;
  height: 28px;

  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-feature-card:nth-child(2) .home-feature-icon,
.home-feature-card:nth-child(4) .home-feature-icon {
  color: #ffd13f;
}

.status-banner--launch {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;

  padding: 0.8rem 1rem;

  border: 1px solid rgba(72, 199, 142, 0.45);
  border-radius: 10px;

  background: rgba(32, 126, 88, 0.12);
  color: #b8f5d7;
}

.status-banner--launch strong {
  color: #5be0a1;
}

.status-indicator {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;

  border-radius: 50%;

  background: #4ddb98;

  box-shadow:
    0 0 0 5px rgba(77, 219, 152, 0.12);
}
.home-feature-card h3 {
  margin-bottom: 0.3rem;
  font-size: 1rem;
}
.home-feature-card p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

/* How It Works */
.how-it-works {
  padding: 7rem 0;
  background:
    radial-gradient(
      circle at center,
      rgba(32, 79, 167, 0.1),
      transparent 52%
    );
}

.how-it-works .section-heading {
  max-width: 760px;
  margin: 0 auto 3rem;
  text-align: center;
}

.steps-grid {
  position: relative;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.steps-grid::before {
  content: "";

  position: absolute;
  top: 48px;
  left: 16%;
  right: 16%;
  z-index: 0;

  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(70, 126, 224, 0.65),
      rgba(70, 126, 224, 0.65),
      transparent
    );
}

.step-card {
  position: relative;
  z-index: 1;

  min-width: 0;
  padding: 1.5rem;

  display: flex;
  align-items: flex-start;
  gap: 1rem;

  border: 1px solid rgba(57, 96, 158, 0.7);
  border-radius: 16px;

  background:
    linear-gradient(
      145deg,
      rgba(24, 47, 91, 0.95),
      rgba(13, 31, 63, 0.95)
    );

  box-shadow:
    0 18px 35px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(76, 139, 245, 0.95);

  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.2),
    0 0 24px rgba(38, 96, 196, 0.1);
}

.step-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(73, 132, 230, 0.75);
  border-radius: 15px;

  background:
    linear-gradient(
      145deg,
      rgba(43, 91, 181, 0.68),
      rgba(20, 51, 110, 0.9)
    );

  color: #ffd03f;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 20px rgba(0, 25, 80, 0.2);
}

.step-icon svg {
  width: 27px;
  height: 27px;

  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step-content {
  min-width: 0;
}

.step-label {
  display: inline-block;
  margin-bottom: 0.35rem;

  color: #4f8fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step-card h3 {
  margin: 0 0 0.45rem;
  color: #ffffff;
  font-size: 1.05rem;
}

.step-card p {
  margin: 0;

  color: #a9c1e8;
  font-size: 0.92rem;
  line-height: 1.55;
}
/* Accessibility Helpers */
.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Project Status */
.project-status {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}
.status-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--background);
}
.status-card p {
  color: var(--text-muted);
}
.status-label {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.status-complete {
  color: var(--success);
}
.status-active {
  color: var(--warning);
}

/* About Page */
.about-page {
  background:
    radial-gradient(
      circle at 20% 25%,
      rgba(40, 105, 223, 0.1),
      transparent 32%
    ),
    var(--background);
}
.about-hero {
  padding: 3rem 0 4.5rem;
}
.about-hero h1 {
  max-width: 920px;
  margin-bottom: 1.5rem;
  font-size: clamp(3.2rem, 7vw, 5.6rem);
  line-height: 0.98;
}
.about-introduction {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.7;
}

.about-benefit-icon,
.audience-icon,
.about-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.about-benefit-icon svg,
.audience-icon svg,
.about-feature-icon svg {
  width: 22px;
  height: 22px;

  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about-version {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 800;
}

.about-version-list {
  margin-bottom: 1.5rem;
}

.about-technology-groups {
  display: grid;
  gap: 1.25rem;
}

.about-technology-groups h3 {
  margin-bottom: 0.5rem;
  color: var(--blue-light);
  font-size: 0.95rem;
}

/* Main overview */
.about-overview {
  padding-bottom: 1.5rem;
}
.about-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(300px, 0.95fr);
  gap: 1.5rem;
}
.about-main-card,
.about-audience-card,
.about-features-card,
.about-source-card,
.about-project-card {
  border: 1px solid rgba(74, 118, 203, 0.42);
  border-radius: 1rem;
  background: rgba(17, 34, 67, 0.82);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}
.about-main-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 2rem;
  min-height: 410px;
  padding: 2.25rem;
}
.about-artwork {
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-artwork img {
  width: min(100%, 390px);
  height: auto;
  filter: drop-shadow(0 22px 35px rgba(0, 0, 0, 0.28));
}
.about-main-content h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
}
.about-main-content h2 span {
  color: var(--accent);
}
.about-main-content > p {
  color: var(--text-muted);
  line-height: 1.5;
}
.about-main-content .about-main-lead {
  color: var(--text);
  font-weight: 700;
}
.about-benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}
.about-benefit {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.about-benefit-icon,
.audience-icon,
.about-feature-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(91, 143, 243, 0.35);
  border-radius: 50%;
  background: rgba(40, 105, 223, 0.3);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
}
.about-benefit h3 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}
.about-benefit p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Audience */
.about-audience-card {
  padding: 2rem;
}
.about-card-eyebrow {
  margin-bottom: 2rem;
  color: var(--blue);
  font-size: 1.25rem;
  font-weight: 800;
}
.audience-list {
  display: grid;
  gap: 2rem;
}
.audience-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.audience-item h3 {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}
.audience-item p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* Features and API */
.about-details {
  padding: 1.5rem 0;
}
.about-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(300px, 0.95fr);
  gap: 1.5rem;
}
.about-features-card {
  padding: 2rem;
}
.about-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.25rem 1.5rem;
}
.about-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.about-feature-item h3 {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}
.about-feature-item p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}
.about-source-card {
  padding: 2rem;
}
.about-source-card > p:not(.about-card-eyebrow) {
  color: var(--text-muted);
  line-height: 1.45;
}
.about-source-card a {
  display: inline-block;
  color: var(--blue-light);
  font-weight: 700;
}
.about-source-card a:hover {
  color: var(--accent);
}
.pokeapi-logo-link {
  display: block;
  width: fit-content;
  margin: 2rem 0 1.5rem;
  border-radius: 0.75rem;
  transition:
    transform 160ms ease,
    filter 160ms ease;
}
.pokeapi-logo-link:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 12px 18px rgba(40, 105, 223, 0.28));
}
.pokeapi-logo-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 6px;
}
.pokeapi-logo {
  display: block;
  width: min(100%, 240px);
  height: auto;
}
.pokeapi-text-link {
  display: inline-block;
  color: var(--blue-light);
  font-weight: 700;
  text-decoration: none;
}
.pokeapi-text-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Portfolio details */
.about-project-details {
  padding: 4rem 0 6rem;
}
.about-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.about-project-card {
  padding: 1.75rem;
}
.about-project-card h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.about-project-card p,
.about-project-card li {
  color: var(--text-muted);
}
.about-project-card p {
  margin-bottom: 0;
}
.about-project-card ul {
  margin: 0;
  padding-left: 1.25rem;
}
.about-project-card li + li {
  margin-top: 0.45rem;
}

/* Saved Team Page */
.saved-teams-page {
  min-height: calc(100vh - 90px);
  padding: 2rem 1.5rem 4rem;
  background: var(--app-background);
  color: #f8fafc;
}
.saved-teams-container {
  width: min(1400px, 100%);
  margin: 0 auto;
}
.saved-teams-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
}
.saved-teams-heading h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.1;
}
.saved-teams-heading p {
  margin: 0 0 0.65rem;
  color: var(--app-muted);
  font-size: 1.1rem;
}
.saved-teams-count {
  color: #0866d5;
  font-weight: 600;
}
.saved-teams-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.team-search {
  position: relative;
  width: 260px;
}
.team-search-icon {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  color: var(--app-muted);
  transform: translateY(-50%);
  pointer-events: none;
}
.team-search input,
.team-sort select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--app-border);
  border-radius: 7px;
  background: var(--app-input);
  color: #f8fafc;
  font: inherit;
}
.team-search input {
  padding: 0.7rem 1rem 0.7rem 2.6rem;
}
.team-sort {
  width: 260px;
}
.team-sort select {
  padding: 0.7rem 2.5rem 0.7rem 1rem;
}
.team-search input::placeholder {
  color: var(--app-muted);
}
.team-search input:focus,
.team-sort select:focus {
  border-color: #0875e1;
  outline: 2px solid rgb(8 117 225 / 20%);
}
.view-buttons {
  display: flex;
  gap: 0.5rem;
}
.view-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--app-border);
  border-radius: 7px;
  background: var(--app-input);
  color: #0866d5;
  font-size: 1.4rem;
  cursor: pointer;
}
.view-button:hover,
.view-button.active {
  border-color: #0875e1;
  background: #10284d;
}
.teams-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.teams-grid.teams-grid--list {
  grid-template-columns: 1fr;
}

.teams-grid.teams-grid--list .saved-team-card {
  display: grid;
  grid-template-columns:
    minmax(180px, 1fr)
    minmax(300px, 1.5fr)
    auto;
  align-items: center;
  gap: 1.5rem;
  min-height: auto;
}

.teams-grid.teams-grid--list
  .saved-team-card-header {
  align-self: start;
}

.teams-grid.teams-grid--list
  .team-pokemon-preview {
  margin-top: 0;
}

.teams-grid.teams-grid--list
  .saved-team-notes {
  grid-column: 1 / -1;
  margin: 0;
}

.teams-grid.teams-grid--list
  .saved-team-summary {
  margin-top: 0;
}

.teams-grid.teams-grid--list
  .view-team-button {
  width: 160px;
  margin-top: 0;
}

.teams-grid.teams-grid--list
  .create-team-card {
  min-height: 140px;
}

.team-card-menu {
    position: relative;
    top: 1rem;
    right: 1rem;
}

.team-card-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    border: none;
    border-radius: 8px;

    background: transparent;
    color: #b9c8e0;

    cursor: pointer;

    font-size: 1.3rem;

    transition: background 150ms;
}

.team-card-menu-button:hover {
    background: rgba(255,255,255,.08);
}

.team-card-menu-dropdown {
    position: absolute;

    top: 42px;
    right: 0;

    width: 180px;

    overflow: hidden;

    border: 1px solid var(--app-border);
    border-radius: 10px;

    background: #14284b;

    box-shadow:
        0 12px 30px rgba(0,0,0,.35);

    z-index: 100;
}

.team-card-menu-item {
    display: block;

    width: 100%;

    padding: .8rem 1rem;

    border: none;

    background: transparent;

    color: white;

    text-align: left;
    text-decoration: none;

    cursor: pointer;

    font: inherit;
}

.team-card-menu-item:hover {
    background: rgba(255,255,255,.06);
}

.team-card-menu-delete {
    color: #ff7373;
}

.team-card-menu-delete:hover {
    background: rgba(255,60,60,.12);
}

.saved-team-card {
  display: flex;
  position: relative;
  height: 100%;
  min-height: 350px;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: #0e1e3c;
}
.saved-team-card[hidden] {
  display: none;
}
.saved-team-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.saved-team-card h2 {
  margin: 0;
  font-size: 1.15rem;
}
.saved-team-updated {
  margin: 0.45rem 0 0;
  color: #9fb4d2;
  font-weight: 600;
}
.team-menu-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--app-muted);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.team-menu-button:hover {
  color: #ffffff;
}
.team-pokemon-preview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}
.pokemon-preview-slot {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid #31588e;
  border-radius: 6px;
  background: #0b1933;
  color: #6985ab;
  font-size: 1.5rem;
}
.saved-team-notes {
  display: -webkit-box;
  margin: 1rem 0 0;
  overflow: hidden;
  color: #b2bfd3;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.saved-team-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
  margin-top: 1.25rem;
  text-align: center;
}

.team-summary-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.team-summary-label {
  color: #f8fafc;
  font-weight: 600;
}
.team-summary-item strong {
  color: #dce7f6;
}

.saved-team-types {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: center;
  gap: 0.3rem;
  min-height: 64px;
  overflow: visible;
}

.saved-team-types .pokemon-type-badge {
  min-height: 19px;
  font-size: 0.62rem;
  padding: 0.08rem 0.35rem;
  font-size: 0.65rem;
  line-height: 1;
}

.view-team-button {
  align-self: center;
  width: min(190px, 100%);
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  border: 2px solid #0866d5;
  border-radius: 9px;
  color: #ffffff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.view-team-button:hover {
  background: #0866d5;
}
.create-team-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 145px;
  padding: 1.5rem;
  border: 1px dashed #31588e;
  border-radius: 10px;
  background: #0c1b37;
  color: #ffffff;
  text-decoration: none;
}
.create-team-card:hover {
  border-color: #0875e1;
  background: #102445;
}
.create-team-icon {
  display: grid;
  flex: 0 0 90px;
  place-items: center;
  width: 90px;
  height: 90px;
  border: 3px solid #31588e;
  border-radius: 50%;
  color: #d9e5f5;
  font-size: 3rem;
  font-weight: 300;
}
.create-team-content {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.create-team-content strong {
  font-size: 1.05rem;
}
.create-team-content small {
  color: #c1ccdc;
  font-size: 0.9rem;
  font-weight: 600;
}
.teams-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
  margin: 5rem auto;
  padding: 3rem 2rem;
  border: 1px dashed #31588e;
  border-radius: 12px;
  background: #0e1e3c;
  text-align: center;
}
.teams-empty-icon {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  margin-bottom: 1.5rem;
  border: 3px solid #31588e;
  border-radius: 50%;
  color: #ffffff;
  font-size: 3rem;
}
.teams-empty-state h2 {
  margin: 0 0 0.75rem;
}
.teams-empty-state p {
  margin: 0 0 1.5rem;
  color: var(--app-muted);
}
.teams-primary-button {
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  background: #ffc400;
  color: var(--app-background);
  font-weight: 800;
  text-decoration: none;
}
.teams-primary-button:hover {
  background: #ffd43b;
}
.pokemon-preview-slot {
  overflow: hidden;
}

.pokemon-preview-slot img {
  display: block;
  width: 90%;
  height: 90%;
  object-fit: contain;
}

.pokemon-preview-slot.is-populated {
  border-color: #3d6da8;
  background: #102445;
}

.teams-grid {
  align-items: stretch;
}

.saved-team-card {
  height: 100%;
}

/* Team Detail Page */
.team-detail-page {
  min-height: calc(100vh - 90px);
  padding: 2rem 1.5rem 4rem;
  background: var(--app-background);
  color: #f8fafc;
}

.team-detail-container {
  width: min(1400px, 100%);
  margin: 0 auto;
}

.team-detail-back-link {
  display: inline-flex;
  margin-bottom: 0.75rem;
  color: #cbd7e8;
  font-weight: 600;
  text-decoration: none;
}

.team-detail-back-link:hover {
  color: var(--app-blue);
  text-decoration: underline;
}

.team-detail-header {
  margin-bottom: 1.5rem;
}

.team-detail-header h1 {
  margin: 0;
  font-size: clamp(2.75rem, 6vw, 5rem);
  line-height: 1;
}

.team-detail-notes {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--app-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.team-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.team-detail-edit-button,
.delete-team-button {
  display: inline-flex;
  min-width: 150px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: 9px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.team-detail-edit-button {
  border: 2px solid #0866d5;
  background: transparent;
  color: #ffffff;
}

.team-detail-edit-button:hover {
  background: #0866d5;
}

.delete-team-form {
  margin: 0;
}

.delete-team-button {
  border: 2px solid #d64550;
  background: transparent;
  color: #ff737c;
}

.delete-team-button:hover {
  background: rgba(214, 69, 80, 0.14);
}

.team-detail-pokemon-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.team-detail-pokemon-card {
  display: flex;
  min-width: 0;
  min-height: 340px;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: #0e1e3c;
}

.team-detail-pokemon-image {
  width: 100%;
  height: 170px;
  object-fit: contain;
}

.team-detail-pokemon-content {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}

.team-detail-pokemon-card h2 {
  margin: 0.75rem 0 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: normal;
}

.pokemon-species {
  margin: 0.2rem 0 0;
  color: var(--app-muted);
  font-size: 0.85rem;
}

.team-detail-slot {
  margin: 0.2rem 0 0;
  color: #dce7f6;
}

.team-detail-ability {
  margin: auto 0 0;
  padding-top: 1rem;
  color: #dce7f6;
  line-height: 1.45;
}

.team-analysis {
  margin-top: 3rem;
}

.team-analysis-header {
  margin-bottom: 1.75rem;
}

.team-analysis-header h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
}

.team-analysis-header p {
  max-width: 680px;
  margin: 0;
  color: var(--app-muted);
  line-height: 1.5;
}

.team-analysis-status {
  padding: 1.5rem;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: #0e1e3c;
  color: var(--app-muted);
  text-align: center;
}

.team-analysis-content {
  display: grid;
  gap: 2rem;
}

.team-analysis-content[hidden] {
  display: none;
}

.team-analysis-card {
  min-width: 0;
}

.team-analysis-card h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

/* Analysis grids */

.analysis-type-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  grid-auto-rows: max-content;
  gap: 0.75rem;
}

/* Shared base card */

.analysis-type-item {
  min-width: 0;
  height: fit-content;
  border: 1px solid rgba(49, 88, 142, 0.75);
  border-radius: 9px;
  background: #0d1d39;
}

/* Static cards, such as Team Types */

.analysis-type-item:not(.analysis-type-details) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
  padding: 0.85rem;
}

.analysis-type-item:not(.analysis-type-details)
  .analysis-type-item-content {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  flex-direction: column;
  gap: 0.15rem;
  text-align: right;
}

/* Expandable weakness and immunity cards */

.analysis-type-details {
  display: block;
  align-self: start;
  overflow: hidden;
}

.analysis-type-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 20px;
  align-items: center;
  gap: 0.85rem;
  min-height: 70px;
  padding: 0.85rem;
  cursor: pointer;
  list-style: none;
  transition: background-color 150ms ease;
}

.analysis-type-summary::-webkit-details-marker {
  display: none;
}

.analysis-type-summary::marker {
  content: "";
}

.analysis-type-summary:hover {
  background: rgba(49, 88, 142, 0.14);
}

.analysis-type-summary:focus-visible {
  outline: 2px solid var(--app-blue);
  outline-offset: -2px;
}

.analysis-type-details[open]
  .analysis-type-summary {
  border-bottom: 1px solid var(--app-border);
}

.analysis-type-item-content {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  flex-direction: column;
  gap: 0.15rem;
  text-align: right;
}

.analysis-type-item-content strong {
  color: #f8fafc;
  font-size: 0.9rem;
  line-height: 1.2;
}

.analysis-severity {
  font-size: 0.73rem;
  font-weight: 800;
  line-height: 1.2;
}

.analysis-severity-major {
  color: #ff7474;
}

.analysis-severity-moderate {
  color: #ff9f59;
}

.analysis-severity-minor {
  color: #f4c542;
}

.analysis-severity-positive {
  color: #52c77a;
}

.analysis-severity-neutral {
  color: #9fb4d2;
}

/* Dropdown arrow */

.analysis-expand-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #8ea4c2;
  font-size: 1rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.analysis-type-details[open]
  .analysis-expand-icon {
  transform: rotate(180deg);
}

/* Expanded Pokémon list */

.analysis-pokemon-breakdown {
  padding: 0.85rem;
  background: rgba(5, 16, 34, 0.35);
}

.analysis-breakdown-heading {
  margin: 0 0 0.65rem;
  color: var(--app-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.analysis-pokemon-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.analysis-pokemon-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #dce7f6;
  font-size: 0.85rem;
}

.analysis-damage-multiplier {
  flex-shrink: 0;
  color: #ff9f59;
  font-size: 0.8rem;
  font-weight: 800;
}

/* Empty states */

.analysis-empty-message {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.25rem;
  border: 1px solid var(--app-border);
  border-radius: 9px;
  background: #0d1d39;
  color: var(--app-muted);
  text-align: center;
}

/* Type badge sizing inside analysis */

.team-analysis .pokemon-type-badge {
  flex-shrink: 0;
  min-height: 22px;
  padding: 0.16rem 0.5rem;
  font-size: 0.7rem;
}

.team-analysis-summary {
  padding: 1.25rem;
  border: 1px solid rgba(49, 88, 142, 0.8);
  border-radius: 12px;
  background:
    linear-gradient(
      135deg,
      rgba(20, 132, 245, 0.08),
      transparent 60%
    ),
    #0d1d39;
}

.team-analysis-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.team-analysis-summary-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.team-analysis-summary-label {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(20, 132, 245, 0.14);
  color: #8dc5ff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.team-analysis-summary-list {
  display: grid;
  grid-template-columns: repeat(
    2,
    minmax(0, 1fr)
  );
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-analysis-summary-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid rgba(49, 88, 142, 0.55);
  border-radius: 9px;
  background: rgba(7, 22, 47, 0.65);
  color: #dce7f6;
  font-size: 0.88rem;
  line-height: 1.45;
}

.team-analysis-summary-icon {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 900;
}

.summary-warning
  .team-analysis-summary-icon {
  background: rgba(255, 159, 89, 0.15);
  color: #ff9f59;
}

.summary-positive
  .team-analysis-summary-icon {
  background: rgba(82, 199, 122, 0.15);
  color: #52c77a;
}

.summary-neutral
  .team-analysis-summary-icon {
  background: rgba(91, 143, 243, 0.15);
  color: #8db4ff;
}

/* Team Builder Page */
.team-builder-page {
  min-height: calc(100vh - 80px);
  padding: 2.5rem 0 4rem;
  background: var(--app-background);
  color: #f8fafc;
}
.team-builder-page .container {
  width: min(calc(100% - 3rem), 1500px);
  margin-inline: auto;
}
.team-builder-form {
  width: 100%;
}

/* Main Three-Column Layout */
.team-builder-layout {
  display: grid;
  grid-template-columns:
    minmax(300px, 340px)
    minmax(600px, 1fr)
    minmax(250px, 280px);
  gap: 1.5rem;
  align-items: start;
}
.pokemon-browser,
.team-summary-sidebar {
  align-self: start;
}
.pokemon-browser,
.builder-workspace,
.team-summary-sidebar {
  min-width: 0;
}
.builder-workspace {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.pokemon-browser,
.team-summary-sidebar {
  display: flex;
}
.builder-panel {
  width: 100%;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-panel);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.15);
}

/* Shared Form Controls */
.team-builder-page .form-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.6rem;
}
.team-builder-page label,
.team-builder-page legend {
  color: #f8fafc;
  font-size: 0.92rem;
  font-weight: 700;
}
.team-builder-page input,
.team-builder-page textarea,
.team-builder-page select {
  width: 100%;
  border: 1px solid var(--app-border-strong);
  border-radius: 8px;
  background-color: var(--app-header);
  color: #f8fafc;
  font: inherit;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}
.team-builder-page input,
.team-builder-page select {
  min-height: 46px;
  padding: 0.72rem 0.85rem;
}
.team-builder-page textarea {
  min-height: 130px;
  padding: 0.85rem;
  line-height: 1.5;
  resize: vertical;
}
.team-builder-page input::placeholder,
.team-builder-page textarea::placeholder {
  color: #7185a2;
}
.team-builder-page input:focus,
.team-builder-page textarea:focus,
.team-builder-page select:focus {
  border-color: var(--app-blue);
  outline: none;
  background-color: #0a1c39;
  box-shadow: 0 0 0 3px rgba(20, 132, 245, 0.16);
}
.team-builder-page select {
  appearance: none;
  padding-right: 2.5rem;
  background-image:
    linear-gradient(45deg, transparent 50%, #9fb0c7 50%),
    linear-gradient(135deg, #9fb0c7 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 19px,
    calc(100% - 12px) 19px;
  background-repeat: no-repeat;
  background-size: 5px 5px;
}
.field-error {
  margin: 0;
  color: #ff9696;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Search */
.pokemon-search-results {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow-y: auto;
}

.pokemon-search-result {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: rgba(18, 42, 82, 0.75);
}

.pokemon-search-result:hover {
  border-color: var(--blue);
  background: rgba(24, 52, 99, 0.95);
}

.pokemon-search-result-image {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.pokemon-search-result-content {
  min-width: 0;
}

.pokemon-search-result-heading {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.pokemon-search-result-name {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pokemon-search-result-number {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.pokemon-search-result-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pokemon-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.72rem;
}

.pokemon-result-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--blue);
  border-radius: 0.45rem;
  background: rgba(40, 105, 223, 0.15);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.pokemon-result-add-button:hover {
  background: var(--blue);
}

.pokemon-result-add-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.pokemon-search-status {
  padding: 1rem 0;
  color: var(--text-muted);
  text-align: center;
}

.pokemon-search-status {
  display: flex;
  min-height: 140px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  color: var(--text-muted);
  text-align: center;
}

.pokemon-search-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(91, 143, 243, 0.25);
  border-top-color: var(--app-blue);
  border-radius: 50%;
  animation: pokemon-search-spin 0.75s linear infinite;
}

@keyframes pokemon-search-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pokemon-search-spinner {
    animation-duration: 1.5s;
  }
}

/* Alerts */
.alert {
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
}
.alert.error {
  border: 1px solid rgba(255, 98, 98, 0.5);
  background: rgba(138, 32, 32, 0.24);
  color: #ffb8b8;
}

.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  width: min(380px, calc(100% - 2rem));
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: #102445;
  color: #f8fafc;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transform: translateY(-12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  pointer-events: auto;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-color: rgba(82, 199, 122, 0.75);
}

.toast-error {
  border-color: rgba(255, 116, 116, 0.75);
}

.toast-info {
  border-color: rgba(91, 143, 243, 0.75);
}

.toast-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 900;
}

.toast-success .toast-icon {
  background: rgba(82, 199, 122, 0.18);
  color: var(--success);
}

.toast-error .toast-icon {
  background: rgba(255, 116, 116, 0.18);
  color: var(--danger);
}

.toast-info .toast-icon {
  background: rgba(91, 143, 243, 0.18);
  color: var(--blue-light);
}

.toast-content {
  min-width: 0;
}

.toast-title {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.95rem;
}

.toast-message {
  margin: 0;
  color: #bdc9da;
  font-size: 0.88rem;
  line-height: 1.45;
}

.toast-close {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--app-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.toast-close:hover {
  color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: none;
  }
}

/* Buttons */
.team-builder-page .button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}
.team-builder-page .button:hover {
  transform: translateY(-1px);
}
.team-builder-page .button-primary {
  background: #ffc400;
  color: var(--app-background);
  box-shadow: 0 8px 24px rgba(255, 196, 0, 0.2);
}
.team-builder-page .button-primary:hover {
  background: #ffd43b;
  box-shadow: 0 10px 28px rgba(255, 196, 0, 0.28);
}
.team-builder-page .button-secondary {
  border-color: var(--app-border-strong);
  background: transparent;
  color: #dce8f7;
}
.team-builder-page .button-secondary:hover {
  border-color: var(--app-blue);
  background: #14294c;
}

.team-builder-page .button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.team-builder-page .button:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Left Sidebar: Pokémon Browser */
.pokemon-search-panel {
  display: flex;
  min-height: 900px;
  flex-direction: column;
  padding: 1.25rem;
}
.panel-header {
  margin-bottom: 1rem;
}
.panel-header h2 {
  margin: 0;
  color: var(--app-blue);
  font-size: 1rem;
}
.pokemon-browser-filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}
.clear-filters-button {
  align-self: center;
  width: auto;
}
.pokemon-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #45617e;
}
.pokemon-list-header h3 {
  margin: 0;
  color: var(--app-blue);
  font-size: 0.95rem;
}
.pokemon-result-count {
  color: #9fb0c7;
  font-size: 0.9rem;
  white-space: nowrap;
}
.pokemon-search-results {
  display: flex;
  min-height: 280px;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding-top: 1rem;
}
.pokemon-search-empty {
  display: flex;
  max-width: 220px;
  align-items: center;
  flex-direction: column;
  text-align: center;
}
.search-empty-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 1rem;
  place-items: center;
  border: 2px solid #3e679a;
  border-radius: 50%;
  color: #a9c5e7;
  font-size: 1.35rem;
  font-weight: 700;
}
.pokemon-search-empty h3 {
  margin: 0;
  font-size: 1rem;
}
.pokemon-search-empty p {
  margin: 0.45rem 0 0;
  color: #8398b5;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Center Workspace Header */
.team-builder-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.team-builder-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.team-builder-action {
  min-width: 150px;
  min-height: 48px;
  padding: 0.75rem 1.1rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  white-space: nowrap;

  font-weight: 700;
  line-height: 1;
}

.team-builder-action.button-primary {
  border: 1px solid #ffc629;
  background: #ffc629;
  color: #07162f;

  box-shadow: 0 8px 20px rgba(255, 198, 41, 0.2);
}

.team-builder-action.button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255, 198, 41, 0.28);
}

.team-builder-action.button-secondary {
  border: 1px solid #365d91;
  background: #10213f;
  color: #f4f7ff;
}

.team-builder-action.button-secondary:hover {
  border-color: #4f86c9;
  background: #152b50;
  transform: translateY(-1px);
}

.team-builder-action:focus-visible {
  outline: 3px solid rgba(255, 198, 41, 0.35);
  outline-offset: 3px;
}

.team-builder-action:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.team-builder-topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.1;
}
.team-builder-topbar p {
  margin: 0.4rem 0 0;
  color: #9fb0c7;
}
.team-name-field {
  max-width: 420px;
}

/* Team Slots */
.team-preview {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.team-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.team-slot {
  position: relative;
  display: flex;
  min-height: 185px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  border: 1px dashed var(--app-border-strong);
  border-radius: 12px;
  background:
    radial-gradient(
      circle at center,
      rgba(46, 129, 226, 0.11),
      transparent 60%
    ),
    rgba(13, 30, 61, 0.6);
  color: #dce8f7;
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}
.team-slot:hover {
  border-color: var(--app-blue);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}
.team-slot:focus-visible {
  outline: 3px solid rgba(20, 132, 245, 0.35);
  outline-offset: 3px;
}
.slot-index {
  position: absolute;
  top: 0.8rem;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #1260bd;
  color: #fff;
  font-weight: 800;
}
.slot-plus {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 2px solid #3e679a;
  border-radius: 50%;
  color: #eaf4ff;
  font-size: 1.9rem;
  font-weight: 300;
  line-height: 1;
}
.slot-number {
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 600;
}
.team-slot[data-populated="true"] {
  border-style: solid;
}
.team-slot.is-selected {
  border-color: #ffc400;
  box-shadow: 0 0 0 3px rgba(255, 196, 0, 0.16);
}

/* Selected Pokémon Panel */
/* =========================================================
   Selected Pokémon Panel
========================================================= */

.selected-pokemon-panel {
  min-height: 270px;
  padding: 1.25rem;
}

.selected-pokemon-heading {
  margin-bottom: 1rem;
}

.selected-pokemon-heading h2 {
  margin: 0;
  color: var(--app-blue);
  font-size: 1rem;
}

.selected-pokemon-heading p {
  margin: 0.35rem 0 0;
  color: #8398b5;
  font-size: 0.9rem;
}

.selected-pokemon-empty {
  display: flex;
  min-height: 210px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.selected-pokemon-empty[hidden],
.selected-pokemon-editor[hidden] {
  display: none;
}

.selected-empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 0.85rem;
  place-items: center;
  border: 2px solid #3e679a;
  border-radius: 50%;
  color: #a9c5e7;
  font-size: 1.8rem;
}

.selected-pokemon-empty h3 {
  margin: 0;
  font-size: 1.05rem;
}

.selected-pokemon-empty p {
  max-width: 420px;
  margin: 0.45rem 0 0;
  color: #8398b5;
  line-height: 1.5;
}

/* Main selected Pokémon layout */
.selected-pokemon-editor {
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr) 150px;
  gap: 1.25rem;
  align-items: start;
}

/* Pokémon overview card */
.selected-pokemon-overview {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  padding: 1rem;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: var(--app-panel-dark);
  text-align: center;
}

.selected-pokemon-overview img {
  width: 110px;
  height: 110px;
  object-fit: contain;
}

.selected-pokemon-overview h3 {
  margin: 0.5rem 0 0;
  font-size: 1rem;
}

.selected-pokemon-overview > span {
  margin-top: 0.2rem;
  color: #9fb0c7;
  font-size: 0.88rem;
}

.selected-pokemon-types {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

/* Main configuration fields */
.selected-pokemon-fields {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1rem;
}

.selected-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

/* Moves */
.pokemon-moves {
  min-width: 0;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: rgba(8, 23, 47, 0.35);
}

.pokemon-moves legend {
  padding: 0 0.35rem;
}

.move-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.move-grid .form-group {
  width: 100%;
}

.move-grid select {
  width: 100%;
}

/* EV and IV cards */
.pokemon-values {
  min-width: 0;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: rgba(8, 23, 47, 0.35);
}

.pokemon-values legend {
  padding: 0 0.35rem;
}

.pokemon-values-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.pokemon-values-header legend {
  margin: 0;
}

.pokemon-values-header span {
  flex-shrink: 0;
  color: #ffc400;
  font-size: 0.85rem;
  font-weight: 800;
}

.pokemon-values-description {
  margin: 0 0 1rem;
  color: #8398b5;
  font-size: 0.82rem;
  line-height: 1.45;
}

.pokemon-values-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1rem;
}

.pokemon-values-grid .form-group {
  gap: 0.4rem;
}

.pokemon-values-grid label {
  font-size: 0.8rem;
}

.pokemon-values-grid input {
  min-height: 42px;
  padding: 0.6rem 0.7rem;
}

.iv-reset-button {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9fc6f4;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.iv-reset-button:hover {
  color: #fff;
  text-decoration: underline;
}

#ev-total-error {
  margin-top: 0.75rem;
}

/* Delete action */
.delete-pokemon-button {
  align-self: flex-start;
  border-color: #d64550 !important;
  background: transparent;
  color: #ff6670;
}

.delete-pokemon-button:hover {
  background: rgba(214, 69, 80, 0.12);
}

/* Base stats */
.selected-pokemon-stats {
  min-width: 0;
  padding: 0.25rem 0;
}

.selected-pokemon-stats h3 {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.selected-pokemon-stats dl {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
}

.selected-pokemon-stats dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.selected-pokemon-stats dt,
.selected-pokemon-stats dd {
  margin: 0;
  color: #b7c5d8;
  font-size: 0.9rem;
}

.selected-pokemon-stats dd {
  color: #f8fafc;
  font-weight: 700;
}

/* Right Sidebar: Team Summary */
.team-summary-panel {
  display: flex;
  min-height: 900px;
  flex-direction: column;
  gap: 2rem;
  padding: 1.25rem;
}
.team-overview h3 {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}
.team-overview dl {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin: 0;
  padding-bottom: 2rem;
  border-bottom: 1px solid #45617e;
}
.team-overview dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.team-overview dt,
.team-overview dd {
  margin: 0;
}
.team-overview dd {
  font-weight: 700;
}
.team-notes-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.team-notes-group textarea {
  min-height: 145px;
}
.team-summary-panel > .button {
  margin-top: auto;
}

.team-slot-pokemon-image {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.team-slot-pokemon-name {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.team-slot-pokemon-number {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.team-slot.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(244, 197, 66, 0.15);
}

.selected-pokemon-empty[hidden],
.selected-pokemon-editor[hidden] {
  display: none;
}

.pokemon-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0.15rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.pokemon-type-normal {
  background: #929da3;
}

.pokemon-type-fire {
  background: #f08030;
}

.pokemon-type-water {
  background: #6890f0;
}

.pokemon-type-electric {
  background: #f8d030;
  color: #1f2937;
}

.pokemon-type-grass {
  background: #78c850;
}

.pokemon-type-ice {
  background: #98d8d8;
  color: #1f2937;
}

.pokemon-type-fighting {
  background: #c03028;
}

.pokemon-type-poison {
  background: #a040a0;
}

.pokemon-type-ground {
  background: #e0c068;
  color: #1f2937;
}

.pokemon-type-flying {
  background: #a890f0;
}

.pokemon-type-psychic {
  background: #f85888;
}

.pokemon-type-bug {
  background: #a8b820;
}

.pokemon-type-rock {
  background: #b8a038;
}

.pokemon-type-ghost {
  background: #705898;
}

.pokemon-type-dragon {
  background: #7038f8;
}

.pokemon-type-dark {
  background: #705848;
}

.pokemon-type-steel {
  background: #b8b8d0;
  color: #1f2937;
}

.pokemon-type-fairy {
  background: #ee99ac;
  color: #1f2937;
}

.pokemon-type-badge {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 2px 6px rgba(0, 0, 0, 0.12);
}

#summary-team-types {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

/* Import Modal */
.showdown-dialog {
  width: min(760px, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;

  border: 1px solid #365d91;
  border-radius: 16px;

  background: #0d1d38;
  color: #f4f7ff;

  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03);

  overflow: hidden;
}

.showdown-dialog::backdrop {
  background: rgba(2, 10, 24, 0.78);
  backdrop-filter: blur(4px);
}

.showdown-dialog-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;

  padding: 1.5rem;
  margin: 0;

  background: transparent;
}

.showdown-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.showdown-dialog-header h2 {
  margin: 0 0 0.4rem;

  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;

  color: #ffffff;
}

.showdown-dialog-header p {
  margin: 0;
  max-width: 600px;

  color: #8fb3e8;
  line-height: 1.6;
}

.showdown-dialog-close {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 1px solid #365d91;
  border-radius: 10px;

  background: #132746;
  color: #ffffff;

  font-size: 1.4rem;
  line-height: 1;

  cursor: pointer;
}

.showdown-dialog-close:hover {
  background: #1a345d;
  border-color: #4f86c9;
}

.showdown-dialog-content label {
  display: block;
  margin-bottom: -0.75rem;

  color: #dce9ff;
  font-size: 0.9rem;
  font-weight: 700;
}

#showdown-import-text {
  width: 100%;
  min-height: 360px;
  max-height: 55vh;
  resize: vertical;

  padding: 1rem;

  border: 1px solid #365d91;
  border-radius: 12px;

  background: #09172d;
  color: #f4f7ff;

  font: inherit;
  line-height: 1.55;

  outline: none;
}

#showdown-import-text::placeholder {
  color: #7395c4;
}

#showdown-import-text:focus {
  border-color: #ffc629;

  box-shadow:
    0 0 0 3px rgba(255, 198, 41, 0.18);
}

.showdown-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.showdown-dialog-actions .button {
  min-width: 130px;
  min-height: 46px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  font-weight: 700;
}

.showdown-dialog-actions .button-primary {
  background: #ffc629;
  border: 1px solid #ffc629;
  color: #07162f;

  box-shadow: 0 8px 18px rgba(255, 198, 41, 0.18);
}

.showdown-dialog-actions .button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(255, 198, 41, 0.26);
}

.showdown-dialog-actions .button-secondary {
  background: #132746;
  border: 1px solid #365d91;
  color: #f4f7ff;
}

.showdown-dialog-actions .button-secondary:hover {
  background: #1a345d;
  border-color: #4f86c9;
}

/* Authentication Pages */
.auth-page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 3rem 1.5rem;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 80% 15%,
      rgba(40, 105, 223, 0.2),
      transparent 30%
    ),
    radial-gradient(circle at 10% 85%, rgba(31, 77, 173, 0.2), transparent 32%),
    linear-gradient(135deg, var(--background-deep), #0b1832 60%, #091329);
}
.auth-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(71, 112, 196, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 112, 196, 0.18) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(
    to bottom,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
}
.auth-background-glow {
  position: absolute;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.auth-background-glow--left {
  left: -10rem;
  bottom: -10rem;
  background: rgba(40, 105, 223, 0.24);
}
.auth-background-glow--right {
  top: -11rem;
  right: -8rem;
  background: rgba(244, 197, 66, 0.1);
}
.auth-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 500px);
  align-items: center;
  gap: clamp(3rem, 8vw, 6rem);
  width: min(100%, 1180px);
}
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 580px;
}
.auth-logo {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 1rem;
  text-decoration: none;
}
.auth-logo-image {
  display: block;
  width: 220px;
  height: auto;
  transition:
    filter 150ms ease,
    transform 150ms ease;
}
.auth-logo:hover .auth-logo-image {
  filter: brightness(1.08);
  transform: scale(1.03);
}
.auth-eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 1.25rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(244, 197, 66, 0.55);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.auth-brand h1 {
  max-width: 620px;
  margin-bottom: 1.25rem;
  font-size: clamp(2.75rem, 5vw, 4.5rem);
  line-height: 1;
}
.auth-brand > p {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}
.auth-benefits {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}
.auth-benefit {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.auth-benefit-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(91, 143, 243, 0.35);
  border-radius: 0.75rem;
  background: rgba(40, 105, 223, 0.18);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
}
.auth-benefit div {
  display: grid;
  gap: 0.2rem;
}
.auth-benefit strong {
  font-size: 0.95rem;
}
.auth-benefit div span {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.auth-card-wrapper {
  width: 100%;
}
.auth-card {
  position: relative;
  width: 100%;
  padding: 2.5rem;
  border: 1px solid rgba(91, 143, 243, 0.3);
  border-radius: var(--radius-extra-large);
  background: linear-gradient(
    145deg,
    rgba(28, 41, 69, 0.98),
    rgba(15, 25, 46, 0.98)
  );
  box-shadow: var(--shadow-large);
  backdrop-filter: blur(18px);
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 2rem;
  left: 2rem;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.auth-card-header {
  margin-bottom: 1.75rem;
  text-align: center;
}
.auth-card-badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--blue-light);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.auth-card-header h2 {
  margin-bottom: 0.5rem;
  font-size: 2.15rem;
}
.auth-card-header p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.auth-form {
  display: grid;
  gap: 1.2rem;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.form-group {
  display: grid;
  gap: 0.45rem;
}
.form-group label {
  color: #dce5f7;
  font-size: 0.82rem;
  font-weight: 700;
}
.form-group input {
  width: 100%;
  min-height: 50px;
  padding: 0 0.95rem;
  border: 1px solid rgba(101, 128, 181, 0.45);
  border-radius: var(--radius-medium);
  outline: none;
  background: rgba(7, 14, 27, 0.72);
  color: var(--text);
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}
.form-group input::placeholder {
  color: var(--text-subtle);
}
.form-group input:hover {
  border-color: rgba(91, 143, 243, 0.72);
}
.form-group input:focus {
  border-color: var(--accent);
  background: rgba(8, 18, 36, 0.95);
  box-shadow: 0 0 0 4px rgba(244, 197, 66, 0.12);
}
.form-group input.input-error {
  border-color: var(--danger);
}
.form-group input.input-error:focus {
  box-shadow: 0 0 0 4px rgba(255, 116, 116, 0.12);
}
.form-error {
  margin-bottom: 0;
  color: var(--danger);
  font-size: 0.76rem;
  line-height: 1.4;
}
.auth-alert {
  margin-bottom: 1.25rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(255, 116, 116, 0.34);
  border-radius: var(--radius-medium);
  background: rgba(255, 116, 116, 0.1);
  color: #ffb2b2;
  font-size: 0.82rem;
  line-height: 1.5;
}
.auth-submit {
  min-height: 52px;
  margin-top: 0.25rem;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: var(--radius-medium);
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  color: #171717;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(244, 197, 66, 0.18);
  transition:
    background-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}
.auth-submit:hover {
  transform: translateY(-2px);
  background: var(--accent-light);
  box-shadow: 0 16px 34px rgba(244, 197, 66, 0.25);
}
.auth-submit:active {
  transform: translateY(0);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.75rem 0 1rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-light);
}
.auth-divider span {
  color: var(--text-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}
.auth-switch {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
}
.auth-switch a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}
.auth-switch a:hover {
  text-decoration: underline;
}
.auth-home-link {
  display: block;
  margin-top: 1rem;
  color: var(--blue-light);
  font-size: 0.8rem;
  text-align: center;
  text-decoration: none;
}
.auth-home-link:hover {
  color: #8cb1ff;
}

/* Dashboard */
.dashboard {
  padding: 4rem 0 6rem;
}
.dashboard-header {
  margin-bottom: 2.5rem;
}
.dashboard-header h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}
.dashboard-header p {
  max-width: 650px;
  color: var(--text-muted);
}

/* Error Pages */
.error-page {
  display: grid;
  align-items: center;
  min-height: calc(100vh - 160px);
  padding: 5rem 0;
}
.error-content {
  max-width: 850px;
}
.error-code {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: clamp(5rem, 18vw, 11rem);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.08em;
}
.error-page h1 {
  max-width: 750px;
  margin-bottom: 1.5rem;
  font-size: clamp(3rem, 8vw, 6rem);
}
.error-description {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1.15rem;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer p {
  margin-bottom: 0;
}

/* Mobile Nav */

.mobile-nav-toggle,
.mobile-navigation {
  display: none;
}

.mobile-nav-toggle {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.mobile-nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-navigation-inner {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-navigation a,
.mobile-navigation-link {
  display: block;
  width: 100%;
  padding: 0.9rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.mobile-navigation form {
  margin: 0;
}

/* Responsive: Large Tablets */
@media (max-width: 1400px) {
  .team-builder-topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .team-builder-topbar > div:first-child {
    min-width: 0;
  }

  .team-builder-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .team-builder-action {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
  }
}

@media (max-width: 1050px) {
  /* Navigation */
  .navigation {
    gap: 1.5rem;
  }
  .logo-image {
    height: 52px;
  }
  .primary-navigation {
    gap: 1.5rem;
  }
  .navigation-button {
    min-width: 100px;
  }

  /* Homepage */
  .home-hero-container {
    grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
    gap: 2rem;
  }
  .home-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* About */
  .about-main-card {
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  }
  .about-benefit-grid {
    grid-template-columns: 1fr;
  }
  .about-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Saved Teams */
  .saved-teams-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .saved-teams-controls {
    width: 100%;
  }
  .team-search,
  .team-sort {
    flex: 1;
  }
  .teams-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Team Builder */
  .team-builder-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .team-summary-sidebar {
    grid-column: 1 / -1;
  }
  .team-summary-panel {
    min-height: auto;
  }
  .team-summary-panel > .button {
    align-self: flex-start;
    margin-top: 0;
  }
  .team-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .selected-pokemon-editor {
    grid-template-columns: 145px minmax(0, 1fr);
  }

  .selected-pokemon-stats {
    grid-column: 1 / -1;
    padding: 1rem;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: rgba(8, 23, 47, 0.35);
  }

  .selected-pokemon-stats dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
  }

  .selected-pokemon-stats dl div {
    min-width: 0;
  }

    /* Team Detail */
  .team-detail-pokemon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-detail-pokemon-card {
    min-height: 320px;
  }
}

/* Responsive: Tablets */
@media (max-width: 980px) {
  /* Authentication */
  .auth-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 650px;
  }
  .auth-brand {
    align-items: center;
    max-width: none;
    text-align: center;
  }
  .auth-logo {
    margin-bottom: 1rem;
  }
  .auth-brand > p {
    margin-inline: auto;
  }
  .auth-benefits {
    display: none;
  }
  .auth-card-wrapper {
    max-width: 560px;
    margin-inline: auto;
  }
}

/* Responsive: Small Tablets */
@media (max-width: 860px) {
  /* Navigation */
  .navigation {
    grid-template-columns: auto auto;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 76px;
  }

  .primary-navigation {
    display: none;
  }

  .navigation-actions {
    justify-self: end;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .mobile-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    width: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--surface, #fff);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  }

  .mobile-navigation.is-open {
    display: block;
  }

  .site-header {
    position: relative;
  }
  .logo-image {
    height: 50px;
  }

    .steps-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid::before {
    top: 48px;
    bottom: 48px;
    left: 44px;
    right: auto;

    width: 1px;
    height: auto;

    background:
      linear-gradient(
        180deg,
        transparent,
        rgba(70, 126, 224, 0.65),
        rgba(70, 126, 224, 0.65),
        transparent
      );
  }

  /* Homepage */
  .home-hero {
    padding-top: 3.5rem;
    padding-bottom: 4rem;
  }
  .home-hero-container {
    grid-template-columns: 1fr;
  }
  .home-hero-content {
    max-width: 700px;
    margin-inline: auto;
    padding: 0;
    text-align: center;
  }
  .home-hero-eyebrow {
    margin-inline: auto;
  }
  .home-hero h1 {
    max-width: none;
  }
  .home-hero-description {
    max-width: 600px;
    margin-inline: auto;
  }
  .home-hero-actions {
    justify-content: center;
  }

  /* Hide artwork */
  .home-hero-visual {
    display: none;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .step-arrow {
    display: none;
  }

  /* About */
  .about-overview-grid,
  .about-details-grid,
  .about-main-card {
    grid-template-columns: 1fr;
  }
  .about-artwork img {
    width: min(100%, 430px);
  }
  .about-audience-card,
  .about-source-card {
    padding: 2rem;
  }
  .about-project-grid {
    grid-template-columns: 1fr;
  }

  /* Saved Teams */
  .saved-teams-page {
    padding-top: 2rem;
  }
  .saved-teams-header {
    margin-bottom: 2rem;
  }
  .saved-teams-controls {
    flex-wrap: wrap;
  }
  .team-search {
    flex: 1 1 100%;
    width: 100%;
  }
  .team-sort {
    flex: 1 1 calc(100% - 110px);
    width: auto;
  }
  .view-buttons {
    flex: 0 0 auto;
  }
  .saved-team-card {
    padding: 1.25rem;
  }
  .team-pokemon-preview {
    gap: 0.5rem;
  }

  .teams-grid,
  .teams-grid.teams-grid--list {
    grid-template-columns: 1fr;
  }

  .teams-grid.teams-grid--list
    .saved-team-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .teams-grid.teams-grid--list
    .view-team-button {
    width: min(190px, 100%);
    margin-top: auto;
  }

  .saved-teams-container,
  .team-detail-container {
    width: min(calc(100% - 2rem), 1400px);
  }

  .saved-team-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .saved-team-types {
    min-height: 44px;
  }

  /* Team Detail */
  .team-detail-header h1 {
    font-size: clamp(2.75rem, 10vw, 4.5rem);
  }

  .team-detail-pokemon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-detail-pokemon-card {
    min-height: 310px;
  }

  .team-detail-pokemon-image {
    height: 160px;
  }

  .analysis-type-list {
    grid-template-columns: repeat(
      2,
      minmax(0, 1fr)
    );
  }
  

  /* Team Builder */
  .team-builder-layout {
    grid-template-columns: 1fr;
  }
  .pokemon-browser,
  .builder-workspace,
  .team-summary-sidebar {
    grid-column: auto;
  }
  .pokemon-search-panel {
    height: auto;
    min-height: auto;
  }
  .team-summary-panel {
    min-height: auto;
  }
  .team-builder-topbar {
    flex-direction: column;
  }

  .team-builder-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .team-builder-action {
    width: 100%;
    min-width: 0;
  }

  .team-builder-action:first-child {
    grid-column: 1 / -1;
  }
  .team-builder-topbar .button-primary {
    width: 100%;
  }
  .team-name-field {
    max-width: none;
  }
  .pokemon-search-results {
    min-height: 220px;
    max-height: 420px;
  }

  .navigation-actions {
    display: none;
  }
  .navigation-button--login {
    display: none;
  }

  .selected-pokemon-editor {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .selected-pokemon-stats {
    grid-column: 1 / -1;
  }

  .selected-pokemon-stats dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .move-grid {
    grid-template-columns: 1fr;
  }

  .pokemon-values-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Responsive: About Page */
@media (max-width: 800px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive: Mobile */
@media (max-width: 720px) {
  /* Existing Sections */
  .hero {
    min-height: auto;
    padding: 4rem 0;
  }
  .status-grid {
    grid-template-columns: 1fr;
  }
  .site-footer .container {
    flex-direction: column;
  }

  /* Homepage */
  .home-feature-grid {
    grid-template-columns: 1fr;
  }
  .home-hero-actions {
    flex-direction: column;
  }
  .home-hero-actions .button {
    width: 100%;
  }

  /* Saved Teams */
  .saved-teams-page {
    padding: 1.5rem 0 3rem;
  }

  .saved-teams-container {
    width: min(calc(100% - 2rem), 1400px);
  }

  .saved-teams-heading h1 {
    font-size: 2rem;
  }

  .saved-teams-heading p {
    font-size: 1rem;
  }

  .saved-teams-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .team-search,
  .team-sort {
    width: 100%;
  }

  .view-buttons {
    display: none;
  }

  .teams-grid,
  .teams-grid.teams-grid--list {
    grid-template-columns: 1fr;
  }

  .saved-team-card,
  .teams-grid.teams-grid--list .saved-team-card {
    display: flex;
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
  }

  .team-pokemon-preview {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .saved-team-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    font-size: 0.9rem;
  }

  .saved-team-types {
    min-height: 44px;
  }

  .view-team-button,
  .teams-grid.teams-grid--list .view-team-button {
    width: min(190px, 100%);
    margin-top: 1.25rem;
  }

  .create-team-card {
    min-height: 125px;
  }

  /* Team Builder */
  .team-builder-page {
    padding: 1.5rem 0 2.5rem;
  }
  .team-builder-page .container {
    width: min(calc(100% - 2rem), 1600px);
    margin-inline: auto;
  }
  .team-slots {
    grid-template-columns: 1fr;
  }
  .team-slot {
    min-height: 145px;
  }
  .selected-pokemon-editor,
  .selected-fields-grid,
  .move-grid,
  .pokemon-values-grid {
    grid-template-columns: 1fr;
  }

  .selected-pokemon-stats {
    grid-column: auto;
  }

  .selected-pokemon-stats dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selected-pokemon-overview,
  .delete-pokemon-button {
    width: 100%;
  }

  .pokemon-values-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .pokemon-values-header span,
  .iv-reset-button {
    align-self: flex-start;
  }
  .selected-pokemon-stats {
    grid-column: auto;
  }
  .clear-filters-button,
  .team-summary-panel > .button,
  .selected-pokemon-overview,
  .delete-pokemon-button {
    width: 100%;
  }

    /* Team Detail */
  .team-detail-page {
    padding: 1.5rem 0 3rem;
  }

  .team-detail-container {
    width: min(calc(100% - 2rem), 1400px);
  }

  .team-detail-back-link {
    margin-bottom: 1rem;
  }

  .team-detail-header {
    margin-bottom: 1.5rem;
  }

  .team-detail-header h1 {
    font-size: clamp(2.5rem, 13vw, 4rem);
    overflow-wrap: anywhere;
  }

  .team-detail-notes {
    font-size: 1rem;
  }

  .team-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .team-detail-edit-button,
  .delete-team-form,
  .delete-team-button {
    width: 100%;
  }

  .team-detail-pokemon-grid {
    grid-template-columns: 1fr;
  }

  .team-detail-pokemon-card {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    min-height: auto;
  }

  .team-detail-pokemon-image {
    width: 130px;
    height: 150px;
  }

  .team-detail-pokemon-content {
    min-width: 0;
  }

  .team-detail-pokemon-card h2 {
    margin-top: 0;
  }

  .team-detail-ability {
    margin-top: 1rem;
  }

    .team-analysis-summary-list {
    grid-template-columns: 1fr;
  }

  .team-analysis-summary-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Responsive: Small Mobile */
@media (max-width: 620px) {
  /* Homepage */
  .home-hero {
    padding-top: 2.5rem;
  }
  .home-hero h1 {
    font-size: clamp(2.75rem, 14vw, 4rem);
  }
  .home-hero-description {
    font-size: 1rem;
  }
  .home-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .home-hero-actions .button {
    width: 100%;
  }
  .step-card {
    align-items: flex-start;
  }
  .step-number {
    width: 58px;
    height: 58px;
  }
    .status-banner--launch {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  /* About */
  .about-hero {
    padding: 4rem 0 3rem;
  }
  .about-hero h1 {
    font-size: clamp(2.75rem, 14vw, 4rem);
  }
  .about-introduction {
    font-size: 1rem;
  }
  .about-main-card,
  .about-audience-card,
  .about-features-card,
  .about-source-card,
  .about-project-card {
    padding: 1.5rem;
  }
  .about-artwork {
    display: none;
  }
  .about-benefit-grid,
  .about-feature-grid {
    grid-template-columns: 1fr;
  }
  .about-main-card {
    min-height: auto;
  }

  /* Authentication */
  .auth-page {
    align-items: flex-start;
    padding: 1.75rem 1rem;
  }
  .auth-container {
    gap: 2rem;
  }
  .auth-logo {
    margin-bottom: 0.75rem;
  }
  .auth-logo-image {
    width: 190px;
  }
  .auth-brand h1 {
    font-size: clamp(2.4rem, 12vw, 3.2rem);
  }
  .auth-brand > p {
    font-size: 0.95rem;
  }
  .auth-card {
    padding: 2rem 1.35rem;
    border-radius: 1.15rem;
  }
  .auth-card-header h2 {
    font-size: 1.85rem;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .pokeapi-logo {
    width: min(100%, 210px);
  }

  /* Saved Teams */
  .saved-teams-heading {
    width: 100%;
  }
  .saved-teams-count {
    display: inline-block;
    margin-top: 0.15rem;
  }
  .saved-team-card-header h2 {
    font-size: 1rem;
  }
  .saved-team-updated {
    font-size: 0.9rem;
  }
  .team-pokemon-preview {
    gap: 0.35rem;
  }
  .pokemon-preview-slot {
    font-size: 1.1rem;
  }
  .saved-team-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    font-size: 0.85rem;
  }
  .team-summary-label {
    font-size: 0.8rem;
  }
  .view-team-button {
    width: 100%;
  }
  .create-team-card {
    gap: 1rem;
  }
  .create-team-icon {
    flex-basis: 68px;
    width: 68px;
    height: 68px;
    font-size: 2.25rem;
  }
  .create-team-content strong {
    font-size: 1rem;
  }
  .create-team-content small {
    font-size: 0.8rem;
  }

  /* Team Builder */
  .team-builder-topbar h1 {
    font-size: 1.9rem;
  }
  .team-builder-topbar p {
    font-size: 0.9rem;
  }
  .pokemon-search-panel,
  .selected-pokemon-panel,
  .team-summary-panel {
    padding: 1rem;
  }
  .team-builder-layout,
  .builder-workspace {
    gap: 0.85rem;
  }
  .selected-pokemon-panel {
    min-height: auto;
  }
  .selected-pokemon-empty {
    min-height: 140px;
  }

  .pokemon-moves,
  .pokemon-values,
  .selected-pokemon-stats {
    padding: 0.85rem;
  }

  .pokemon-values-description {
    margin-bottom: 0.8rem;
    font-size: 0.78rem;
  }

  .selected-pokemon-stats dl {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .selected-pokemon-stats dl div {
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(69, 97, 126, 0.45);
  }

  .selected-pokemon-stats dl div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

    .showdown-dialog {
    width: calc(100% - 1rem);
    max-height: calc(100vh - 1rem);
    border-radius: 12px;
  }

  .showdown-dialog-content {
    padding: 1rem;
    gap: 1rem;
  }

  .showdown-dialog-header h2 {
    font-size: 1.4rem;
  }

  #showdown-import-text {
    min-height: 280px;
    max-height: 48vh;
  }

  .showdown-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .showdown-dialog-actions .button {
    width: 100%;
    min-width: 0;
  }

  /* Team Detail */
    .team-detail-actions {
    grid-template-columns: 1fr;
  }

  .team-detail-pokemon-card {
    grid-template-columns: 110px minmax(0, 1fr);
    padding: 1rem;
  }

  .team-detail-pokemon-image {
    width: 110px;
    height: 130px;
  }

    .toast-container {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }

  .analysis-type-list {
    grid-template-columns: 1fr;
  }
}

/* Responsive: Navigation */
@media (max-width: 560px) {
  .navigation {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .logo-image {
    height: 44px;
  }
  .navigation-actions {
    display: none;
  }
  .navigation-button--login {
    display: none;
  }
  .navigation-button {
    min-width: auto;
    min-height: 40px;
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
  }

  /* Team Builder */
  .team-builder-page .container {
    width: min(calc(100% - 1.25rem), 1500px);
  }
  .team-builder-topbar {
    gap: 0.85rem;
  }
  .team-name-field {
    width: 100%;
  }
  .team-slot {
    min-height: 140px;
  }
  .slot-index {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }
  .slot-plus {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }
  .team-builder-actions {
    grid-template-columns: 1fr;
  }

  .team-builder-action:first-child {
    grid-column: auto;
  }

  .team-builder-action {
    min-height: 46px;
  }

    .how-it-works {
    padding: 4.5rem 0;
  }

  .section-heading {
    margin-bottom: 2.5rem;
  }

  .step-card {
    padding: 1.1rem;
  }

  .step-icon {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .step-icon svg {
    width: 24px;
    height: 24px;
  }

  .steps-grid::before {
    left: 35px;
  }
}

/* Responsive: Extra Small Devices */
@media (max-width: 420px) {
  .container {
    width: min(calc(100% - 1.25rem), var(--max-width));
  }
  .navigation {
    gap: 0.75rem;
  }
  .logo-image {
    height: 40px;
  }
  .navigation-button {
    min-height: 38px;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }
  .auth-page {
    padding-inline: 0.75rem;
  }
  .auth-logo-image {
    width: 170px;
  }
  .auth-card {
    padding-inline: 1.1rem;
  }

  /* Saved Teams */
  .saved-teams-page {
    padding-top: 1.25rem;
  }
  .saved-teams-header {
    gap: 1.25rem;
  }
  .saved-teams-heading h1 {
    font-size: 1.8rem;
  }
  .saved-team-card {
    padding: 1rem;
  }
  .team-pokemon-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pokemon-preview-slot {
    aspect-ratio: 1.2;
  }
  .saved-team-summary {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }

  .team-summary-item {
    flex-direction: column;
    justify-content: flex-start;
  }

  .saved-team-types {
    min-height: auto;
  }
  .create-team-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .create-team-icon {
    flex-basis: auto;
    width: 58px;
    height: 58px;
  }

  /* Team Builder */
  .team-builder-page .container {
    width: min(calc(100% - 1rem), 1500px);
  }
  .pokemon-search-panel,
  .selected-pokemon-panel,
  .team-summary-panel {
    padding: 0.9rem;
  }
  .team-builder-topbar h1 {
    font-size: 1.8rem;
  }
  .team-builder-topbar p {
    font-size: 0.85rem;
  }
  .team-slots {
    gap: 0.75rem;
  }
  .team-slot {
    min-height: 135px;
  }
  .slot-index {
    top: 0.55rem;
  }
  .slot-plus {
    width: 38px;
    height: 38px;
    font-size: 1.5rem;
  }
  .slot-number {
    font-size: 0.85rem;
  }
  .selected-pokemon-overview img {
    width: 90px;
    height: 90px;
  }

  .selected-pokemon-fields {
    gap: 0.75rem;
  }

  .selected-fields-grid,
  .move-grid,
  .pokemon-values-grid {
    gap: 0.7rem;
  }

  .pokemon-moves,
  .pokemon-values,
  .selected-pokemon-stats {
    padding: 0.75rem;
  }

  .pokemon-values-header {
    margin-bottom: 0.25rem;
  }

  .pokemon-values-grid input,
  .move-grid select {
    min-height: 42px;
  }

  .selected-pokemon-overview {
    padding: 0.85rem;
  }
  /* Team Detail */
  .team-detail-container {
    width: min(calc(100% - 1rem), 1400px);
  }

  .team-detail-header h1 {
    font-size: 2.5rem;
  }

  .team-detail-pokemon-card {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.85rem;
  }

  .team-detail-pokemon-image {
    width: 90px;
    height: 110px;
  }

  .team-detail-pokemon-card h2 {
    font-size: 0.95rem;
  }

  .team-detail-slot,
  .team-detail-ability,
  .pokemon-species {
    font-size: 0.82rem;
  }
}
