/* ═══════════════════════════════════════════════════════════════════════════
   style.css  —  Game viewer page styles (dark theme)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow-x: hidden; }
body {
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  background: #08081a;
  color: #dde0f0;
}

.hidden { display: none !important; }

/* ── Layout: CSS Grid (ads | game | chat | ads) ───────────────────────────── */
#stream-page {
  display: grid;
  grid-template-columns: 140px 1fr 340px 140px;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* ── Top bar (full width) ─────────────────────────────────────────────────── */
#top-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #0d0d22;
  border-bottom: 1px solid #2a2a44;
  height: 48px;
}
#top-bar .logo {
  font-size: 18px;
  font-weight: bold;
  color: #ffcc44;
  white-space: nowrap;
}

/* ── User bar (top-right) ─────────────────────────────────────────────────── */
#user-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
#user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: bold;
  color: #fff; flex-shrink: 0;
}
#user-name {
  font-size: 13px;
  color: #aab;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#user-balance {
  font-size: 14px;
  font-weight: bold;
  color: #ffcc44;
  cursor: pointer;
}
#user-balance:hover { color: #ffe488; }
#login-btn, #logout-btn {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid #4466ff;
  background: transparent;
  color: #4466ff;
  cursor: pointer;
  white-space: nowrap;
}
#login-btn:hover, #logout-btn:hover {
  background: #4466ff;
  color: #fff;
}

/* ── Ad panels ────────────────────────────────────────────────────────────── */
.ad-panel {
  background: #0d0d1f;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  gap: 12px;
  border-left: 1px solid #1a1a33;
  border-right: 1px solid #1a1a33;
  overflow-y: auto;
  height: calc(100vh - 48px);
}
.ad-panel-left  { grid-column: 1; grid-row: 2; }
.ad-panel-right { grid-column: 4; grid-row: 2; }
/* ── Sidebar ad slots (clickable → video → reward) ──────────────────────── */
.ad-slot {
  width: 100%;
  flex: 1;
  background: #12122a;
  border: 1px solid #2a2a50;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
  position: relative;
  min-height: 100px;
}
.ad-slot:hover {
  border-color: #ff8800;
}
.ad-slot .ad-empty {
  color: #444;
  font-size: 11px;
  padding: 30px 0;
}
.ad-slot .ad-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

/* ── Ad reward modal (video → claim → end-card → X close) ───────────────── */
.ad-reward-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10000;
  display: none;
  align-items: center; justify-content: center;
}
.ad-reward-modal.on { display: flex; }
.ad-reward-backdrop {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
}
.ad-reward-box {
  position: relative;
  background: #12122a;
  border: 1px solid #ff8800;
  border-radius: 12px;
  padding: 18px;
  width: 90%;
  max-width: 560px;
  text-align: center;
  z-index: 1;
}
.ad-reward-header {
  display: flex; justify-content: flex-end; align-items: center;
  margin-bottom: 10px;
}
.ad-reward-countdown {
  background: #ff8800; color: #000;
  padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: bold;
}
.ad-reward-media-area {
  position: relative;
  margin-bottom: 10px;
  border-radius: 8px; overflow: hidden;
  background: #000;
}
.ad-reward-video {
  width: 100%; max-height: 52vh; border-radius: 8px; display: block;
  background: #000;
}
.ad-reward-end-img {
  max-width: 100%; max-height: 50vh; border-radius: 8px; display: block;
  margin: 0 auto;
}
.ad-reward-progress-wrap {
  width: 100%; height: 4px; background: #2a2a50; border-radius: 2px;
  margin-top: 6px; overflow: hidden;
}
.ad-reward-progress-bar {
  height: 100%; background: #ff8800; border-radius: 2px;
  transition: width 0.3s linear; width: 0%;
}
.ad-reward-unmute {
  position: absolute; top: 8px; right: 8px;
  padding: 4px 10px; border-radius: 14px; border: none;
  background: rgba(0,0,0,0.6); color: #fff; font-size: 11px; cursor: pointer;
  z-index: 2;
}
.ad-reward-unmute:hover { background: rgba(0,0,0,0.85); }
.ad-reward-footer { text-align: center; }
.ad-reward-btn {
  padding: 8px 22px; border-radius: 8px; border: none;
  background: #ff8800; color: #000; font-size: 14px; font-weight: bold;
  cursor: pointer;
}
.ad-reward-btn:disabled {
  background: #333; color: #666; cursor: not-allowed;
}
.ad-reward-close-btn {
  background: #f44; color: #fff;
}

