*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #fff7f7;
}

/* NOTE: 爱心指针 & 点击烟花已迁移到 /front/common.css（前台全局生效） */

.cm-top-love {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 720px;
    width: 90%;
    padding: 6px 14px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(135deg, rgba(255,228,241,0.96), rgba(255,237,213,0.96));
    box-shadow: 0 12px 30px rgba(248,113,113,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: #9f1239;
    z-index: 20;
    backdrop-filter: blur(10px);
    animation: cm-top-love-drop 1s ease-out;
}

.cm-top-love-inner {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: cm-top-love-fade 6s ease-in-out infinite;
}

.cm-top-love-heart {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 20%, #fff, #fb7185);
    box-shadow: 0 0 10px rgba(248,113,113,0.9);
    position: relative;
}

.cm-top-love-heart::before,
.cm-top-love-heart::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fb7185;
    border-radius: 50%;
}

.cm-top-love-heart::before {
    top: -2px;
    left: 2px;
}

.cm-top-love-heart::after {
    top: -2px;
    right: 2px;
}

@keyframes cm-top-love-drop {
    0% { transform: translate(-50%, -40px); opacity: 0; }
    100% { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes cm-top-love-fade {
    0% { opacity: 0; }
    15% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.cm-bg {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 600px;
    background:
        radial-gradient(circle at 0% 0%, #ffd6e7 0, transparent 55%),
        radial-gradient(circle at 100% 100%, #ffe6c7 0, transparent 55%),
        linear-gradient(135deg, #fff7f7 0%, #ffeef4 40%, #fffbf4 100%);
    background-size: 260% 260%;
    animation: cm-bg-gradient 12s ease-in-out infinite alternate;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
}

/* 轻微荡漾的背景层（暖色系） */
.cm-bg::before {
    content: "";
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(circle at 12% 0%, rgba(255,148,198,0.45), transparent 60%),
        radial-gradient(circle at 82% 100%, rgba(255,201,150,0.4), transparent 60%),
        radial-gradient(circle at 35% 120%, rgba(255,178,178,0.35), transparent 65%);
    opacity: 0.85;
    mix-blend-mode: screen;
    animation: cm-ripple-bg 12s ease-in-out infinite alternate;
}

/* 漂浮光斑动画 */
.cm-bubble {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,183,214,0.55), transparent 60%);
    filter: blur(3px);
    opacity: 0.4;
    animation: float 14s ease-in-out infinite alternate;
}

.cm-bubble-1 { top: 4%; left: 8%; }
.cm-bubble-2 { top: 68%; left: 15%; animation-delay: -4s; }
.cm-bubble-3 { top: 15%; right: 10%; animation-delay: -7s; }
.cm-bubble-4 {
    bottom: -10%;
    right: -4%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255,214,170,0.45), transparent 65%);
    animation-duration: 18s;
}

@keyframes float {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(20px, -25px, 0) scale(1.08); }
}

/* 缓慢的背景荡漾效果 */
@keyframes cm-ripple-bg {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0.8px);
    }
    50% {
        transform: translate3d(-30px, 12px, 0) scale(1.06);
        filter: blur(2px);
    }
    100% {
        transform: translate3d(26px, -16px, 0) scale(1.08);
        filter: blur(2.8px);
    }
}

/* 整体背景渐变缓慢流动 */
@keyframes cm-bg-gradient {
    0% {
        background-position: 0% 0%, 100% 100%, 0% 0%;
    }
    50% {
        background-position: 40% 20%, 60% 80%, 60% 40%;
    }
    100% {
        background-position: 80% 40%, 20% 60%, 100% 100%;
    }
}

/* 背景星光 + 心形小元素 */
.cm-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.cm-star {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    opacity: 0.95;
    animation: cm-star-twinkle 2.8s ease-in-out infinite;
}

