/* Resmi Steam Link 1.4.9 / 1.4.5 QSS Ana Ekran (CPanelMain) — Duyarlı Tesla & Masaüstü Ölçekleme
   Referans görünümler: 1280x720 (QSS tabanı), 1254x784 (Tesla ana), 773x601 (Tesla bölünmüş), 1920x1200 (Tesla tam ekran) */
:root {
  --sl-bg-0: #071e44;
  --sl-bg-1: #0b3a7a;
  --sl-bg-2: #1565c0;
  --sl-btn: rgba(7, 141, 219, 0.5);
  --sl-btn-selected: #0099E6;
  --sl-btn-hover: #1AB2FF;
  --sl-btn-pressed: #33AAFF;
  --sl-play: #0099E6;
  --sl-ok: #59BF40;
  --sl-bad: #E02728;
  --sl-muted: #bbc5cd;
  --sl-status-muted: #9dacb8;
  --sl-font: "Noto Sans", "Motiva Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

html, body {
  background: #071e44;
  font-family: var(--sl-font);
}

.sl-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 520px at 78% 88%, var(--sl-bg-2) 0%, transparent 62%),
    radial-gradient(700px 480px at 8% 0%, #062044 0%, transparent 55%),
    linear-gradient(128deg, var(--sl-bg-0) 0%, var(--sl-bg-1) 42%, var(--sl-bg-2) 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  pointer-events: none;
}

html[data-vendor-theme="1"] .sl-bg {
  background-image: var(--sl-vendor-bg);
}

.bokeh {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.42;
}
.b1 { width: 280px; height: 280px; left: -40px; top: -60px; background: #0a2f66; }
.b2 { width: 220px; height: 220px; right: 8%; bottom: -40px; background: #3d8fe8; opacity: 0.35; }
.b3 { width: 160px; height: 160px; left: 42%; top: 18%; background: #1d4f92; }
.b4 { width: 120px; height: 120px; right: 18%; top: 8%; background: #7eb6ef; opacity: 0.28; }
.b5 { width: 200px; height: 200px; left: 18%; bottom: 6%; background: #124888; opacity: 0.4; }

html[data-vendor-theme="1"] .bokeh {
  display: none;
}

.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  background: transparent;
  overflow: hidden;
}

/* Duyarlı Ana Sahne (QFrame[type="Panel"]) */
.home-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 4.2vh, 50px) clamp(20px, 3.9vw, 50px) clamp(12px, 2.4vh, 34px);
  color: #ffffff;
  overflow: hidden;
}

.sl-home-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 24px);
  flex-shrink: 0;
}

.sl-home-titles {
  min-width: 0;
}

.sl-title {
  margin: 0;
  font-size: clamp(38px, 5.8vw, 80px);
  font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 1.04;
  color: #ffffff;
}

.sl-sub {
  margin: clamp(6px, 1.2vh, 14px) 0 0;
  max-width: 86vw;
  font-size: clamp(15px, 1.9vw, 26px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--sl-muted);
}

.sl-top-actions {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1vw, 14px);
  flex-shrink: 0;
}

/* MainPanelSettingsButton / MainPanelHelpButton (QSS 96x96 referans) */
.sl-round {
  width: clamp(52px, 7.2vw, 96px);
  height: clamp(52px, 7.2vw, 96px);
  min-width: 48px;
  min-height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--sl-btn);
  color: #ffffff;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 600;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.sl-round svg {
  width: 54%;
  height: 54%;
}
.sl-round:hover { background: var(--sl-btn-hover); }
.sl-round:active { background: var(--sl-btn-pressed); }
.sl-round:focus-visible,
.sl-round.gp-focus {
  outline: none;
  background: var(--sl-btn-selected);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72);
}