/* ── Main content area ───────────────────────────────────────────────────── */
#main-content {
  grid-column: 2 / 4;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 340px;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  height: calc(100vh - 48px);
}

/* Stream area (game + header) — grid col 1, row 1 */
#stream-area {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #000;
}

/* Gift grid — grid col 1, row 2 (shares row with danmaku input area) */
#gift-grid {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(12, 1fr) 1.2fr;
  gap: 3px;
  padding: 4px 6px;
  border-top: 1px solid #1a1a33;
  background: #0a0a15;
  overflow: hidden;
  align-items: stretch;
}
#gift-grid .game-gift-btn {
  min-height: 100%;
  justify-content: center;
}
#gift-grid #tip-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 100%;
}
#gift-grid #tip-amount {
  flex: 1;
  padding: 2px 4px;
  border-radius: 6px;
  border: 1px solid #2a2a44;
  background: #12122a;
  color: #fff;
  font-size: 12px;
  text-align: center;
  box-sizing: border-box;
  min-width: 0;
}
#gift-grid #tip-amount:focus {
  outline: none;
  border-color: #ffcc44;
}
#gift-grid #tip-send-btn {
  flex: 1.4;
  font-size: 10px;
  padding: 2px 4px;
  min-height: 0;
}

/* Danmaku panel — grid col 2, span both rows (list + input as one body) */
#danmaku-panel {
  grid-column: 2;
  grid-row: 1 / 3;
}

/* ── Stream header ────────────────────────────────────────────────────────── */
#stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: #0d0d22;
  border-bottom: 1px solid #1a1a33;
  flex-shrink: 0;
}
#stream-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
#anchor-name {
  font-size: 15px;
  font-weight: bold;
  color: #fff;
}
.live-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #ff3355;
  color: #fff;
  font-weight: bold;
}
#stream-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #888;
}
#viewer-count { color: #aab; }

/* ── Canvas wrapper ───────────────────────────────────────────────────────── */
#canvas-wrapper {
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
}
#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Game UI (HUD overlays) ───────────────────────────────────────────────── */
#game-ui {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}
#hud-top-left {
  position: absolute;
  top: 8px; left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#hud-top-center {
  position: absolute;
  top: 8px; left: 50%; transform: translateX(-50%);
  text-align: center;
}
#hud-top-right {
  position: absolute;
  top: 8px; right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.hud-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #fff;
}
.hud-label {
  color: #aab;
  font-size: 11px;
}

/* HP hearts & hunger icons */
#hearts, #hungers {
  display: flex;
  gap: 2px;
}
.stat-icon {
  width: 20px; height: 20px;
  transition: opacity 0.3s, filter 0.3s;
}

/* Speech bubble */
#speech-bubble {
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 13px;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Wanted indicator */
#wanted-indicator {
  color: #ff4444;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}

/* Held item */
#held-item-icon img {
  width: 22px; height: 22px;
  vertical-align: middle;
}

/* Status effects */
#status-effects {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.status-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(68, 255, 68, 0.2);
  color: #4f4;
}

/* Craft HUD */
#craft-hud {
  margin-top: 4px;
  background: rgba(0,0,0,0.6);
  padding: 4px 8px;
  border-radius: 6px;
}
#craft-label {
  font-size: 11px;
  color: #aab;
  margin-bottom: 2px;
}
#craft-slots {
  display: flex;
  gap: 4px;
}
.craft-slot {
  width: 26px; height: 26px;
  border: 1px dashed #444;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
}
.craft-slot.filled {
  border-color: #ffcc44;
  background: rgba(255,204,68,0.1);
}
.craft-slot img {
  width: 20px; height: 20px;
}
#craft-hint {
  font-size: 9px;
  color: #555;
  margin-top: 2px;
}

