/* 疯狂水世界彩蛋 · 网页版（第 193 批）
   与小程序 components/water-world-egg 同一套视觉：暗底 + 海水蓝 #35c6f0 / #7ae3ff。
   桌面打开时把舞台收成一条手机比例（.frame max-width 560px），左右留黑，不至于满屏拉伸。 */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #04060b;
    color: #dff6ff;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

/* ---------- 启动封面：浏览器要求用户手势才允许出声 ---------- */
.cover {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    background: radial-gradient(circle at 50% 42%, #10233a 0%, #05070c 68%);
    cursor: pointer;
}

.cover-meme {
    width: min(68vw, 380px);
    border-radius: 14px;
    box-shadow: 0 0 48px rgba(53, 198, 240, 0.45);
    animation: cover-breath 2.6s ease-in-out infinite;
}

@keyframes cover-breath {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.03); }
}

.cover-tip {
    padding: 10px 26px;
    border-radius: 999px;
    border: 1px solid rgba(122, 227, 255, 0.55);
    background: rgba(8, 16, 26, 0.7);
    font-size: 15px;
    letter-spacing: 2px;
    color: #dff6ff;
}

.cover-sub {
    font-size: 12px;
    letter-spacing: 1px;
    color: rgba(223, 246, 255, 0.45);
}

/* ---------- 舞台 ---------- */
.root {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.frame {
    position: relative;
    width: 100%;
    max-width: 560px;
    height: 100%;
    overflow: hidden;
    background: #04060b;
}

.stage {
    position: absolute;
    inset: 0;
}

/* ① 图片从中心放大 */
.stage-boom {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 45%, #10233a 0%, #05070c 68%);
}

.meme-wrap { animation: meme-breath 2.6s ease-in-out 0.72s infinite; }

.meme {
    width: min(74%, 380px);
    border-radius: 12px;
    box-shadow: 0 0 52px rgba(53, 198, 240, 0.5);
    animation: meme-zoom 0.62s cubic-bezier(0.2, 1.15, 0.35, 1) both;
}

@keyframes meme-zoom {
    0%   { transform: scale(0.04); opacity: 0; }
    40%  { opacity: 1; }
    72%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes meme-breath {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.035); }
}

.boom-tip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    letter-spacing: 2px;
    color: rgba(223, 246, 255, 0.85);
}

.dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #7ae3ff;
    animation: dot-blink 1.1s ease-in-out infinite;
}

.d2 { animation-delay: 0.18s; }
.d3 { animation-delay: 0.36s; }

@keyframes dot-blink {
    0%, 100% { opacity: 0.25; transform: translateY(0); }
    50%      { opacity: 1; transform: translateY(-3px); }
}

/* ② 时空扭转 */
.stage-warp { background: #04060b; overflow: hidden; }

.warp-swirl {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 160vmax;
    height: 160vmax;
    margin: -80vmax 0 0 -80vmax;
    border-radius: 50%;
    background-image: radial-gradient(circle at 50% 50%,
        rgba(122, 227, 255, 0.95) 0%,
        rgba(53, 198, 240, 0.55) 18%,
        rgba(12, 40, 66, 0.9) 34%,
        rgba(4, 6, 11, 1) 62%);
    animation: warp-spin 0.9s cubic-bezier(0.3, 0.1, 0.4, 1) both;
}

.warp-swirl::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-image: conic-gradient(from 0deg at 50% 50%,
        rgba(4, 6, 11, 0) 0deg,
        rgba(122, 227, 255, 0.75) 26deg,
        rgba(4, 6, 11, 0) 58deg,
        rgba(53, 198, 240, 0.6) 96deg,
        rgba(4, 6, 11, 0) 130deg,
        rgba(122, 227, 255, 0.7) 190deg,
        rgba(4, 6, 11, 0) 226deg,
        rgba(53, 198, 240, 0.55) 286deg,
        rgba(4, 6, 11, 0) 320deg);
    opacity: 0.9;
}

@keyframes warp-spin {
    0%   { transform: rotate(0deg) scale(0.12); opacity: 0; }
    22%  { opacity: 1; }
    100% { transform: rotate(430deg) scale(2.5); opacity: 0.15; }
}

.warp-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 110px;
    height: 110px;
    margin: -55px 0 0 -55px;
    border-radius: 50%;
    border: 4px solid rgba(122, 227, 255, 0.85);
    box-shadow: 0 0 20px rgba(53, 198, 240, 0.55);
    animation: warp-ring 0.9s ease-out both;
}

.r2 { animation-delay: 0.12s; border-color: rgba(122, 227, 255, 0.6); }
.r3 { animation-delay: 0.24s; border-color: rgba(122, 227, 255, 0.4); }

@keyframes warp-ring {
    0%   { transform: scale(0.15); opacity: 0; }
    30%  { opacity: 0.9; }
    100% { transform: scale(3.4); opacity: 0; }
}

.warp-flash {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    animation: warp-flash 0.9s ease-in both;
}

@keyframes warp-flash {
    0%, 62% { opacity: 0; }
    86%     { opacity: 0.82; }
    100%    { opacity: 0; }
}