html[data-vendor-theme="1"] .sl-round.sl-has-vendor-icon {
  background: transparent;
}
html[data-vendor-theme="1"] .sl-round.sl-has-vendor-icon:hover,
html[data-vendor-theme="1"] .sl-round.sl-has-vendor-icon:focus-visible,
html[data-vendor-theme="1"] .sl-round.sl-has-vendor-icon.gp-focus {
  background: transparent;
  box-shadow: none;
}

.sl-round-icon {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Ana Orta Alan: Sol Play + Devre Dışı İkonlar | Sağ 3 Durum Satırı */
.sl-home-main {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3.2vw, 48px);
  margin-top: clamp(14px, 2.8vh, 32px);
}

.sl-play-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

/* MainPanelPlayButton (QSS 315x210, iconSize 120x120, font 40px) */
.sl-start {
  width: clamp(208px, 24.6vw, 350px);
  min-height: clamp(146px, 27vh, 232px);
  padding: clamp(14px, 2.2vh, 24px) 18px;
  border: 0;
  border-radius: 0;
  background: var(--sl-btn);
  color: #ffffff;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.8vh, 18px);
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.sl-start:hover { background: var(--sl-btn-hover); }
.sl-start:focus-visible,
.sl-start.gp-focus,
.sl-start[data-selected="1"] {
  background: var(--sl-btn-selected);
  outline: none !important;
  box-shadow: none !important;
}
.sl-start:active { background: var(--sl-btn-pressed); }

.sl-play-badge {
  width: clamp(66px, 8.8vw, 120px);
  height: clamp(66px, 8.8vw, 120px);
  border-radius: 50%;
  background: #ffffff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.sl-play-badge.sl-play-badge-themed {
  background: transparent;
  border-radius: 0;
}
.sl-play-tri {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent var(--sl-play);
}
.sl-play-svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.sl-start-label {
  font-size: clamp(20px, 2.7vw, 38px);
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

/* MainPanelDisabledIconArea */
.sl-disabled-area {
  margin-top: clamp(8px, 1.4vh, 14px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 36px;
}
.sl-disabled-area img {
  width: clamp(30px, 3.6vw, 48px);
  height: clamp(30px, 3.6vw, 48px);
  object-fit: contain;
}

/* MainPanelStatusArea (Bilgisayar, Kontrolcü, Ağ) */
.sl-status-col {
  flex: 1;
  min-width: 0;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(10px, 1.8vh, 20px);
}

.sl-status {
  display: grid;
  grid-template-columns: clamp(56px, 7.6vw, 100px) 1fr clamp(32px, 4.2vw, 56px);
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  min-height: clamp(52px, 8.2vh, 76px);
  padding: 6px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.sl-status:hover { background: rgba(26, 178, 255, 0.2); }
.sl-status:focus-visible,
.sl-status.gp-focus {
  outline: none !important;
  box-shadow: none !important;
  background: rgba(0, 153, 230, 0.45);
}

.sl-status-icon,
.sl-status-icon-wrap {
  position: relative;
  width: clamp(54px, 7.4vw, 96px);
  height: clamp(42px, 5.6vw, 72px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sl-status-main,
img.sl-status-icon {
  width: 84%;
  height: 84%;
  object-fit: contain;
  display: block;
}
.sl-status-steam-badge {
  position: absolute;
  right: 2px;
  bottom: 0;
  width: clamp(18px, 2.2vw, 28px);
  height: clamp(18px, 2.2vw, 28px);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

.sl-status-text-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sl-status-label {
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 500;
  line-height: 1.2;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sl-status-sub {
  font-size: clamp(12px, 1.4vw, 18px);
  color: var(--sl-status-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sl-mark {
  width: clamp(28px, 3.6vw, 48px);
  height: clamp(28px, 3.6vw, 48px);
  border-radius: 50%;
  background: #8d97a6;
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
}
.sl-mark.ok { background: var(--sl-ok); }
.sl-mark.bad.alert { background: var(--sl-bad); }
.sl-mark.ok::after {
  content: "";
  width: 11px;
  height: 6px;
  border-left: 3px solid #143018;
  border-bottom: 3px solid #143018;
  transform: rotate(-45deg) translateY(-1px);
}
.sl-mark.sl-mark-has-icon {
  background: transparent;
  border-radius: 0;
}
.sl-mark.sl-mark-has-icon::after {
  display: none;
}
.sl-mark-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* MainPanelAppButton (Alt Oyun Kısayolları) */
.sl-home-games {
  display: flex;
  gap: clamp(10px, 1.4vw, 18px);
  margin-top: clamp(10px, 1.8vh, 20px);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.sl-home-games::-webkit-scrollbar { display: none; }
.sl-home-games[hidden] { display: none; }

.sl-home-game-btn {
  min-width: clamp(180px, 21vw, 278px);
  height: clamp(72px, 12.5vh, 130px);
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  background: var(--sl-btn);
  color: #ffffff;
  font-family: inherit;
  font-size: clamp(16px, 1.8vw, 24px);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex-shrink: 0;
}
.sl-home-game-btn:hover { background: var(--sl-btn-hover); }
.sl-home-game-btn:focus-visible,
.sl-home-game-btn.gp-focus {
  background: var(--sl-btn-selected);
  outline: none !important;
  box-shadow: none !important;
}
.sl-home-game-btn:active { background: var(--sl-btn-pressed); }
.sl-home-game-icon {
  width: clamp(28px, 3vw, 40px);
  height: clamp(28px, 3vw, 40px);
  object-fit: contain;
  flex-shrink: 0;
}

/* Durum Bildirim Şeridi (Yalnızca kullanıcıya anlamlı bildirim varsa görünür) */
.sl-home-notice {
  margin: clamp(6px, 1vh, 12px) 0 0;
  min-height: 22px;
  font-size: clamp(13px, 1.5vw, 18px);
  color: var(--sl-muted);
  text-align: left;
  flex-shrink: 0;
}
.sl-home-notice:empty {
  display: none;
}

/* Tesla Bölünmüş Ekran (773x601) ve Dar Ekranlar */
@media (max-width: 720px) {
  .sl-home-main {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .sl-start {
    width: 100%;
    min-height: 128px;
  }
  .sl-status-col {
    max-width: none;
  }
}

/* Stream menü & HUD entegrasyon stilleri */
.stream-hud {
  background: transparent;
}
.stream-stats, .btn-hud-disconnect, .btn-hud-mute, .btn-hud-icon, .sl-hud-gear {
  background: var(--sl-btn);
  color: #ffffff;
  border: 0;
  border-radius: 999px;
}
.sl-hud-gear {
  width: 48px;
  height: 48px;
  font-size: 22px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.sl-hud-gear.sl-has-vendor-icon {
  background: transparent;
}
.stream-menu {
  position: absolute;
  left: 50%;
  top: 16%;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(440px, 86vw);
  padding: 20px;
  background: rgba(16, 26, 39, 0.92);
  border: 2px solid rgba(80, 160, 179, 0.5);
}
.stream-menu[hidden] { display: none; }
.stream-menu button {
  min-height: 54px;
  padding: 10px 18px;
  border: 0;
  border-radius: 0;
  background: var(--sl-btn);
  color: #ffffff;
  font-family: inherit;
  font-size: 19px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
}
.stream-menu button:hover { background: var(--sl-btn-hover); }
.stream-menu button:focus-visible { background: var(--sl-btn-selected); outline: none !important; box-shadow: none !important; }
.stream-menu p {
  margin: 4px 0 0;
  color: var(--sl-muted);
  font-size: 14px;
  text-align: center;
}
.stream-menu-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.hud-icon-img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}
.hud-btn-icon {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  margin-right: 6px;
  object-fit: contain;
}
.btn-hud-icon.sl-has-vendor-icon,
.btn-hud-mute.sl-has-vendor-icon {
  display: grid;
  place-items: center;
  padding: 0;
  width: 44px;
  height: 44px;
}