/* ── Danmaku panel (right of game) ────────────────────────────────────────── */
#danmaku-panel {
  width: 340px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #0d0d20;
  border-left: 1px solid #1a1a33;
}
#danmaku-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: bold;
  color: #cce;
  border-bottom: 1px solid #1a1a33;
  flex-shrink: 0;
}
#danmaku-count {
  font-size: 11px;
  color: #666;
  font-weight: normal;
}

/* Danmaku message list */
#danmaku-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 8px;
  display: block;
  scroll-behavior: smooth;
}
#danmaku-list::-webkit-scrollbar { width: 4px; }
#danmaku-list::-webkit-scrollbar-thumb { background: #2a2a44; border-radius: 2px; }

.dm-item {
  font-size: 12px;
  line-height: 1.6;
  padding: 3px 6px;
  border-radius: 4px;
  word-break: break-word;
  animation: dmFadeIn 0.2s ease-out;
  margin-bottom: 3px;
}
@keyframes dmFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.dm-user {
  color: #7799ff;
  font-weight: bold;
  margin-right: 4px;
}
.dm-text {
  color: #dde;
}
.dm-gift {
  background: rgba(255,170,0,0.08);
  border-left: 2px solid #fa0;
}
.dm-gift .dm-user { color: #ffaa44; }
.dm-superchat {
  background: rgba(255,60,60,0.1);
  border-left: 2px solid #f44;
  padding: 6px 8px;
}
.dm-superchat .dm-user { color: #ff6666; }
.dm-amount {
  float: right;
  color: #ffcc44;
  font-weight: bold;
  font-size: 14px;
}
.dm-ai {
  background: rgba(68,255,100,0.06);
  border-left: 2px solid #4c4;
}
.dm-ai-tag {
  color: #4c4;
  font-weight: bold;
  margin-right: 6px;
}
.dm-system {
  color: #888;
  font-style: italic;
  text-align: center;
}
.dm-craft {
  background: rgba(100,100,255,0.08);
  border-left: 2px solid #68f;
  font-size: 11px;
}

/* ── Danmaku message styling ──────────────────────────────────────────────── */
.game-gift-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 8px;
  border: 1px solid #2a2a44;
  background: #12122a;
  color: #ccc;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  font-size: 11px;
}
.game-gift-btn:hover {
  background: #1c1c3a;
  border-color: #5555a0;
  transform: translateY(-1px);
}
.game-gift-btn:active {
  transform: scale(0.95);
}
.game-gift-btn .gift-emoji {
  font-size: 22px;
}
.game-gift-btn .gift-name {
  font-size: 10px;
  color: #999;
}
.game-gift-btn .gift-price {
  font-size: 10px;
  color: #ffcc44;
  font-weight: bold;
}

/* ── Danmaku input ────────────────────────────────────────────────────────── */
#danmaku-input-area {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid #1a1a33;
  flex-shrink: 0;
  min-height: 72px;
  align-items: stretch;
}
#danmaku-input {
  flex: 1;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #2a2a44;
  background: #12122a;
  color: #fff;
  font-size: 13px;
  height: 100%;
  box-sizing: border-box;
}
#danmaku-input:focus {
  outline: none;
  border-color: #4466ff;
}
#danmaku-input::placeholder { color: #555; }
#danmaku-send {
  padding: 7px 16px;
  border-radius: 6px;
  border: none;
  background: #4466ff;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}
#danmaku-send:hover { background: #5577ff; }
#danmaku-input-area #superchat-open-btn {
  padding: 7px 16px;
  border-radius: 6px;
  border: 1px solid #ff8800;
  background: rgba(255,136,0,0.1);
  color: #ff8800;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  white-space: normal;
  word-break: keep-all;
  line-height: 1.1;
  text-align: center;
  min-width: 52px;
  flex-shrink: 0;
}
#danmaku-input-area #superchat-open-btn:hover { background: rgba(255,136,0,0.2); }