.cm-star.s1 { top: 12%; left: 18%; animation-delay: 0s; }
.cm-star.s2 { top: 24%; right: 20%; animation-delay: 1s; }
.cm-star.s3 { top: 40%; left: 8%; animation-delay: 1.8s; }
.cm-star.s4 { top: 56%; right: 12%; animation-delay: 2.6s; }
.cm-star.s5 { top: 72%; left: 26%; animation-delay: 3.2s; }
.cm-star.s6 { top: 86%; right: 26%; animation-delay: 3.8s; }

/* 不同颜色的星光（暖金 / 粉白 / 橙色） */
.cm-star.s1,
.cm-star.s4 {
    background: #fedb6a;
    box-shadow: 0 0 14px rgba(252,211,77,0.95);
}

.cm-star.s2,
.cm-star.s5 {
    background: #ffe4f1;
    box-shadow: 0 0 14px rgba(255,228,241,0.95);
}

.cm-star.s3,
.cm-star.s6 {
    background: #ffb26b;
    box-shadow: 0 0 14px rgba(255,178,107,0.95);
}

@keyframes cm-star-twinkle {
    0%, 100% { opacity: 0.35; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.3); }
    70% { opacity: 0.6; transform: scale(1); }
}

/* 背景大爱心，明显的浪漫元素 */
.cm-hearts {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.cm-heart {
    position: absolute;
    width: 80px;
    height: 80px;
    opacity: 0.42;
    transform: translate3d(0,0,0) scale(1);
    animation: cm-heart-float-bg 14s ease-in-out infinite;
}

.cm-heart::before,
.cm-heart::after {
    content: "";
    position: absolute;
    width: 40px;
    height: 64px;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.98), rgba(248,113,113,0.7));
    border-radius: 40px 40px 32px 32px;
}

.cm-heart::before {
    left: 20px;
    top: 10px;
    transform: rotate(-45deg);
}

.cm-heart::after {
    left: 0;
    top: 10px;
    transform: rotate(45deg);
}

.cm-heart.h1 { left: 12%; bottom: 6%; animation-delay: 0s; }
.cm-heart.h2 { right: 14%; top: 8%; animation-delay: 4s; }

/* 随机出现的背景爱心（从小到大淡出） */
.cm-heart-floating {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0;
    transform: translate3d(0,0,0) scale(0.4);
    pointer-events: none;
    animation: cm-heart-pop 6s ease-in-out forwards;
}

.cm-heart-floating::before,
.cm-heart-floating::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 48px;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.98), rgba(248,113,113,0.75));
    border-radius: 30px 30px 24px 24px;
}

.cm-heart-floating::before {
    left: 18px;
    top: 8px;
    transform: rotate(-45deg);
}

.cm-heart-floating::after {
    left: 0;
    top: 8px;
    transform: rotate(45deg);
}

@keyframes cm-heart-float-bg {
    0% {
        transform: translate3d(0, 10px, 0) scale(0.9);
        opacity: 0.12;
    }
    40% {
        transform: translate3d(0, -6px, 0) scale(1);
        opacity: 0.28;
    }
    80% {
        transform: translate3d(0, 10px, 0) scale(1.05);
        opacity: 0.18;
    }
    100% {
        transform: translate3d(0, 10px, 0) scale(0.9);
        opacity: 0.12;
    }
}

@keyframes cm-heart-pop {
    0% {
        opacity: 0;
        transform: translate3d(0, 10px, 0) scale(0.4);
    }
    25% {
        opacity: 0.8;
        transform: translate3d(0, 0, 0) scale(1);
    }
    70% {
        opacity: 0.6;
        transform: translate3d(0, -4px, 0) scale(1.12);
    }
    100% {
        opacity: 0;
        transform: translate3d(0, -8px, 0) scale(1.2);
    }
}

.cm-login-wrapper {
    position: relative;
    width: 100%;
    max-width: 1080px;
    padding: 32px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 32px;
    z-index: 1;
}

