/* VogChat home page demo (demo.js): a phone playing real use. Light colors = the app's own. */
.demo-sec .demo-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
[data-vog-demo] { --dm-green: #00a884; --dm-gd: #008069; --dm-text: #111b21; --dm-meta: #667781; --dm-sunk: #f0f2f5; --dm-line: #e9edef; display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
.dm-phone { position: relative; width: 300px; height: 620px; border-radius: 46px; border: 10px solid #121518; background: #fff; overflow: hidden; box-shadow: 0 30px 70px rgba(0, 60, 45, .28), 0 8px 20px rgba(0, 0, 0, .12); transition: background .4s; }
.dm-phone.dark { background: #0b141a; }
.dm-island { position: absolute; left: 50%; top: 9px; width: 88px; height: 25px; margin-left: -44px; border-radius: 13px; background: #000; z-index: 5; }
.dm-status { position: absolute; left: 0; right: 0; top: 0; height: 40px; z-index: 4; display: flex; align-items: center; justify-content: space-between; padding: 4px 22px 0 30px; font: 600 12px/1 Inter, system-ui, sans-serif; color: var(--dm-text); }
.dark .dm-status { color: #fff; }
.dm-batt { width: 19px; height: 9px; border: 1.2px solid currentColor; border-radius: 3px; padding: 1px; opacity: .9; }
.dm-batt i { display: block; height: 100%; width: 78%; background: currentColor; border-radius: 1px; }
.dm-screen { position: absolute; inset: 0; font-family: Inter, system-ui, sans-serif; color: var(--dm-text); text-align: left; }
.dm-scene { position: absolute; inset: 0; }
.dm-scene svg { flex: none; display: block; }

/* scene 1: open rooms */
.dm-open { padding: 46px 12px 0; display: flex; flex-direction: column; gap: 9px; }
.dm-big { font-size: 23px; font-weight: 800; letter-spacing: -.4px; }
.dm-live { display: flex; align-items: center; gap: 6px; font-size: 9.5px; font-weight: 600; color: var(--dm-meta); }
.dm-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--dm-green); box-shadow: 0 0 0 3px rgba(0, 168, 132, .2); animation: dm-ping 1.6s ease-out infinite; }
@keyframes dm-ping { 50% { box-shadow: 0 0 0 6px rgba(0, 168, 132, 0); } }
.dm-chips { display: flex; gap: 5px; }
.dm-chips span { border: 1px solid var(--dm-line); border-radius: 999px; padding: 4px 9px; font-size: 9.5px; font-weight: 600; }
.dm-chips .on { background: var(--dm-green); border-color: var(--dm-green); color: #fff; }
.dm-orows { display: flex; flex-direction: column; gap: 6px; }
.dm-orow { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 13px; background: var(--dm-sunk); opacity: 0; transform: translateY(12px); }
.go .dm-orow, .still .dm-orow { animation: dm-in .5s cubic-bezier(.2, .8, .2, 1) calc(.3s + var(--i) * .22s) both; }
.still .dm-orow { animation-duration: 0s; animation-delay: 0s; }
@keyframes dm-in { to { opacity: 1; transform: none; } }
.dm-oic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.dm-otx { flex: 1; min-width: 0; }
.dm-otx b { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-otx small { display: block; font-size: 9px; color: var(--dm-meta); margin-top: 1px; }
.dm-otx em { font-style: normal; font-weight: 700; color: var(--dm-text); }
.dm-dots { display: flex; gap: 2px; margin-top: 3px; }
.dm-dots i { width: 5px; height: 5px; border-radius: 50%; display: block; }
.dm-join { position: relative; flex: none; background: var(--dm-green); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 6px 11px; }
.go .dm-join.tap { animation: dm-tap .5s ease 3.9s both; }
.go .dm-join.tap::after { content: ""; position: absolute; inset: 0; border-radius: 999px; box-shadow: 0 0 0 0 rgba(0, 168, 132, .55); animation: dm-ring .7s ease-out 3.9s both; }
@keyframes dm-tap { 40% { transform: scale(.88); } to { transform: none; } }
@keyframes dm-ring { to { box-shadow: 0 0 0 14px rgba(0, 168, 132, 0); } }

/* scene 2: chat with voice messages */
.dm-voice { background: linear-gradient(160deg, #e9f6ee 0%, #d6efe0 45%, #e7f3ea 100%); }
.dm-hdr { position: absolute; left: 0; right: 0; top: 40px; display: flex; align-items: center; gap: 6px; padding: 0 8px; }
.dm-glass, .dm-pill { background: rgba(255, 255, 255, .88); box-shadow: 0 2px 6px rgba(0, 0, 0, .07); color: #3b4a54; }
.dm-glass { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.dm-av { width: 28px; height: 28px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; flex: none; }
.dm-peer { flex: 1; min-width: 0; }
.dm-peer b { display: block; font-size: 12px; }
.dm-peer small { font-size: 9px; color: var(--dm-meta); }
.dm-pill { display: flex; gap: 12px; align-items: center; height: 30px; border-radius: 15px; padding: 0 11px; }
.dm-msgs { position: absolute; left: 8px; right: 8px; bottom: 66px; display: flex; flex-direction: column; gap: 4px; }
.dm-row { display: flex; }
.dm-day { align-self: center; background: #fff; border-radius: 7px; padding: 3px 9px; font-size: 9.5px; font-weight: 600; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); margin-bottom: 6px; }
.dm-note { align-self: center; max-width: 230px; display: flex; gap: 5px; align-items: center; background: #ffeecd; color: #54656f; border-radius: 7px; padding: 5px 9px; font-size: 9px; line-height: 12px; text-align: center; margin-bottom: 8px; }
.dm-row.in { justify-content: flex-start; }
.dm-row.out { justify-content: flex-end; }
.dm-bub { max-width: 80%; font-size: 11.5px; line-height: 15px; padding: 6px 9px; border-radius: 13px; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.dm-bub.i { background: #fff; border-bottom-left-radius: 3px; }
.dm-bub.o { background: #d9fdd3; border-bottom-right-radius: 3px; }
.dm-v .dm-bub { display: flex; align-items: center; gap: 7px; width: 168px; }
.dm-play { width: 24px; height: 24px; border-radius: 50%; background: var(--dm-green); color: #fff; display: grid; place-items: center; flex: none; }
.dm-wave { flex: 1; display: flex; align-items: center; justify-content: space-between; height: 18px; }
.dm-wave i { width: 2px; border-radius: 1px; display: block; background: var(--dm-meta); opacity: .45; }
.dm-len { font-size: 9px; color: var(--dm-meta); }
.dm-msgs .dm-row { opacity: 0; transform: translateY(8px) scale(.97); }
.go .dm-row.s1 { animation: dm-in .4s ease .3s both; }
.go .dm-row.s2 { animation: dm-in .4s ease 1.1s both; }
.go .dm-row.s3 { animation: dm-in .4s ease 1.9s both; }
.go .dm-row.s4 { animation: dm-in .4s ease 2.7s both; }
.go .dm-row.s5 { animation: dm-in .4s ease 4.6s both; }
.dm-row.s7 { display: none; }
.dm-row.s7.in { display: flex; animation: dm-in .4s ease both; }
.still .dm-msgs .dm-row:not(.s7) { opacity: 1; transform: none; }
/* the incoming voice message plays: its bars turn green one after another */
.go .s4 .dm-wave i { animation: dm-bar .01s linear both; animation-delay: calc(3.1s + var(--b, 0) * 1s); }
@keyframes dm-bar { to { background: var(--dm-green); opacity: 1; } }
.dm-comp { position: absolute; left: 0; right: 0; bottom: 0; height: 58px; padding: 6px 8px 22px; background: #f6f5f3; display: flex; align-items: center; gap: 6px; color: #3b4a54; }
.dm-input { flex: 1; height: 26px; border-radius: 13px; background: #fff; border: .5px solid #e4e2de; font-size: 10.5px; color: var(--dm-meta); display: flex; align-items: center; padding: 0 10px; }
.dm-mic { width: 26px; height: 26px; display: grid; place-items: center; }
.dm-rec { position: absolute; inset: 6px 8px 22px; display: none; align-items: center; gap: 6px; background: #f6f5f3; }
.recording .dm-rec { display: flex; animation: dm-in .2s ease both; }
.dm-trash { color: #e5484d; width: 26px; display: grid; place-items: center; }
.dm-recbox { flex: 1; height: 26px; border-radius: 13px; background: #fff; border: .5px solid #e4e2de; display: flex; align-items: center; gap: 7px; padding: 0 10px; font-size: 10.5px; color: var(--dm-meta); }
.dm-recbox i { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; animation: dm-blink 1s steps(2) infinite; }
.dm-rect { color: var(--dm-text); font-variant-numeric: tabular-nums; }
@keyframes dm-blink { 50% { opacity: .25; } }
.dm-send { width: 26px; height: 26px; border-radius: 50%; background: var(--dm-green); color: #fff; display: grid; place-items: center; }

/* scene 3: group video call */
.dm-call { background: #0b141a; color: #e9edef; display: flex; flex-direction: column; padding: 44px 8px 26px; }
.dm-ctop { display: flex; align-items: center; gap: 7px; }
.dm-cmin { width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: grid; place-items: center; color: #fff; }
.dm-cttl { flex: 1; min-width: 0; }
.dm-cttl b { display: block; font-size: 11.5px; }
.dm-cttl small { font-size: 9px; color: #aebac1; font-variant-numeric: tabular-nums; }
.dm-e2e { display: flex; align-items: center; gap: 3px; font-size: 8px; color: #aebac1; }
.dm-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 5px; margin: 8px 0; }
.dm-tile { position: relative; border-radius: 12px; overflow: hidden; background: #1f2c33; display: grid; place-items: center; transition: box-shadow .25s; opacity: 0; transform: scale(.9); }
.go .dm-tile, .still .dm-tile { animation: dm-pop .45s cubic-bezier(.2, .9, .3, 1.2) both; }
.go .dm-tile.t1 { animation-delay: .2s; } .go .dm-tile.t2 { animation-delay: .5s; } .go .dm-tile.t3 { animation-delay: .8s; } .go .dm-tile.t4 { animation-delay: 1.1s; }
.still .dm-tile { animation-duration: 0s; }
@keyframes dm-pop { to { opacity: 1; transform: none; } }
.dm-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dm-tile.spk { box-shadow: 0 0 0 3px rgba(0, 168, 132, .9); }
.still .dm-tile.t1 { box-shadow: 0 0 0 3px rgba(0, 168, 132, .9); }
.dm-cav { width: 50px; height: 50px; border-radius: 50%; color: #fff; font-size: 20px; font-weight: 700; display: grid; place-items: center; }
.dm-nm { position: absolute; left: 6px; bottom: 6px; background: rgba(0, 0, 0, .45); padding: 2px 7px; border-radius: 8px; font-size: 9px; font-weight: 600; }
.dm-ctl { display: flex; justify-content: center; gap: 11px; }
.dm-ctl span { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: grid; place-items: center; color: #fff; }
.dm-ctl .end { background: #ea4335; }

/* captions under the phone: which scene, and how far it has played */
.dm-caps { display: flex; gap: 10px; width: 100%; max-width: 560px; }
.dm-cap { flex: 1; border: 0; background: none; font: inherit; color: var(--text-2, #54656f); text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 7px; padding: 0; }
.dm-capbar { height: 4px; border-radius: 2px; background: var(--border, rgba(17, 27, 33, .12)); overflow: hidden; }
.dm-capbar i { display: block; height: 100%; width: 0; background: var(--dm-green); border-radius: 2px; }
.dm-cap.on .dm-capbar i { animation: dm-fill var(--ms, 6s) linear both; }
@keyframes dm-fill { to { width: 100%; } }
.dm-captx { font-size: 14px; font-weight: 600; line-height: 1.3; }
.dm-cap.on .dm-captx { color: var(--text, #111b21); }
@media (max-width: 380px) { .dm-phone { transform: scale(.92); margin: -24px 0; } }
@media (prefers-reduced-motion: reduce) { .dm-scene *, .dm-cap * { animation: none !important; } }