/* ── Superchat modal ──────────────────────────────────────────────────────── */
#superchat-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
#superchat-box {
  background: #16162f;
  border: 1px solid #2a2a55;
  border-radius: 12px;
  padding: 20px;
  width: 360px;
}
#superchat-box h3 {
  font-size: 16px;
  color: #ff6644;
  margin-bottom: 12px;
}
#sc-text {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #2a2a44;
  background: #0d0d20;
  color: #fff;
  font-size: 13px;
  margin-bottom: 10px;
}
#sc-text:focus { outline: none; border-color: #f64; }
#sc-amounts {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.sc-amt {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #2a2a44;
  background: #12122a;
  color: #ccc;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}
.sc-amt:hover { border-color: #666; }
.sc-amt.sel { border-color: #ffcc44; background: rgba(255,204,68,0.1); color: #ffcc44; }
#sc-preview-box {
  background: rgba(255,80,80,0.1);
  border: 1px solid rgba(255,80,80,0.2);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
}
#sc-pname { color: #ff6666; font-weight: bold; font-size: 13px; }
#sc-pamount { color: #ffcc44; font-weight: bold; font-size: 14px; }
#sc-ptext {
  color: #ddd;
  font-size: 13px;
  margin-top: 6px;
}
.sc-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.sc-btns button {
  padding: 8px 20px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  cursor: pointer;
}
#sc-cancel { background: #2a2a44; color: #999; }
#sc-confirm { background: #ff4444; color: #fff; font-weight: bold; }
#sc-cancel:hover { background: #3a3a55; }
#sc-confirm:hover { background: #ff5555; }

/* ── Login modal ──────────────────────────────────────────────────────────── */
#login-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
#login-box {
  background: #16162f;
  border: 1px solid #2a2a55;
  border-radius: 12px;
  padding: 28px;
  width: 340px;
  text-align: center;
}
#login-box h3 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 6px;
}
#login-box .subtitle {
  font-size: 12px;
  color: #666;
  margin-bottom: 16px;
}
#login-box input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2a2a44;
  background: #0d0d20;
  color: #fff;
  font-size: 14px;
  margin-bottom: 10px;
}
#login-box input:focus { outline: none; border-color: #4466ff; }
#login-box input::placeholder { color: #444; }
#login-error {
  font-size: 12px;
  color: #ff4444;
  min-height: 18px;
  margin-bottom: 4px;
}
#login-box .btn-row {
  display: flex;
  gap: 8px;
}
#login-box .btn-row button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}
#login-submit {
  background: #4466ff;
  color: #fff;
}
#login-submit:hover { background: #5577ff; }
#login-guest {
  background: #2a2a44;
  color: #aaa;
}
#login-guest:hover { background: #3a3a55; }

