/* ===========================================================
   订阅 MOD 提醒 - 液态玻璃(Liquid Glass)美化
   设计语言取自 @/yetai/styles-yetai.css 的玻璃拟物风格:
     · 半透明磨砂背景 + backdrop-filter 模糊/饱和
     · 1px 高光描边 + 内外双层阴影营造玻璃厚度
     · 流动的对角高光(yetai .box:after 的渐变光泽)→ 液态流动感
   为保证不破坏站点整体布局,将 yetai 的视觉规则作用域限定在
   .yt- 前缀下,仅用于订阅按钮与弹窗。
   =========================================================== */

/* 液态高光流动动画 */
@keyframes yt-glass-flow {
    0%   { transform: rotate(8deg) translateX(-220%); }
    55%  { transform: rotate(8deg) translateX(420%); }
    100% { transform: rotate(8deg) translateX(420%); }
}

/* ===== 右下角悬浮订阅按钮(液态玻璃胶囊) ===== */
.yt-subscribe-fab {
    position: fixed;
    right: 24px;
    /* 悬浮在"返回顶部"按钮(bottom:28px,高48px)正上方,互不遮挡 */
    bottom: 94px;
    z-index: 9999;

    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px 12px 14px;

    border-radius: 9999px;
    color: #fff;
    font-family: "微软雅黑", serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    overflow: hidden;

    /* 液态玻璃核心 */
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.28),
        inset 0 1px 1px rgba(255, 255, 255, 0.7),
        inset 0 -1px 2px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s, box-shadow 0.25s;
}

/* 流动高光(液态感) */
.yt-subscribe-fab::after {
    content: '';
    position: absolute;
    top: -60%;
    left: 0;
    width: 55%;
    height: 220%;
    background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
    transform: rotate(8deg) translateX(-220%);
    animation: yt-glass-flow 4.5s ease-in-out infinite;
    pointer-events: none;
}

.yt-subscribe-fab:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.35),
        inset 0 1px 1px rgba(255, 255, 255, 0.85),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
}
.yt-subscribe-fab:active {
    transform: translateY(0);
}

/* 按钮内图标圆底(玻璃质感) */
.yt-subscribe-fab .yt-fab-icon {
    position: relative;
    z-index: 1;
    width: 34px;
    height: 34px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
    flex: none;
}
.yt-subscribe-fab .yt-fab-icon svg {
    width: 18px;
    fill: #fff;
}
.yt-subscribe-fab .yt-fab-text {
    position: relative;
    z-index: 1;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* ===== 订阅弹窗遮罩 ===== */
.yt-modal-mask {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(20, 24, 33, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 16px;
}
.yt-modal-mask.open {
    display: flex;
    animation: yt-fade 0.2s ease;
}
@keyframes yt-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ===== 订阅弹窗本体(液态玻璃卡片) ===== */
.yt-modal {
    width: min(420px, 94vw);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 20px;
    padding: 26px 24px 24px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 22px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.6);
    color: #fff;
    animation: yt-pop 0.22s ease;
}
@keyframes yt-pop {
    from { transform: translateY(14px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}
.yt-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s;
}
.yt-modal-close:hover {
    background: rgba(255, 255, 255, 0.28);
}
.yt-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px;
    font-family: "微软雅黑", serif;
    font-size: 19px;
    color: #fff;
}
.yt-modal-title .yt-modal-bell {
    width: 34px;
    height: 34px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
    flex: none;
}
.yt-modal-title .yt-modal-bell svg {
    width: 18px;
    fill: #fff;
}
.yt-modal-sub {
    margin: 0 0 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

/* 邮箱输入框(液态玻璃凹陷) */
.yt-modal-input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 16px;
    font-size: 15px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    outline: none;
    transition: 0.2s;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
}
.yt-modal-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}
.yt-modal-input:focus {
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 0 3px rgba(255, 255, 255, 0.22);
}

/* 确定按钮(液态玻璃胶囊,源自 yetai .start-btn 玻璃化) */
.yt-start-btn {
    margin-top: 16px;
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(123, 108, 246, 0.4);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    color: #fff;
    font-family: "微软雅黑", serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.6),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    transition: 0.25s;
    user-select: none;
}
.yt-start-btn::after {
    content: '';
    position: absolute;
    top: -60%;
    left: 0;
    width: 55%;
    height: 220%;
    background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
    transform: rotate(8deg) translateX(-220%);
    animation: yt-glass-flow 4.5s ease-in-out infinite;
    pointer-events: none;
}
.yt-start-btn:hover {
    transform: translateY(-1px);
    background: rgba(123, 108, 246, 0.55);
}
.yt-start-btn:active {
    transform: translateY(0);
}
.yt-start-btn:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}
.yt-start-btn .btn-icon {
    position: relative;
    z-index: 1;
    width: 26px;
    height: 26px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}
.yt-start-btn .btn-icon svg {
    width: 15px;
    fill: #fff;
}
.yt-start-btn > span:last-child,
.yt-start-btn {
    position: relative;
}
.yt-modal-msg {
    margin-top: 14px;
    font-size: 13px;
    text-align: center;
    min-height: 18px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}
.yt-modal-msg.ok  { color: #8effb0; }
.yt-modal-msg.err { color: #ff9a9a; }

/* 移动端微调 */
@media (max-width: 480px) {
    .yt-subscribe-fab {
        right: 16px;
        bottom: 88px;
        padding: 12px;
    }
    .yt-subscribe-fab .yt-fab-text { display: none; }
}