@media (max-width: 860px) {
    .cm-login-wrapper {
        grid-template-columns: 1fr;
        padding: 24px 16px;
    }
}

.cm-login-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 32px 40px;
    backdrop-filter: blur(18px);
    background:
        radial-gradient(circle at 0 0, rgba(255,209,220,0.55), transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(255,237,213,0.6), transparent 55%),
        linear-gradient(135deg, rgba(255,255,255,0.97), rgba(255,246,250,0.97));
    border-radius: 28px;
    border: 1px solid rgba(255,148,198,0.4);
    box-shadow: 0 22px 55px rgba(255,148,198,0.35);
    position: relative;
    overflow: hidden;
    animation: cm-card-float 10s ease-in-out infinite;
}

.cm-logo {
    width: 190px;
    height: auto;
    object-fit: contain;
    margin-bottom: 0;
    margin-right: 32px;
    border-radius: 24px;
    box-shadow: 0 18px 40px rgba(255,148,198,0.45);
    animation: cm-avatar-sway 8s ease-in-out infinite;
}

.cm-brand-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cm-brand-text .cm-title {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: none;
    background: linear-gradient(120deg, #fb7185, #f97316, #f9a8d4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 6px rgba(248,113,113,0.45);
    margin-bottom: 10px;
    position: relative;
}

.cm-brand-text .cm-title::after {
    content: "❤";
    display: inline-block;
    margin-left: 6px;
    font-size: 16px;
    color: #fb7185;
    animation: cm-title-heart 1.8s ease-in-out infinite;
}

.cm-brand-text .cm-subtitle {
    font-size: 14px;
    color: #9f1239;
    margin-bottom: 18px;
}

.cm-brand-text::after {
    content: "晨起暮落 · 点思君朝朝暮暮";
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #9ca3af;
}

.cm-feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.cm-tag {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    color: #9f1239;
    background: rgba(254,226,226,0.9);
    border: 1px solid rgba(252,165,165,0.9);
}

.cm-days {
    margin-top: 14px;
    font-size: 13px;
    color: #9f1239;
}

.cm-days-value {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: #fb7185;
    margin: 0 4px;
    animation: cm-days-pulse 2.2s ease-in-out infinite;
}

.cm-login-card {
    align-self: center;
    background:
        radial-gradient(circle at 0 0, rgba(255,209,220,0.35), transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(255,237,213,0.45), transparent 60%),
        linear-gradient(135deg, #ffffff 0%, #fff9f7 40%, #fffefe 100%);
    border-radius: 24px;
    padding: 28px 26px 26px;
    box-shadow: 0 20px 55px rgba(15,23,42,0.9);
    border: 1px solid rgba(251,113,133,0.35);
    position: relative;
    overflow: hidden;
}

.cm-login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(251,113,133,0.18), transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-out;
}

.cm-login-card:hover::before {
    opacity: 1;
}

.cm-card-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.cm-card-header p {
    margin: 6px 0 18px;
    font-size: 13px;
    color: #6b7280;
}


.cm-form {
    margin-top: 6px;
}

.cm-form-group {
    margin-bottom: 16px;
}

.cm-form-group label {
    display: block;
    font-size: 13px;
    color: #d1d5db;
    margin-bottom: 6px;
}

.cm-input-wrapper {
    position: relative;
}

.cm-input-wrapper input {
    width: 100%;
    padding: 10px 38px 10px 34px;
    border-radius: 12px;
    border: 1px solid rgba(248,113,133,0.55);
    background: rgba(255,255,255,0.9);
    color: #111827;
    font-size: 13px;
    outline: none;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, transform 0.12s ease;
}

.cm-input-wrapper input::placeholder {
    color: #9ca3af;
}

.cm-input-wrapper input:focus {
    border-color: #fb7185;
    box-shadow: 0 0 0 1px rgba(251,113,133,0.7), 0 12px 28px rgba(248,113,121,0.3);
    background-color: rgba(255,255,255,0.98);
    transform: translateY(-1px);
}

.cm-input-icon {
    position: absolute;
    top: 50%;
    left: 11px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
}

.cm-input-icon::before,
.cm-input-icon::after {
    content: none;
}

/* 输入框前缀文字图标：爱 / 你 */
.cm-icon-user::before,
.cm-icon-lock::before {
    content: attr(data-text);
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 600;
    color: #fb7185;
}

.cm-toggle-pwd {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    cursor: pointer;
}

/* 验证码区域 */
.cm-captcha-row {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 10px;
    align-items: center;
}

@media (max-width: 420px) {
    .cm-captcha-row {
        grid-template-columns: 1fr;
    }
}

.cm-captcha-img-wrap {
    height: 40px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(248,113,133,0.35);
    background: rgba(255,255,255,0.9);
    box-shadow: 0 10px 22px rgba(248,113,113,0.12);
    cursor: pointer;
}

.cm-captcha-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cm-toggle-pwd::before,
.cm-toggle-pwd::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
}