/* ③ 全屏视频 */
.stage-video { background: #000; }

.video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-tip {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 9px 14px;
    border-radius: 8px;
    background: rgba(8, 16, 26, 0.72);
    font-size: 12px;
}

/* ---------- 弹幕层 ---------- */
.dm-layer {
    position: absolute;
    inset: 0;
    z-index: 6;
    overflow: hidden;
    pointer-events: none;
}

.dm-item {
    position: absolute;
    left: 100%;
    white-space: nowrap;
    font-weight: 600;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
    animation-name: dm-fly;
    animation-timing-function: linear;
    animation-fill-mode: both;
    will-change: transform;
}

/* 飞行距离 = 舞台宽 + 自身宽；--w 由 JS 写在 .frame 上 */
@keyframes dm-fly {
    0%   { transform: translateX(0); }
    100% { transform: translateX(calc(-1 * var(--w, 100vw) - 100%)); }
}

/* 用户自己发的：一圈海水蓝边框（与小程序 .dm-item.dm-own 同一视觉） */
.dm-item.dm-own {
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid rgba(122, 227, 255, 0.86);
    background: rgba(6, 22, 36, 0.55);
    box-shadow: 0 0 8px rgba(53, 198, 240, 0.35);
}

/* ---------- 发射层：点过滤器就从按钮图标本身往上飞 ---------- */
.shot-layer {
    position: absolute;
    inset: 0;
    z-index: 7;
    overflow: hidden;
    pointer-events: none;
}

.shot-item {
    position: absolute;
    animation-timing-function: cubic-bezier(0.25, 0.6, 0.35, 1);
    animation-fill-mode: both;
    will-change: transform, opacity;
}

.shot-item img {
    display: block;
    width: 22px;
    height: 22px;
}

.shot-a { animation-name: shot-up-a; }
.shot-b { animation-name: shot-up-b; }
.shot-c { animation-name: shot-up-c; }

@keyframes shot-up-a {
    0%   { transform: translate3d(0, 0, 0) scale(0.5) rotate(0deg); opacity: 0; }
    16%  { opacity: 1; }
    100% { transform: translate3d(-32px, -58vh, 0) scale(1.3) rotate(-18deg); opacity: 0; }
}

@keyframes shot-up-b {
    0%   { transform: translate3d(0, 0, 0) scale(0.5) rotate(0deg); opacity: 0; }
    16%  { opacity: 1; }
    100% { transform: translate3d(3px, -64vh, 0) scale(1.35) rotate(10deg); opacity: 0; }
}

@keyframes shot-up-c {
    0%   { transform: translate3d(0, 0, 0) scale(0.5) rotate(0deg); opacity: 0; }
    16%  { opacity: 1; }
    100% { transform: translate3d(33px, -56vh, 0) scale(1.25) rotate(20deg); opacity: 0; }
}

/* ---------- 左下角弹幕框 ---------- */
.dm-box {
    position: absolute;
    left: 12px;
    bottom: 22px;
    z-index: 8;
    display: flex;
    align-items: center;
    gap: 6px;
    width: calc(100% - 152px);
    max-width: 300px;
}

.dm-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(122, 227, 255, 0.42);
    background: rgba(8, 16, 26, 0.72);
    font-size: 14px;
    color: #eaf9ff;
    outline: none;
}

.dm-input::placeholder { color: rgba(223, 246, 255, 0.45); }
.dm-input:focus { border-color: rgba(122, 227, 255, 0.9); }

.dm-send {
    flex: none;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 0;
    background: rgba(53, 198, 240, 0.92);
    font-size: 13px;
    font-weight: 600;
    color: #062432;
    cursor: pointer;
}

.dm-send:active { background: rgba(126, 226, 250, 0.98); }

/* ---------- 右下角：海水过滤器 ---------- */
.filter-btn {
    position: absolute;
    right: 12px;
    bottom: 22px;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    padding: 4px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.filter-ring {
    position: absolute;
    left: 50%;
    top: 38px;
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
    border-radius: 50%;
    border: 1px solid rgba(122, 227, 255, 0.55);
    animation: filter-ring 2.2s ease-out infinite;
    pointer-events: none;
}

@keyframes filter-ring {
    0%   { transform: scale(0.8); opacity: 0.7; }
    100% { transform: scale(1.5); opacity: 0; }
}

.filter-img {
    width: 75px;
    height: 75px;
    animation: filter-float 2.6s ease-in-out infinite;
}

.filter-img.burst { animation: filter-burst 0.46s ease-out both; }

@keyframes filter-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}

@keyframes filter-burst {
    0%   { transform: scale(1); }
    35%  { transform: scale(0.86); }
    70%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.filter-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.filter-meta em {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(8, 16, 26, 0.62);
    font-size: 11px;
    font-style: normal;
    color: #dff6ff;
    white-space: nowrap;
}

.filter-meta b {
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(229, 72, 77, 0.92);
    font-size: 10px;
    line-height: 1;
    color: #fff;
}

/* ---------- 左上角退出 ---------- */
.exit-btn {
    position: absolute;
    left: 11px;
    top: 11px;
    z-index: 9;
    height: 34px;
    padding: 0 14px 0 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(10, 16, 26, 0.74);
    box-shadow: 0 2px 9px rgba(0, 0, 0, 0.4);
    font-size: 13px;
    color: #fff;
    cursor: pointer;
}
.exit-btn:active { background: rgba(214, 32, 48, 0.86); }

/* ---------- 发送提示 ---------- */
.dm-tip {
    position: absolute;
    left: 50%;
    bottom: 74px;
    z-index: 10;
    transform: translateX(-50%);
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(229, 72, 77, 0.94);
    font-size: 12px;
    color: #fff;
    white-space: nowrap;
    max-width: calc(100% - 32px);
    overflow: hidden;
    text-overflow: ellipsis;
}
