/* Jogos TV — 10-foot light-mode launcher UI for Samsung QN95A and desktop */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 10%, #ffffff 0%, #f3f6fb 56%, #e5ecf6 100%);
  color: #182030;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.hub-shell {
  min-height: 100vh;
  max-width: 1680px;
  margin: 0 auto;
  padding: 3.2% 4.2%;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #ffffff;
  border: 1.5px solid rgba(24, 32, 48, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 8px 22px rgba(24, 32, 48, 0.08);
}

.brand-mark .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.brand-mark .d1 { background: #f5b82e; }
.brand-mark .d2 { background: #1ea7fd; }
.brand-mark .d3 { background: #e84da2; }

.hub-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #141b29;
}

.hub-subtitle {
  font-size: 14px;
  color: #5b677c;
  margin-top: 3px;
}

.nav-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #465266;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(24, 32, 48, 0.11);
  border-radius: 999px;
  padding: 9px 16px;
  box-shadow: 0 4px 14px rgba(24, 32, 48, 0.06);
}

.key-chip {
  font-size: 12px;
  font-weight: 700;
  color: #182030;
  background: #edf2fa;
  border: 1px solid rgba(24, 32, 48, 0.14);
  padding: 3px 9px;
  border-radius: 999px;
}

.hub-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #182030;
}

.section-meta {
  font-size: 13px;
  color: #5b677c;
  font-weight: 500;
}

/* Games grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid rgba(24, 32, 48, 0.1);
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 12px 30px rgba(24, 32, 48, 0.09);
}

.game-card:hover,
.game-card.is-focused {
  transform: translateY(-4px) scale(1.02);
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25), 0 18px 40px rgba(24, 32, 48, 0.16);
  outline: none;
}

.game-card.coming-soon {
  opacity: 0.72;
  border-style: dashed;
}

.game-card.coming-soon.is-focused {
  opacity: 0.96;
  border-style: solid;
}

.game-art-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #e9eff7;
  overflow: hidden;
}

.game-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.coming-soon-art {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: radial-gradient(circle at 50% 45%, #ffffff, #e6edf7);
  color: #5b677c;
}

.coming-plus {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px dashed rgba(24, 32, 48, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 300;
  color: #465266;
}

.game-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(24, 32, 48, 0.14);
  color: #182030;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.game-info {
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.game-name {
  font-size: 20px;
  font-weight: 800;
  color: #141b29;
}

.game-tag {
  font-size: 12px;
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
}

.game-desc {
  font-size: 14px;
  line-height: 1.45;
  color: #4f5c72;
}

/* Controllers Setup row */
.controllers-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.controller-card {
  border-radius: 20px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(24, 32, 48, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 22px rgba(24, 32, 48, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.controller-card.p1.connected {
  border-color: #10b981;
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.18);
}

.controller-card.p2.connected {
  border-color: #f46a5e;
  box-shadow: 0 0 22px rgba(244, 106, 94, 0.18);
}

.ctrl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ctrl-badge {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
}

.controller-card.p1 .ctrl-badge {
  background: rgba(16, 185, 129, 0.16);
  color: #047857;
}

.controller-card.p2 .ctrl-badge {
  background: rgba(244, 106, 94, 0.16);
  color: #c83e33;
}

.ctrl-state {
  font-size: 12px;
  font-weight: 600;
  color: #6b778c;
}

.controller-card.p1.connected .ctrl-state {
  color: #059669;
}

.controller-card.p2.connected .ctrl-state {
  color: #d94c40;
}

.ctrl-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stick-pad {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #edf2f9;
  border: 1.5px solid rgba(24, 32, 48, 0.14);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stick-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #94a3b8;
  transition: transform 0.04s linear, background 0.2s ease;
}

.controller-card.p1.connected .stick-dot {
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.55);
}

.controller-card.p2.connected .stick-dot {
  background: #f46a5e;
  box-shadow: 0 0 10px rgba(244, 106, 94, 0.55);
}

.ctrl-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ctrl-name {
  font-size: 14px;
  font-weight: 600;
  color: #182030;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ctrl-input {
  font-size: 12px;
  color: #5b677c;
}

.setup-action-card {
  border-radius: 20px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid rgba(24, 32, 48, 0.12);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 8px 22px rgba(24, 32, 48, 0.06);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.setup-action-card:hover,
.setup-action-card.is-focused {
  transform: translateY(-3px) scale(1.02);
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25), 0 14px 32px rgba(24, 32, 48, 0.14);
  outline: none;
}

.setup-action-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0284c7;
}

.setup-action-title {
  font-size: 18px;
  font-weight: 800;
  color: #141b29;
}

.setup-action-desc {
  font-size: 13px;
  color: #4f5c72;
}

/* Pairing modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  z-index: 20;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 780px;
  border-radius: 24px;
  background: #ffffff;
  border: 2px solid rgba(16, 185, 129, 0.45);
  padding: 28px 32px;
  box-shadow: 0 24px 70px rgba(20, 28, 42, 0.25);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #059669;
  margin-bottom: 4px;
}

.modal-title {
  font-size: 24px;
  font-weight: 800;
  color: #141b29;
}

.modal-close-btn {
  padding: 9px 15px;
  border-radius: 999px;
  border: 2px solid #10b981;
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.pairing-steps {
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: #364154;
}

.pairing-steps strong {
  color: #141b29;
}

@media (max-width: 1040px) {
  .games-grid,
  .controllers-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-hint {
    display: none;
  }
}

@media (max-width: 680px) {
  .games-grid,
  .controllers-row {
    grid-template-columns: 1fr;
  }
}
