* {margin: 0; padding: 0; box-sizing: border-box; font-family: "Microsoft Yahei", sans-serif;}

/* 动态背景层 */
.dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* 渐变背景层 - 柔粉到暖桃色 */
.gradient-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        #FF9A9E 0%,      /* 柔粉色 */
        #FECFEF 50%,     /* 暖桃色 */
        #FFB6C1 100%     /* 玫瑰粉 */
    );
    background-size: 200% 200%;
    animation: gradientFlow 15s ease infinite;
}

@keyframes gradientFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 磨砂玻璃纹理层 */
.texture-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
    animation: textureShimmer 20s ease-in-out infinite;
}

@keyframes textureShimmer {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.5;
    }
}

/* 漂浮装饰元素 */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.float-item {
    position: absolute;
    font-size: 24px;
    opacity: 0.25;
    animation: float 25s linear infinite;
    user-select: none;
}

.float-item.heart:nth-child(1) { left: 5%; animation-duration: 28s; animation-delay: 0s; font-size: 26px; }
.float-item.cake:nth-child(2) { left: 15%; animation-duration: 32s; animation-delay: 3s; font-size: 28px; }
.float-item.heart:nth-child(3) { left: 25%; animation-duration: 30s; animation-delay: 1s; font-size: 25px; }
.float-item.star:nth-child(4) { left: 35%; animation-duration: 26s; animation-delay: 4s; font-size: 22px; }
.float-item.cake:nth-child(5) { left: 50%; animation-duration: 29s; animation-delay: 2s; font-size: 27px; }
.float-item.heart:nth-child(6) { left: 65%; animation-duration: 31s; animation-delay: 5s; font-size: 24px; }
.float-item.star:nth-child(7) { left: 75%; animation-duration: 27s; animation-delay: 3s; font-size: 23px; }
.float-item.cake:nth-child(8) { left: 85%; animation-duration: 33s; animation-delay: 1s; font-size: 26px; }
.float-item.heart:nth-child(9) { left: 90%; animation-duration: 30s; animation-delay: 4s; font-size: 25px; }
.float-item.star:nth-child(10) { left: 95%; animation-duration: 28s; animation-delay: 2s; font-size: 24px; }

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.25;
    }
    90% {
        opacity: 0.25;
    }
    100% {
        transform: translateY(-100px) rotate(360deg) scale(1);
        opacity: 0;
    }
}

