/* Tu equipo (/mi-pc) */

.mipc-page.tq {
  padding: 32px 0 64px;
}

.tq-head {
  margin-bottom: 30px;
}

.tq-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.3);
  background: rgba(99, 102, 241, 0.1);
  color: #c7d2fe;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tq-eyebrow img {
  width: 14px;
  height: 14px;
}

.tq-head h1 {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.tq-head h1 em {
  font-style: normal;
  color: #a5b4fc;
}

.tq-lead {
  margin: 0;
  max-width: 58ch;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.tq .mipc-browser-warning {
  margin-bottom: 20px;
}

.tq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.tq-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

/* Ficha del equipo */

.tq-device {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tq-device-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tq-device-art {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 30%, rgba(129, 140, 248, 0.28), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(129, 140, 248, 0.3);
}

.tq-device-art img {
  width: 36px;
  height: 42px;
  object-fit: contain;
}

.tq-device-top > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.tq-device-top h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.tq-device-top p {
  margin: 2px 0 0;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.tq-status {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.tq-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.tq-status [data-when] {
  display: none;
}

.tq-device[data-state="empty"] .tq-status [data-when="empty"],
.tq-device[data-state="partial"] .tq-status [data-when="partial"],
.tq-device[data-state="ready"] .tq-status [data-when="ready"] {
  display: inline;
}

.tq-device[data-state="ready"] .tq-status {
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}

.tq-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.tq-spec {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  min-width: 0;
}

.tq-spec:nth-child(odd) {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.tq-spec:nth-child(-n + 2) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tq-spec-art {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 30%, rgba(129, 140, 248, 0.18), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(129, 140, 248, 0.22);
}

.tq-spec-art img {
  width: 38px;
  height: 28px;
  object-fit: contain;
  filter: brightness(1.35) saturate(1.1);
}

.tq-spec > div:last-child {
  min-width: 0;
}

.tq-spec dt {
  margin: 0 0 3px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.tq-spec dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  overflow-wrap: anywhere;
}

.tq-spec dd.is-empty {
  color: rgba(241, 245, 249, 0.5);
}

.tq-device .mipc-system-note {
  margin: 0;
  padding: 12px 22px 0;
}

.tq-device .mipc-system-actions {
  margin: 0;
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tq-device-foot {
  margin: 0;
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.6;
}

.tq-device-foot img {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
}

.tq-device-foot a {
  margin-left: 4px;
  white-space: nowrap;
  color: #a5b4fc;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Configurar */

.tq-setup {
  display: flex;
  flex-direction: column;
  padding: 20px;
  min-width: 0;
}

.tq-setup-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.tq-setup-title h2 {
  margin: 0;
  font-size: 1.05rem;
}

.tq-badge {
  display: none;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.tq-setup[data-method="detector"] .tq-badge {
  display: inline-block;
}

.tq-setup-sub {
  margin: 0 0 16px;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.tq-setup .mipc-method-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tq-setup .mipc-method-tab {
  min-height: 0;
  padding: 9px 6px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-soft);
  background: transparent;
  box-shadow: none;
}

.tq-setup .mipc-method-tab:hover {
  color: var(--text);
}

.tq-setup .mipc-method-tab.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.28);
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.55);
}

.tq-setup .mipc-method-panel.active {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tq-steps {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: tq-step;
}

.tq-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.88rem;
  counter-increment: tq-step;
}

.tq-steps li::before {
  content: counter(tq-step);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.35);
}

.tq-steps small {
  display: block;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.tq-detector-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.tq-detector-actions .btn-primary {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  padding: 12px 18px;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.26);
}

.tq-setup .mipc-browser-panel-note {
  padding: 14px;
  margin-bottom: 14px;
}

.tq-setup .mipc-browser-panel-alert-text,
.tq-setup .mipc-browser-panel-recommend {
  font-size: 0.82rem;
  line-height: 1.5;
}

.tq-setup .mipc-browser-panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tq-setup .mipc-browser-panel-actions .btn-primary,
.tq-setup .mipc-browser-panel-actions .btn-secondary {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.84rem;
}

.tq-setup .btn-detect {
  padding: 12px 16px;
  font-size: 0.9rem;
}

.tq-setup .mipc-device-note {
  margin: 12px 0 0;
  font-size: 0.78rem;
}

.tq-setup .mipc-detect-status {
  margin: 12px 0 0;
  min-height: 0;
}

.tq-setup .mipc-detect-status:empty {
  display: none;
}

/* Juegos */

.tq .mipc-main {
  margin-top: 36px;
}

.tq-games-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.tq-games-head h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.tq-games-head p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.tq .mipc-games-section {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.tq-games-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(10, 14, 23, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.tq .tq-games-bar .mipc-use-games {
  flex: 0 1 320px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 0;
  padding: 4px 12px 4px 8px;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.tq .tq-games-bar .mipc-use-games-mark {
  position: relative;
  width: 38px;
  height: 22px;
  margin-top: 0;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.42s ease, border-color 0.42s ease;
}

.tq .tq-games-bar .mipc-use-games-mark::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  transform: translateX(0);
  transition: transform 0.42s cubic-bezier(0.22, 1.15, 0.36, 1);
}

.tq .tq-games-bar .mipc-use-games input:checked + .mipc-use-games-mark {
  background: rgba(99, 102, 241, 0.45);
  border-color: rgba(165, 180, 252, 0.45);
}

.tq .tq-games-bar .mipc-use-games input:checked + .mipc-use-games-mark::after {
  transform: translateX(16px);
  border-color: transparent;
  background: #fff;
}

.tq .tq-games-bar .mipc-use-games-copy strong {
  font-size: 0.84rem;
}

.tq .tq-games-bar .mipc-use-games-copy small {
  font-size: 0.72rem;
}

.tq .tq-games-bar .mipc-filters {
  display: grid;
  grid-template-columns: 0.72fr 1.15fr 1.25fr 1.45fr;
  flex: 1;
  gap: 6px;
  margin: 0;
}

.tq .tq-games-bar .mipc-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  transition: background 0.28s ease, border-color 0.28s ease, color 0.28s ease, box-shadow 0.28s ease;
}

.tq .tq-games-bar .mipc-filter.active {
  color: var(--text);
  border-color: rgba(165, 180, 252, 0.35);
  background: rgba(99, 102, 241, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tq .tq-games-bar .mipc-filter em {
  min-width: 1.6em;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(10, 14, 23, 0.55);
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  text-align: center;
}

.tq-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tq-dot-high { background: #86efac; }
.tq-dot-ok { background: #fcd34d; }
.tq-dot-low { background: #fca5a5; }

.tq-games-grid,
.tq .mipc-games-compact .mipc-games-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
  transition: height 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.16s ease, transform 0.16s ease;
}

.tq .mipc-games-grid.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}

.tq .mipc-games-grid.is-entering {
  opacity: 1;
  transform: none;
  transition: height 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.tq .mipc-games-grid.is-entering .mipc-game-card {
  animation: tq-game-in 0.46s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tq .mipc-games-grid.is-entering .mipc-game-card:nth-child(2) { animation-delay: 0.04s; }
.tq .mipc-games-grid.is-entering .mipc-game-card:nth-child(3) { animation-delay: 0.08s; }
.tq .mipc-games-grid.is-entering .mipc-game-card:nth-child(4) { animation-delay: 0.12s; }
.tq .mipc-games-grid.is-entering .mipc-game-card:nth-child(5) { animation-delay: 0.16s; }
.tq .mipc-games-grid.is-entering .mipc-game-card:nth-child(6) { animation-delay: 0.2s; }
.tq .mipc-games-grid.is-entering .mipc-game-card:nth-child(7) { animation-delay: 0.24s; }
.tq .mipc-games-grid.is-entering .mipc-game-card:nth-child(8) { animation-delay: 0.28s; }
.tq .mipc-games-grid.is-entering .mipc-game-card:nth-child(n + 9) { animation-delay: 0.32s; }

@keyframes tq-game-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tq-ghost,
.tq .mipc-games-compact .mipc-game-card {
  aspect-ratio: 16 / 9;
  min-height: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
}

.tq-games-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  pointer-events: none;
}

.tq-games-lock strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.tq-games-lock span {
  color: var(--text-soft);
  font-size: 0.86rem;
}

.tq .mipc-game-banner {
  opacity: 0.78;
}

.tq .mipc-game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 20, 0.08), rgba(8, 12, 20, 0.78));
  pointer-events: none;
}

@media (max-width: 900px) {
  .tq-layout {
    grid-template-columns: 1fr;
  }

  .tq-games-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .tq .tq-games-bar .mipc-use-games {
    flex-basis: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .tq-games-grid,
  .tq .mipc-games-compact .mipc-games-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .mipc-page.tq {
    padding-top: 20px;
  }

  .tq-device-top {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 10px;
  }

  .tq-status {
    grid-column: 2;
    justify-self: start;
    margin-left: 0;
  }

  .tq-specs {
    grid-template-columns: 1fr;
  }

  .tq-setup .mipc-browser-panel-actions {
    grid-template-columns: 1fr;
  }

  .tq-spec:nth-child(odd) {
    border-right: none;
  }

  .tq-spec:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .tq-setup-title {
    flex-wrap: wrap;
  }

  .tq-games-head {
    flex-direction: column;
    gap: 4px;
  }

  .tq-games-grid,
  .tq .mipc-games-compact .mipc-games-grid {
    grid-template-columns: 1fr;
  }
}