.cm-toggle-pwd::before {
    border: 2px solid #6b7280;
}

.cm-toggle-pwd::after {
    top: 6px;
    left: 4px;
    right: 4px;
    bottom: 6px;
    border-radius: 999px;
    border: 2px solid #6b7280;
    border-top: none;
}

.cm-toggle-pwd.cm-active::before,
.cm-toggle-pwd.cm-active::after {
    border-color: #38bdf8;
}

.cm-form-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    margin-bottom: 16px;
}

.cm-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
    color: #9ca3af;
    user-select: none;
}

.cm-checkbox input {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid #64748b;
    margin: 0 6px 0 0;
    position: relative;
    background: rgba(15,23,42,0.9);
}

.cm-checkbox input:checked {
    border-color: #38bdf8;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
}

.cm-checkbox input:checked::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 1px;
    width: 6px;
    height: 9px;
    border: 2px solid #0f172a;
    border-top: none;
    border-left: none;
    transform: rotate(42deg);
}

.cm-link-disabled {
    font-size: 12px;
    color: #6b7280;
    text-decoration: none;
    cursor: default;
}

.cm-link-forgot {
    font-size: 12px;
    color: #fb7185;
    text-decoration: none;
}

.cm-link-forgot:hover {
    color: #f97316;
    text-decoration: underline;
}

/* 忘记密码弹窗 */
.cm-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.25);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.cm-modal-mask.cm-show {
    display: flex;
}

.cm-modal {
    width: min(420px, calc(100vw - 32px));
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(255,246,250,0.98));
    border: 1px solid rgba(251,113,133,0.35);
    box-shadow: 0 24px 70px rgba(248,113,113,0.35);
    overflow: hidden;
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    animation: cm-modal-in 260ms ease-out forwards;
}

.cm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: radial-gradient(circle at 20% 0%, rgba(255,228,241,0.85), transparent 70%);
}

.cm-modal-title {
    font-size: 14px;
    font-weight: 700;
    color: #9f1239;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cm-modal-heart {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 20%, #fff, #fb7185);
    box-shadow: 0 0 10px rgba(248,113,113,0.9);
    animation: cm-title-heart 1.8s ease-in-out infinite;
}

.cm-modal-close {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(251,113,133,0.25);
    background: rgba(255,255,255,0.9);
    color: #9ca3af;
    cursor: pointer;
}

.cm-modal-body {
    padding: 14px 16px 6px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.7;
}

.cm-modal-body b {
    color: #fb7185;
}

.cm-modal-actions {
    display: flex;
    gap: 10px;
    padding: 12px 16px 16px;
    justify-content: flex-end;
}

.cm-modal-btn {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    cursor: pointer;
}

