/* 全局 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #0a0a14; color: #e0e0e0; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* 顶部 */
.topbar {
  background: rgba(10,10,20,0.95); border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}
.logo { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: -0.5px; }
.logo span { color: #ff6b35; }

.topbar-links { display: flex; gap: 4px; }
.topbar-links a {
  padding: 8px 16px; border-radius: 8px; font-size: 14px; color: #888;
  transition: all 0.2s;
}
.topbar-links a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.topbar-links a.active { background: rgba(255,107,53,0.15); color: #ff6b35; }

/* 主内容 */
.main-content { padding: 28px 16px 60px; display: flex; flex-direction: column; gap: 20px; }

/* Hero */
.hero {
  text-align: center; padding: 50px 20px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px; border: 1px solid rgba(255,255,255,0.06);
}
.hero h1 { font-size: 32px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.hero p { font-size: 15px; color: #888; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* 步骤卡片 */
.steps-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px;
}
.step-card {
  background: #1a1a2e; border-radius: 14px; padding: 22px;
  border: 1px solid rgba(255,255,255,0.05);
}
.step-num {
  width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#ff6b35,#ff4757);
  color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.step-card h3 { font-size: 16px; color: #fff; margin-bottom: 8px; }
.step-card p { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 10px; }
.step-card a { font-size: 13px; color: #ff6b35; }
.step-tag { font-size: 12px; color: #555; background: rgba(255,255,255,0.04); padding: 3px 8px; border-radius: 4px; }

/* 通用卡片 */
.card {
  background: #12121e; border-radius: 16px; padding: 24px;
  border: 1px solid rgba(255,255,255,0.05);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.card-header h2 { font-size: 18px; color: #fff; }

/* 服务器标签 */
.server-badge {
  font-size: 11px; background: rgba(46,213,115,0.12); color: #2ed573;
  padding: 3px 10px; border-radius: 20px; border: 1px solid rgba(46,213,115,0.2);
}
.badge-hint {
  font-size: 12px; color: #555;
}

/* 按钮 */
.btn-primary {
  display: inline-block; padding: 12px 28px; border-radius: 10px;
  background: linear-gradient(135deg, #ff6b35, #ff4757);
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
  border: none; transition: opacity 0.2s, transform 0.15s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-secondary {
  display: inline-block; padding: 10px 24px; border-radius: 10px;
  background: transparent; border: 2px solid rgba(255,255,255,0.15);
  color: #fff; font-size: 14px; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover { border-color: #ff6b35; background: rgba(255,107,53,0.08); }

.btn-ghost {
  display: inline-block; padding: 10px 20px; border-radius: 10px;
  background: transparent; color: #555; font-size: 14px; cursor: pointer;
  transition: color 0.2s;
}
.btn-ghost:hover { color: #ff4757; }

/* 表单 */
.live-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 14px; color: #888; }
.form-group input, .form-group textarea {
  background: #1a1a2e; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 12px 14px; color: #fff; font-size: 15px; outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: #ff6b35; }
.form-group textarea { resize: vertical; }
.form-group small { font-size: 12px; color: #444; }

/* 提示 */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert.success { background: rgba(46,213,115,0.1); color: #2ed573; border-left: 3px solid #2ed573; }
.alert.error { background: rgba(255,71,87,0.1); color: #ff4757; border-left: 3px solid #ff4757; }

/* 直播间信息 */
.stream-info { display: flex; flex-direction: column; gap: 16px; }
.stream-name-display {
  display: flex; align-items: center; gap: 14px;
  background: #1a1a2e; border-radius: 10px; padding: 14px 16px;
}
.stream-name-display .label { font-size: 12px; color: #555; white-space: nowrap; }
.stream-name-display .value { font-size: 18px; font-weight: 700; color: #fff; font-family: monospace; }

.url-row { display: flex; flex-direction: column; gap: 6px; }
.url-row .label { font-size: 12px; color: #555; }
.url-box {
  background: #0f0f1a; border-radius: 8px; padding: 10px 12px;
  display: flex; align-items: flex-start; gap: 8px;
}
.url-box code { font-size: 12px; color: #2ed573; font-family: 'Courier New', monospace; word-break: break-all; flex: 1; }
.copy-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; padding: 3px 10px; color: #888; font-size: 12px; cursor: pointer; white-space: nowrap;
  transition: all 0.2s;
}
.copy-btn:hover { background: rgba(255,107,53,0.15); color: #ff6b35; border-color: rgba(255,107,53,0.3); }
.url-row small { font-size: 11px; color: #444; }

.stream-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* OBS 提示 */
.obs-hint {
  background: #1a1a2e; border-radius: 12px; padding: 16px;
  border: 1px solid rgba(255,165,0,0.15);
}
.obs-hint h4 { font-size: 14px; color: #ffa502; margin-bottom: 10px; }
.hint-row { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.hint-row span { font-size: 12px; color: #555; min-width: 60px; }
.hint-row code { font-size: 12px; color: #2ed573; font-family: monospace; }

/* 主播工具 - 双栏布局 */
@media (min-width: 768px) {
  .main-content.has-two { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}

/* 视频区 */
.video-wrap {
  width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden;
  position: relative; margin-bottom: 12px;
}
#localVideo { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: none; }
.video-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6); color: #555; font-size: 15px;
}

/* 推流工具栏 */
.push-tools { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tool-btn {
  flex: 1; min-width: 60px; padding: 9px 6px; border: 2px solid #2a2a3e;
  border-radius: 10px; background: #1a1a2e; color: #888; font-size: 13px; cursor: pointer;
  text-align: center; transition: all 0.2s;
}
.tool-btn:hover { border-color: #ff6b35; color: #ff6b35; }
.tool-btn.off { border-color: #ff4757; color: #ff4757; background: rgba(255,71,87,0.07); }

/* 推流按钮 */
.btn-start-push {
  width: 100%; padding: 15px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, #ff4757, #ff6b35);
  color: #fff; font-size: 17px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,71,87,0.3); transition: all 0.2s;
  margin-bottom: 10px;
}
.btn-start-push:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(255,71,87,0.4); }
.btn-start-push:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-start-push.pushing {
  background: linear-gradient(135deg, #2ed573, #1abc9c);
  box-shadow: 0 4px 20px rgba(46,213,115,0.3);
}

.push-status { font-size: 13px; text-align: center; color: #888; min-height: 20px; }

.push-placeholder {
  aspect-ratio: 16/9; background: #1a1a2e; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: #444; margin-bottom: 14px;
}
.placeholder-icon { font-size: 48px; opacity: 0.3; }
.push-placeholder p { font-size: 14px; }

/* 播放器 */
.player-wrap { width: 100%; max-width: 900px; margin-bottom: 16px; }
.prism-player { width: 100%; height: 480px; }

/* 播放信息 */
.player-info { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.info-row {
  display: flex; align-items: flex-start; gap: 12px;
  background: #1a1a2e; border-radius: 8px; padding: 10px 14px;
}
.info-row span { font-size: 12px; color: #555; min-width: 90px; padding-top: 1px; }
.info-row code { font-size: 12px; color: #aaa; font-family: 'Courier New', monospace; word-break: break-all; }

/* 技术说明 */
.info-card .card-header { margin-bottom: 16px; }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.tech-item { display: flex; gap: 12px; }
.tech-icon { font-size: 28px; flex-shrink: 0; }
.tech-info h4 { font-size: 14px; color: #fff; margin-bottom: 4px; }
.tech-info p { font-size: 12px; color: #555; line-height: 1.6; }
.tech-info code { color: #2ed573; font-family: monospace; }

/* 直播标签 */
.live-badge {
  background: #ff4757; color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; animation: lp 1.5s infinite;
}
@keyframes lp { 0%,100%{opacity:1} 50%{opacity:0.5} }

/* Toast */
.toast {
  position: fixed; top: 75px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.88); padding: 10px 22px; border-radius: 10px;
  font-size: 14px; z-index: 9999; pointer-events: none;
  border-left: 3px solid #ffa502; color: #fff;
}
.toast.success { border-left-color: #2ed573; }
.toast.error { border-left-color: #ff4757; }

/* 响应式 */
@media (max-width: 600px) {
  .hero h1 { font-size: 24px; }
  .topbar-links a { padding: 8px 10px; font-size: 13px; }
  .card { padding: 16px; }
  .prism-player { height: 280px; }
}
