/* ===== 屏幕共享：设置面板 ===== */

.screen-quality-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.screen-quality-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--voice-border);
  background: color-mix(in srgb, var(--voice-panel) 70%, transparent);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.screen-quality-option:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--voice-accent) 45%, transparent);
}

.screen-quality-option.is-active {
  border-color: color-mix(in srgb, var(--voice-accent) 70%, transparent);
  background: color-mix(in srgb, var(--voice-accent) 12%, transparent);
}

.screen-quality-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.screen-quality-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--voice-text);
}

.screen-quality-meta {
  font-size: 11.5px;
  color: var(--voice-muted);
  letter-spacing: .01em;
}

.screen-share-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--voice-border);
  background: color-mix(in srgb, var(--voice-panel) 70%, transparent);
  margin-top: 10px;
}

.screen-share-switch-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.screen-share-switch-copy b {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--voice-text);
}

.screen-share-switch-copy span {
  font-size: 11.5px;
  color: var(--voice-muted);
  line-height: 1.5;
}

.screen-share-switch input[type="checkbox"] {
  width: 42px;
  height: 24px;
  appearance: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--voice-text) 18%, transparent);
  position: relative;
  cursor: pointer;
  transition: background .2s ease;
  flex: 0 0 auto;
}

.screen-share-switch input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .25);
  transition: transform .2s ease;
}

.screen-share-switch input[type="checkbox"]:checked {
  background: var(--voice-accent);
}

.screen-share-switch input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

.screen-share-hint {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--voice-muted);
}

.screen-share-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--voice-accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--voice-accent) 25%, transparent);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--voice-text);
  display: none;
}

.screen-share-status.is-visible {
  display: block;
}

/* ===== 屏幕共享：观看浮层 ===== */

.screen-stage {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 15, 30, .82);
  backdrop-filter: blur(12px);
}

.screen-stage.is-visible {
  display: flex;
}

.screen-stage-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.screen-stage-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #f8fafc;
  font-size: 13px;
  backdrop-filter: blur(14px);
  align-self: center;
  max-width: 100%;
}

.screen-stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .18);
  flex: 0 0 auto;
}

.screen-stage-label {
  font-weight: 600;
  letter-spacing: .01em;
}

.screen-stage-meta {
  color: rgba(248, 250, 252, .72);
  font-size: 12px;
}

.screen-stage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-left: 12px;
}

.screen-stage-btn {
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  color: #f8fafc;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s ease;
}

.screen-stage-btn:hover {
  background: rgba(255, 255, 255, .18);
}

.screen-stage-video-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
}

.screen-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.screen-stage-audio-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .78);
  color: #f8fafc;
  font-size: 12.5px;
  border: 1px solid rgba(255, 255, 255, .16);
  cursor: pointer;
  display: none;
}

.screen-stage-audio-hint.is-visible {
  display: block;
}

@media (max-width: 720px) {
  .screen-stage {
    padding: 10px;
  }

  .screen-stage-bar {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 18px;
    font-size: 12px;
  }

  .screen-stage-actions {
    margin-left: 0;
    padding-left: 0;
  }

  .screen-quality-options {
    grid-template-columns: 1fr;
  }
}