/* ── Announcements section (below the fold) ────────────────────────────────── */
#announcements-section {
  grid-column: 1 / -1;
  padding: 24px 20px;
  background: #0d0d1c;
  border-top: 2px solid #1a1a33;
}
#announcements-section .section-title {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 16px;
  text-align: center;
}
#announcements-list {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.announcement-card {
  background: #12122a;
  border: 1px solid #1c1c3a;
  border-radius: 10px;
  padding: 16px;
}
.announcement-card .ann-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.announcement-card .ann-title {
  font-size: 16px;
  font-weight: bold;
  color: #ffcc44;
}
.announcement-card .ann-time {
  font-size: 11px;
  color: #555;
}
.announcement-card .ann-body {
  font-size: 14px;
  color: #bbc;
  line-height: 1.6;
  margin-bottom: 12px;
}
.announcement-card .ann-comments {
  border-top: 1px solid #1a1a33;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ann-comment {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #0a0a1c;
}
.ann-comment .cmt-user {
  color: #7799ff;
  font-weight: bold;
  margin-right: 6px;
}
.ann-comment .cmt-text {
  color: #aab;
}
.ann-comment .cmt-time {
  font-size: 10px;
  color: #444;
  margin-left: 8px;
}
.ann-comment-input-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.ann-comment-input-row input {
  flex: 1;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #2a2a44;
  background: #0a0a1c;
  color: #fff;
  font-size: 12px;
}
.ann-comment-input-row input:focus { outline: none; border-color: #4466ff; }
.ann-comment-input-row input::placeholder { color: #444; }
.ann-comment-input-row button {
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  background: #4466ff;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.ann-comment-input-row button:hover { background: #5577ff; }

.ann-toggle {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 10px;
  border: 1px solid #1a1a33;
  border-radius: 6px;
  background: #0a0a1c;
  color: #7799ff;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.ann-toggle:hover:not(:disabled) { background: #12122a; }
.ann-toggle:disabled { color: #555; cursor: default; }
.ann-toggle .toggle-arrow { float: right; font-size: 10px; }

.ann-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 0 2px;
  font-size: 12px;
}
.ann-pagination .page-btn {
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #2a2a44;
  background: #12122a;
  color: #aab;
  font-size: 11px;
  cursor: pointer;
}
.ann-pagination .page-btn:hover:not(:disabled) { background: #1c1c3a; border-color: #4466ff; color: #fff; }
.ann-pagination .page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.ann-pagination .page-info { color: #666; min-width: 40px; text-align: center; }

/* Ann delete buttons (streamer only) */
.ann-delete-btn {
  float: right; background: none; border: 1px solid transparent; color: #666;
  font-size: 16px; cursor: pointer; padding: 0 6px; line-height: 1;
  border-radius: 4px; transition: color 0.15s, background 0.15s;
}
.ann-delete-btn:hover { color: #ff4444; background: rgba(255,68,68,0.1); border-color: #ff444466; }
.cmt-delete-btn {
  float: right; background: none; border: none; color: #555;
  font-size: 13px; cursor: pointer; padding: 0 4px; border-radius: 3px;
}
.cmt-delete-btn:hover { color: #ff4444; }

/* ── New announcement form ────────────────────────────────────────────────── */
#new-ann-form {
  max-width: 900px;
  margin: 0 auto 16px;
  display: flex;
  gap: 8px;
}
#new-ann-form input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #2a2a44;
  background: #12122a;
  color: #fff;
  font-size: 14px;
}
#new-ann-form input:focus { outline: none; border-color: #ffcc44; }
#new-ann-form input::placeholder { color: #444; }
#new-ann-form button {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: #ff8800;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}
#new-ann-form button:hover { background: #ff9900; }
#new-ann-form textarea {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #2a2a44;
  background: #12122a;
  color: #fff;
  font-size: 14px;
  resize: vertical;
  min-height: 40px;
}
#new-ann-form textarea:focus { outline: none; border-color: #ffcc44; }

#user-bar #bgm-mute-btn { flex-shrink:0; border:1px solid #4a3b17; border-radius:6px; background:rgba(18,18,42,.9); color:#ffdc6b; padding:4px 8px; cursor:pointer; font-size:12px; }
#bgm-mute-btn[aria-pressed="true"] { color:#aaa; border-color:#444; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  #stream-page {
    grid-template-columns: 1fr 360px;
    grid-template-rows: auto 1fr auto;
  }
  .ad-panel-left  { display: none; }
  .ad-panel-right { display: none; }
  #main-content { grid-column: 1; grid-row: 2; }
}

@media (max-width: 800px) {
  #stream-page {
    grid-template-columns: 1fr;
  }
  #main-content {
    grid-column: 1;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto 1fr;
  }
  #stream-area { grid-column: 1; grid-row: 1; }
  #gift-grid { grid-column: 1; grid-row: 2; }
  #danmaku-panel {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    max-height: 320px;
    border-left: none;
    border-top: 1px solid #1a1a33;
  }
  #top-bar { flex-wrap: wrap; height: auto; gap: 6px; }
  #announcements-section { padding: 16px 10px; }
}
