/* Real-service integration layer. The demo UI files stay untouched except for
   the small documented patches; this file only styles the auth gate and the
   real-service status feedback. */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  color: #f2f3ff;
  background:
    radial-gradient(ellipse 620px 440px at 82% -10%, #334f9e55, transparent 70%),
    radial-gradient(ellipse 580px 420px at 10% 8%, #4a2f7a38, transparent 70%),
    #030408;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-y: auto;
}
.auth-gate[hidden] { display: none !important; }
.auth-gate-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.auth-gate-brand img { display: block; object-fit: contain; }
.auth-gate-brand img.volcengine-logo { width: 120px; height: 27px; background: transparent; }
.auth-gate-brand img.doubao-brand { width: 96px; height: 26px; }
.auth-gate-brand .auth-gate-rolling { width: 122px; height: 22px; }
.auth-gate-brand i { width: 1px; height: 18px; background: #bac4ec40; }

.auth-gate-card {
  width: min(100%, 420px);
  padding: 30px 26px 27px;
  border: 1px solid #93a8d92e;
  border-radius: 24px;
  background: linear-gradient(145deg, #141d33, #080d19);
  box-shadow: 0 24px 70px #00000080, inset 0 1px 0 #ffffff12;
  text-align: center;
}
.auth-gate-kicker { margin: 0 0 12px; color: #8e9dbe; font-size: 11px; letter-spacing: 2.4px; }
.auth-gate-card h1 { margin: 0; color: #f2f4ff; font-size: 27px; line-height: 1.4; font-weight: 600; letter-spacing: -.4px; }
.auth-gate-card #auth-gate-message { margin: 14px 0 0; color: #98a6c6; font-size: 13px; line-height: 1.85; }
.auth-gate-primary, .auth-gate-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 22px;
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
}
.auth-gate-primary { border: 1px solid #b9c6ff66; background: linear-gradient(110deg, #4a56b8, #3a4a8f); color: #f2f5ff; box-shadow: 0 10px 28px #050914; }
.auth-gate-primary:active { background: linear-gradient(110deg, #5562c6, #40529c); }
.auth-gate-secondary { border: 1px solid #ffffff1f; background: #101828; color: #c6d0ec; }
.auth-gate-hint { margin: 18px 0 0; color: #6f7c9a; font-size: 10px; line-height: 1.8; }
.auth-gate.is-error .auth-gate-card { border-color: #e4879640; }

/* Meeting selection inside the auth gate. */
.meeting-gate { margin-top: 18px; text-align: left; }
.meeting-gate[hidden] { display: none !important; }
.meeting-list { display: grid; gap: 10px; max-height: min(46vh, 360px); overflow-y: auto; padding: 2px; overscroll-behavior: contain; }
.meeting-loading { margin: 16px 0; color: #8e9dbe; font-size: 12px; text-align: center; }
.meeting-option {
  width: 100%;
  min-height: 64px;
  padding: 13px 15px;
  border: 1px solid #8fa4d43d;
  border-radius: 14px;
  background: linear-gradient(145deg, #18233d, #0d1422);
  color: #e5ebff;
  text-align: left;
  display: grid;
  gap: 5px;
}
.meeting-option strong { font-size: 15px; font-weight: 600; line-height: 1.45; }
.meeting-option span { font-size: 11px; color: #8d9cbb; line-height: 1.6; word-break: break-all; }
.meeting-option.is-current { border-color: #aebcff99; box-shadow: inset 0 0 0 1px #aebcff33, 0 0 24px #5f6fc21f; }
.meeting-option:active { background: #223152; }
.meeting-option:disabled { opacity: .55; }
.meeting-empty { margin: 16px 0 0; color: #98a6c6; font-size: 13px; line-height: 1.8; text-align: center; }
.meeting-actions { display: grid; gap: 10px; margin-top: 16px; }
.meeting-actions .auth-gate-secondary { margin-top: 0; }
.auth-gate-link { min-height: 44px; border: 0; background: none; color: #8f9dbc; font-size: 12px; }

/* A small account entry in the demo header; logout lives in the meeting gate. */
.session-switch {
  flex-shrink: 0;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #9fb2e04a;
  border-radius: 999px;
  background: #10182bcc;
  color: #b9c6e8;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}
.session-switch:active { background: #1a2742; }
@media (max-width: 360px) {
  .session-switch { padding: 5px 8px; font-size: 0; }
  .session-switch::after { content: "切换"; font-size: 10px; }
}
.real-preview-badge {
  position: fixed;
  z-index: 110;
  top: auto;
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 12px;
  padding: 6px 11px;
  border: 1px solid #d7b96a4d;
  border-radius: 999px;
  background: #10182bf2;
  color: #d7b96a;
  font-size: 10px;
  line-height: 1.5;
  white-space: nowrap;
  pointer-events: none;
}
.real-toast {
  position: fixed;
  z-index: 115;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translate(-50%, 8px);
  width: min(calc(100% - 34px), 380px);
  padding: 12px 16px;
  border: 1px solid #ffffff1f;
  border-radius: 13px;
  background: #10182bf2;
  color: #e6ecff;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.real-toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.real-toast.is-error { border-color: #e4879655; color: #f0a6b2; }
.real-toast.is-warning { border-color: #d7b96a55; color: #e7c489; }
@media (min-width: 768px) {
  .auth-gate-card { padding: 36px 34px 32px; }
  .auth-gate-card h1 { font-size: 32px; }
  .auth-gate-card #auth-gate-message { font-size: 15px; }
  .auth-gate-primary, .auth-gate-secondary { min-height: 56px; font-size: 16px; }
}

.review-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 28px 18px;
  border: 1px dashed #ffffff1f;
  border-radius: 18px;
  color: #8e9ebc;
  font-size: 13px;
  line-height: 1.9;
  text-align: center;
}

/* Stage-curve alignment: the three participant actions keep the demo's
   geometry, motion and layout, and only retint their main/stroke/glow states.
   Like = stage blue-violet, save = stage cyan, comment = stage amber. */
:root {
  --stage-like: #a8b2ff;
  --stage-like-deep: #6c79ee;
  --stage-like-rgb: 168, 178, 255;
  --stage-like-deep-rgb: 108, 121, 238;
  --stage-save: #58c5d2;
  --stage-save-rgb: 88, 197, 210;
  --stage-comment: #e6b86a;
  --stage-comment-rgb: 230, 184, 106;
  --stage-note: #c5afff;
  --stage-note-rgb: 197, 175, 255;
}

/* Like: blue-violet */
#send-like {
  border-color: rgba(var(--stage-like-rgb), .5);
  background:
    radial-gradient(ellipse at 75% 0%, rgba(var(--stage-like-rgb), .28), transparent 65%),
    linear-gradient(145deg, rgba(var(--stage-like-deep-rgb), .46), #171c423b 63%, #48536f38);
  box-shadow: inset 0 1px 0 rgba(var(--stage-like-rgb), .24), 0 15px 45px #070514;
}
#send-like:before { border-color: rgba(var(--stage-like-rgb), .2); }
#send-like > svg {
  color: var(--stage-like);
  filter: drop-shadow(0 0 12px rgba(var(--stage-like-deep-rgb), .45));
}
#send-like > #like-feedback { color: rgba(var(--stage-like-rgb), .82); }
#send-like:active {
  border-color: rgba(var(--stage-like-rgb), .82);
  background:
    radial-gradient(ellipse at 22% 4%, rgba(var(--stage-like-rgb), .24), transparent 82%),
    #1a2146;
  box-shadow: inset 0 0 38px rgba(var(--stage-like-rgb), .16), 0 0 28px rgba(var(--stage-like-deep-rgb), .24);
}
#send-like.pressed {
  border-color: var(--stage-like);
  box-shadow: inset 0 0 45px rgba(var(--stage-like-rgb), .2), 0 0 34px rgba(var(--stage-like-deep-rgb), .3);
}
.like-orbits {
  border-color: rgba(var(--stage-like-rgb), .13);
  box-shadow: 0 0 0 24px rgba(var(--stage-like-rgb), .035), 0 0 0 48px rgba(var(--stage-like-rgb), .02);
}
#send-like > .like-spark {
  color: #eef2ff;
  text-shadow: 0 0 12px rgba(var(--stage-like-rgb), .9), 0 0 35px rgba(var(--stage-like-deep-rgb), .65);
}
.tap-ring {
  border-color: var(--stage-like);
  box-shadow: 0 0 24px rgba(var(--stage-like-deep-rgb), .55), inset 0 0 20px rgba(var(--stage-like-rgb), .25);
}
.tap-particle {
  background: var(--stage-like);
  box-shadow: 0 0 12px var(--stage-like);
}
.tap-particle:nth-child(2n) {
  background: #d3d9ff;
  box-shadow: 0 0 14px rgba(var(--stage-like-rgb), .9);
}

/* Save / screenshot: cyan */
#save-frame {
  border-color: rgba(var(--stage-save-rgb), .38);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(var(--stage-save-rgb), .13), transparent 70%),
    linear-gradient(145deg, #132b394b, #0b121c88);
}
#save-frame > svg {
  color: var(--stage-save);
  filter: drop-shadow(0 0 10px rgba(var(--stage-save-rgb), .35));
}
#save-frame > strong { color: #e9fcff; }
#save-frame > span { color: rgba(var(--stage-save-rgb), .75); }
#save-frame:hover { border-color: rgba(var(--stage-save-rgb), .58); }
#save-frame:active {
  border-color: rgba(var(--stage-save-rgb), .86);
  background:
    radial-gradient(ellipse at 88% 8%, rgba(var(--stage-save-rgb), .2), transparent 82%),
    #0c1e22;
  box-shadow: inset 0 0 32px rgba(var(--stage-save-rgb), .14), 0 0 24px rgba(var(--stage-save-rgb), .2);
}
#save-frame.is-saved {
  border-color: rgba(var(--stage-save-rgb), .72);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(var(--stage-save-rgb), .2), transparent 70%),
    linear-gradient(145deg, rgba(var(--stage-save-rgb), .14), #0b191c88);
}
#save-frame.is-saved > svg {
  color: #b9f5fb;
  filter: drop-shadow(0 0 10px rgba(var(--stage-save-rgb), .55));
}

/* Comment: amber */
#open-comment {
  border-color: rgba(var(--stage-comment-rgb), .38);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(var(--stage-comment-rgb), .13), transparent 70%),
    linear-gradient(145deg, #25204766, #0d111b88);
}
#open-comment > svg {
  color: var(--stage-comment);
  filter: drop-shadow(0 0 10px rgba(var(--stage-comment-rgb), .35));
}
#open-comment > strong { color: #fff4dc; }
#open-comment > span { color: rgba(var(--stage-comment-rgb), .75); }
#open-comment:hover { border-color: rgba(var(--stage-comment-rgb), .58); }
#open-comment:active {
  border-color: rgba(var(--stage-comment-rgb), .86);
  background:
    radial-gradient(ellipse at 30% 94%, rgba(var(--stage-comment-rgb), .2), transparent 82%),
    #241f16;
  box-shadow: inset 0 0 32px rgba(var(--stage-comment-rgb), .14), 0 0 24px rgba(var(--stage-comment-rgb), .2);
}


/* Personal note: violet, distinct from the public amber danmaku. */
#open-note {
  border-color: rgba(var(--stage-note-rgb), .38);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(var(--stage-note-rgb), .14), transparent 70%),
    linear-gradient(145deg, #2c254766, #0d111b88);
  box-shadow: inset 0 1px 0 rgba(var(--stage-note-rgb), .16);
}
#open-note > svg {
  color: var(--stage-note);
  filter: drop-shadow(0 0 10px rgba(var(--stage-note-rgb), .4));
}
#open-note > strong { color: #f4efff; }
#open-note > span { color: rgba(var(--stage-note-rgb), .75); }
#open-note:hover { border-color: rgba(var(--stage-note-rgb), .58); }
#open-note:active {
  border-color: rgba(var(--stage-note-rgb), .86);
  background:
    radial-gradient(ellipse at 50% 94%, rgba(var(--stage-note-rgb), .2), transparent 82%),
    #1d1830;
  box-shadow: inset 0 0 32px rgba(var(--stage-note-rgb), .14), 0 0 24px rgba(var(--stage-note-rgb), .2);
}

/* Feedback panels reuse the action colors without changing their motion. */
.capture-feedback {
  border-color: rgba(var(--stage-save-rgb), .5);
  background: linear-gradient(125deg, rgba(30, 60, 72, .96), #171c35fa);
  box-shadow: inset 0 1px rgba(var(--stage-save-rgb), .24), 0 16px 60px #0009;
}
.capture-preview { border-color: rgba(var(--stage-save-rgb), .36); }
.capture-feedback-copy strong { color: #e9fcff; }
.capture-feedback-copy p { color: rgba(var(--stage-save-rgb), .76); }
.capture-success {
  border-color: rgba(var(--stage-save-rgb), .82);
  color: #d7fbff;
  background: rgba(var(--stage-save-rgb), .18);
}
.capture-countdown { background: linear-gradient(90deg, var(--stage-save), #a6f2f8); }

.comment-feedback {
  border-color: rgba(var(--stage-comment-rgb), .5);
  background:
    radial-gradient(ellipse at 8% 0%, rgba(var(--stage-comment-rgb), .16), transparent 80%),
    #1a2036f5;
  box-shadow: inset 0 1px rgba(var(--stage-comment-rgb), .24), 0 14px 50px #0008;
}
.comment-feedback-art { filter: drop-shadow(0 0 10px rgba(var(--stage-comment-rgb), .35)); }
.comment-feedback-art path {
  fill: rgba(var(--stage-comment-rgb), .12);
  stroke: var(--stage-comment);
}
.comment-feedback-art circle { fill: #ffe8bd; }
.comment-feedback-art i { background: var(--stage-comment); }
.comment-feedback-art i:nth-of-type(3) { background: #ffe8bd; }
.comment-feedback-copy strong { color: #fff4dc; }
.comment-feedback-copy p { color: #c6c2b6; }
#comment-feedback-close { color: #c8bda5; }

/* Keep the three-logo auth-gate brand row inside narrow phone widths. */
@media (max-width: 520px) {
  .auth-gate-brand { gap: 7px; }
  .auth-gate-brand img.volcengine-logo { width: 90px; height: 20px; background: transparent; }
  .auth-gate-brand img.doubao-brand { width: 66px; height: 18px; }
  .auth-gate-brand .auth-gate-rolling { width: 96px; height: 17px; }
  .auth-gate-brand i { height: 14px; }
}