/* 主体样式 */
body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* 登录卡片 - 毛玻璃效果 */
.login-box {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 50px 45px;
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(255, 107, 129, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 0 0 30px rgba(255, 255, 255, 0.5);
    width: 100%;
    max-width: 480px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.4);
    position: relative;
    animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 标题样式 */
.login-box h1 {
    color: #FF6B81;
    margin-bottom: 40px;
    font-size: 36px;
    font-weight: bold;
    text-shadow: 
        0 0 10px rgba(255, 107, 129, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.cake-emoji {
    display: inline-block;
    animation: cakeJump 0.8s ease-in-out infinite;
}

.cake-emoji:first-child {
    animation-delay: 0s;
}

.cake-emoji:last-child {
    animation-delay: 0.4s;
}

@keyframes cakeJump {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.15);
    }
}

/* 输入组样式 */
.login-box .input-group {
    margin-bottom: 30px;
    text-align: left;
    position: relative;
}

.login-box label {
    display: block;
    color: #FF9A9E;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* 输入框样式 - 无边框设计 */
.login-box input {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 154, 158, 0.4);
    border-radius: 0;
    font-size: 17px;
    color: #555;
    transition: all 0.3s ease;
}

.login-box input::placeholder {
    color: rgba(255, 154, 158, 0.6);
    transition: all 0.3s ease;
}

.login-box input:focus {
    outline: none;
    border-bottom-color: #FF6B81;
    border-bottom-width: 2px;
    padding-bottom: 13px;
}

.login-box input:focus::placeholder {
    color: rgba(255, 107, 129, 0.4);
    transform: translateY(-20px);
    opacity: 0;
}

.login-box input:focus + label,
.login-box input:valid + label {
    color: #FF6B81;
    font-size: 13px;
    font-weight: 600;
    transform: translateY(-22px);
    opacity: 0;
}

/* 输入时文字颜色变化 */
.login-box input:not(:placeholder-shown) {
    color: #FF6B81;
}

/* 按钮样式 - 渐变填充 */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FF6B81 0%, #FF9A9E 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 20px;
    box-shadow: 
        0 8px 20px rgba(255, 107, 129, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.login-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 30px rgba(255, 107, 129, 0.4),
        0 0 20px rgba(255, 255, 255, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.3);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 4px 15px rgba(255, 107, 129, 0.3),
        0 0 10px rgba(255, 255, 255, 0.3);
}

/* 提示文字 */
.tips {
    margin-top: 25px;
    color: #999;
    font-size: 14px;
    line-height: 1.6;
}

.tips a {
    color: #FF6B81;
    text-decoration: none;
    font-weight: 500;
}

.tips a:hover {
    text-decoration: underline;
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .login-box {
        padding: 40px 35px;
        max-width: 100%;
    }
    
    .login-box h1 {
        font-size: 32px;
        margin-bottom: 35px;
    }
    
    .login-box label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .login-box input {
        padding: 14px 0;
        font-size: 16px;
    }
    
    .login-box input:focus {
        padding-bottom: 12px;
    }
    
    .login-btn {
        padding: 15px;
        font-size: 18px;
        margin-top: 18px;
    }
    
    .tips {
        font-size: 13px;
        margin-top: 20px;
    }
    
    .float-item {
        font-size: 20px;
        opacity: 0.2;
    }
}

/* 小屏幕手机适配 */
@media (max-width: 480px) {
    .login-box {
        padding: 35px 30px;
        border-radius: 18px;
    }
    
    .login-box h1 {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .login-box label {
        font-size: 13px;
    }
    
    .login-box input {
        padding: 13px 0;
        font-size: 15px;
    }
    
    .login-box input:focus {
        padding-bottom: 11px;
    }
    
    .login-btn {
        padding: 14px;
        font-size: 17px;
        margin-top: 15px;
    }
    
    .tips {
        font-size: 12px;
        margin-top: 18px;
    }
    
    .float-item {
        font-size: 18px;
        opacity: 0.15;
    }
    
    .cake-emoji {
        animation: cakeJump 0.6s ease-in-out infinite;
    }
}

/* 移动端响应式优化 - 360px-480px 屏幕 */
@media (max-width: 768px) {
    /* 确保页面不出现横向滚动条 */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    /* 登录框占满屏幕宽度，左右留 16px 边距 */
    .login-box {
        width: 100%;
        max-width: calc(100% - 32px);
        margin: 0 auto;
        padding: 40px 24px;
    }
    
    /* 标题字体至少 24px */
    .login-box h1 {
        font-size: clamp(24px, 6vw, 32px);
        font-weight: bold;
    }
    
    /* 输入框标签字体至少 16px */
    .login-box label {
        font-size: clamp(14px, 4vw, 16px);
    }
    
    /* 输入框字体至少 16px，高度足够 */
    .login-box input {
        font-size: clamp(16px, 4.5vw, 18px);
        padding: 16px 0;
        min-height: 48px;
    }
    
    /* 按钮字体至少 18px，高度不低于 48px */
    .login-btn {
        font-size: clamp(18px, 5vw, 20px);
        padding: 16px;
        min-height: 52px;
        border-radius: 14px;
    }
    
    /* 漂浮元素缩小 */
    .float-item {
        font-size: clamp(16px, 4vw, 20px);
    }
    
    /* 蛋糕表情动画加快 */
    .cake-emoji {
        animation-duration: 0.6s;
    }
}

/* 小屏手机进一步优化 - 360px-420px */
@media (max-width: 420px) {
    .login-box {
        padding: 35px 20px;
        border-radius: 16px;
    }
    
    .login-box h1 {
        font-size: 26px;
        margin-bottom: 28px;
    }
    
    .login-box label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .login-box input {
        font-size: 15px;
        padding: 14px 0;
    }
    
    .login-btn {
        font-size: 17px;
        padding: 15px;
        min-height: 50px;
    }
    
    .tips {
        font-size: 12px;
        margin-top: 16px;
    }
}