.cm-modal-btn.cm-primary {
    color: #fff;
    background: linear-gradient(135deg, #fb7185, #f97316);
    box-shadow: 0 10px 24px rgba(248,113,113,0.35);
}

.cm-modal-btn.cm-ghost {
    color: #9f1239;
    background: rgba(255,228,241,0.8);
    border: 1px solid rgba(251,113,133,0.25);
}

@keyframes cm-modal-in {
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.cm-btn-primary {
    position: relative;
    width: 100%;
    border: none;
    outline: none;
    cursor: pointer;
    margin-top: 4px;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fb7185, #f97316);
    color: #fff7f7;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow: 0 16px 40px rgba(248,113,113,0.55);
    overflow: hidden;
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, filter 0.12s ease-out;
    animation: cm-btn-pulse 4s ease-in-out infinite;
}

.cm-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 48px rgba(248,113,113,0.7);
    filter: brightness(1.03);
}

.cm-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 12px 30px rgba(248,113,113,0.6);
    filter: brightness(0.98);
}

.cm-btn-primary[disabled] {
    cursor: wait;
    opacity: 0.8;
}

.cm-btn-ripple {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle closest-side, rgba(239,246,255,0.85), transparent);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.cm-btn-primary.cm-rippling .cm-btn-ripple {
    transform: scale(4);
    opacity: 0;
}

.cm-tips {
    display: flex;
    align-items: center;
    margin-top: 10px;
    font-size: 12px;
    color: #fecaca;
    background: rgba(248,113,113,0.12);
    border-radius: 10px;
    padding: 6px 8px;
    border: 1px solid rgba(248,113,113,0.5);
}

.cm-tip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #ef4444;
    color: #fee2e2;
    font-size: 11px;
    margin-right: 6px;
}

.cm-footer {
    margin-top: 18px;
    font-size: 11px;
    color: #6b7280;
}

.cm-footer span {
    opacity: 0.9;
}

/* ===================== 设备信息调试（右下角浮层） ===================== */
.cm-device-debug {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 9999;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.70);
    color: rgba(249, 250, 251, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    font-size: 12px;
    line-height: 1.45;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    max-width: min(92vw, 360px);
    white-space: pre-wrap;
    pointer-events: none;
    user-select: text;
}

.cm-next-ann {
    margin-top: 4px;
    font-size: 11px;
    color: #f97373;
}

.cm-next-ann-value {
    display: inline-block;
    min-width: 26px;
    font-weight: 600;
    color: #fb7185;
    animation: cm-next-ann-breath 3s ease-in-out infinite;
}

.cm-next-ann-unit {
    margin-left: 2px;
}

.cm-next-ann-note {
    margin-top: 2px;
    font-size: 10px;
    color: #fca5a5;
    animation: cm-next-ann-note 6s ease-in-out infinite;
}

/* 放在左侧品牌区时，稍微更贴近整体信息 */
.cm-next-ann--brand {
    margin-top: 8px;
    color: #9f1239;
}

/* 背景音乐开关按钮已移除 */

/* 额外的柔和光带扫光效果 */
.cm-bg::after {
    content: "";
    position: absolute;
    inset: -20%;
    background: linear-gradient(115deg,
        rgba(255,255,255,0),
        rgba(255,255,255,0.35),
        rgba(255,255,255,0));
    mix-blend-mode: screen;
    opacity: 0.0;
    transform: translateX(-40%) skewX(-10deg);
    animation: cm-sweep 14s ease-in-out infinite;
}

@keyframes cm-sweep {
    0% {
        opacity: 0;
        transform: translateX(-50%) skewX(-10deg);
    }
    20% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.25;
        transform: translateX(40%) skewX(-10deg);
    }
    80% {
        opacity: 0;
    }
    100% {
        opacity: 0;
        transform: translateX(60%) skewX(-10deg);
    }
}

@keyframes cm-title-heart {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    40% {
        transform: scale(1.25);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

@keyframes cm-btn-pulse {
    0% {
        box-shadow: 0 16px 40px rgba(248,113,113,0.45);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 20px 55px rgba(248,113,113,0.75);
        transform: translateY(-1px);
    }
    100% {
        box-shadow: 0 16px 40px rgba(248,113,113,0.45);
        transform: translateY(0);
    }
}

/* 左侧整卡轻微上下浮动，营造悬浮感 */
@keyframes cm-card-float {
    0% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -6px, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

/* 情侣头像轻微摆动，增加亲密感 */
@keyframes cm-avatar-sway {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    25% {
        transform: translate3d(0, -4px, 0) rotate(-1.2deg);
    }
    50% {
        transform: translate3d(0, 0, 0) rotate(0.6deg);
    }
    75% {
        transform: translate3d(0, -3px, 0) rotate(-0.8deg);
    }
    100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
}

/* 纪念日天数字体轻微跳动 */
@keyframes cm-days-pulse {
    0%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-2px);
    }
    70% {
        transform: translateY(0);
    }
}

@keyframes cm-next-ann-breath {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(248,113,113,0.2);
    }
    50% {
        transform: scale(1.08);
        text-shadow: 0 0 6px rgba(248,113,113,0.75);
    }
}

@keyframes cm-next-ann-note {
    0% {
        opacity: 0.25;
        transform: translateY(0);
    }
    40% {
        opacity: 0.9;
        transform: translateY(-1px);
    }
    100% {
        opacity: 0.25;
        transform: translateY(0);
    }
}

/* ===================== 移动端适配：超小屏（约手机） ===================== */
@media (max-width: 600px) {
    html, body {
        font-size: 14px;
    }

    .cm-bg {
        align-items: flex-start;
        padding-top: 72px; /* 预留顶部浪漫语句条高度 */
    }

    .cm-login-wrapper {
        max-width: 100%;
        padding: 16px 12px 24px;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    /* 品牌区改为上下结构，Logo 缩小 */
    .cm-login-brand {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 16px;
        border-radius: 20px;
    }

    .cm-logo {
        width: 150px;
        margin-right: 0;
        margin-bottom: 12px;
        border-radius: 18px;
    }

    .cm-brand-text .cm-title {
        font-size: 26px;
        letter-spacing: 0.18em;
    }

    .cm-brand-text::after {
        font-size: 12px;
    }

    .cm-feature-tags {
        gap: 6px;
        margin-top: 10px;
    }

    .cm-tag {
        font-size: 10px;
        padding: 3px 8px;
    }

    .cm-days {
        margin-top: 10px;
        font-size: 12px;
    }

    .cm-days-value {
        font-size: 15px;
        min-width: 36px;
    }

    .cm-next-ann {
        font-size: 10px;
    }

    .cm-next-ann-note {
        font-size: 9px;
    }

    /* 登录卡片全宽，阴影略收敛一点 */
    .cm-login-card {
        padding: 22px 18px 20px;
        border-radius: 20px;
        box-shadow: 0 16px 40px rgba(15,23,42,0.85);
    }

    .cm-card-header h2 {
        font-size: 20px;
    }

    .cm-card-header p {
        font-size: 12px;
    }

    .cm-form-group {
        margin-bottom: 14px;
    }

    .cm-form-group label {
        font-size: 12px;
    }

    .cm-input-wrapper input {
        padding: 9px 34px 9px 32px;
        font-size: 13px;
    }

    .cm-captcha-row {
        grid-template-columns: 1fr;
    }

    .cm-form-extras {
        flex-direction: row;
        gap: 8px;
        align-items: center;
        justify-content: space-between;
    }

    .cm-checkbox span {
        font-size: 11px;
    }

    .cm-link-forgot {
        font-size: 11px;
    }

    .cm-btn-primary {
        margin-top: 2px;
        padding: 9px 14px;
        font-size: 13px;
        letter-spacing: 0.10em;
    }

    .cm-footer {
        margin-top: 12px;
        font-size: 10px;
        text-align: center;
    }

    /* 很窄的设备上不展示调试信息浮层 */
    .cm-device-debug {
        display: none;
    }
}


