:root {
    --primary: #4f6ef7;
    --primary-dark: #3b54d4;
    --primary-light: #eef1ff;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #2d3436;
    --text-secondary: #636e72;
    --border: #e0e6ed;
    --input-bg: #f7f9fc;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", "Helvetica Neue", sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(232, 236, 248, 0.4) 0%, rgba(220, 227, 245, 0.35) 30%, rgba(240, 242, 245, 0.4) 60%, rgba(234, 240, 251, 0.35) 100%);
    z-index: -1;
}

/* 视频背景 */
.video-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -2;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.35);
    z-index: -1;
    backdrop-filter: blur(2px);
}

/* 图片背景（仅手机端） */
.image-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../photo/1.jpeg') no-repeat center center;
    background-size: cover;
    z-index: -2;
    display: none;
}

.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    z-index: -1;
    backdrop-filter: blur(1px);
    display: none;
}

/* 背景装饰 */
.bg-decoration {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
    opacity: 0.45;
}

.bg-decoration-1 {
    width: 420px;
    height: 420px;
    background: #a8c0ff;
    top: -120px;
    right: -80px;
    animation: floatBubble1 12s ease-in-out infinite;
}

.bg-decoration-2 {
    width: 350px;
    height: 350px;
    background: #c3b5fd;
    bottom: -100px;
    left: -60px;
    animation: floatBubble2 14s ease-in-out infinite;
}

.bg-decoration-3 {
    width: 200px;
    height: 200px;
    background: #93c5fd;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: floatBubble3 10s ease-in-out infinite;
    opacity: 0.25;
}

@keyframes floatBubble1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 30px) scale(1.08); }
    66% { transform: translate(25px, -20px) scale(0.94); }
}

@keyframes floatBubble2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(35px, -25px) scale(1.06); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes floatBubble3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
}

/* 登录卡片 */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: rgba(255, 255, 255, 0.35) !important;
    border-radius: var(--radius);
    padding: 44px 40px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: box-shadow var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(30px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(150%) !important;
}

.login-card:hover {
    box-shadow: var(--shadow-hover);
}

/* 头部 */
.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--primary-light);
    color: var(--primary);
    margin-bottom: 18px;
    font-size: 26px;
    transition: transform var(--transition);
}

.login-icon:hover {
    transform: scale(1.06) rotate(-3deg);
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
    letter-spacing: 0.2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #b0b8c1;
    font-size: 17px;
    pointer-events: none;
    transition: color var(--transition);
    z-index: 2;
}

.form-input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    font-size: 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--text);
    transition: all var(--transition);
    outline: none;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.form-input::placeholder {
    color: #c0c7cf;
    font-size: 14px;
}

.form-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 110, 247, 0.08);
}

/* 输入框聚焦时图标变色 */
.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

/* 密码可见切换按钮 */
.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: #b0b8c1;
    font-size: 18px;
    padding: 6px;
    transition: color var(--transition);
    z-index: 2;
    line-height: 1;
}

.toggle-password:hover {
    color: #6b7c93;
}

/* 选项行 */
.options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: var(--text-secondary);
    user-select: none;
    transition: color var(--transition);
}

.remember-me:hover {
    color: var(--text);
}

.remember-me input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid #ccd4de;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
    font-size: 10px;
    color: transparent;
    background: #fff;
}

.remember-me input[type="checkbox"]:checked + .custom-checkbox {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition);
    font-size: 13px;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(79, 110, 247, 0.3);
}

.btn-login:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(79, 110, 247, 0.4);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(79, 110, 247, 0.3);
}
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    font-size: 13px;
    color: #636e72;
    z-index: 2;
    background: none;          /* 移除白玻璃背景 */
    backdrop-filter: none;     /* 关闭模糊效果 */
    border-top: none;          /* 去掉上边框 */
}

.site-footer a {
    color: #636e72;
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ============ 手机端适配 ============ */
@media (max-width: 768px) {
    html, body { height: 100%; overflow-x: hidden; }
    body { display: flex; flex-direction: column; padding: 12px; }
    .bg-decoration { display: none; }
    .login-container { max-width: 100%; width: 100%; margin: auto; flex-shrink: 0; }
    /* 手机端去掉白色卡片背景 */
    .login-card { padding: 32px 20px 28px; border-radius: 20px; background: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border: none !important; box-shadow: none !important; }
    .login-title { font-size: 22px; color: #fff !important; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }
    .login-subtitle { font-size: 14px; color: rgba(255,255,255,0.9) !important; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
    .form-input { padding: 12px 14px 12px 42px; font-size: 15px; background: rgba(255,255,255,0.9) !important; border: 1px solid rgba(255,255,255,0.3); }
    .form-input::placeholder { color: rgba(0,0,0,0.4) !important; }
    .form-label { color: rgba(255,255,255,0.95) !important; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
    .btn-login { padding: 14px; font-size: 16px; min-height: 48px; }
    .options-row { flex-direction: column; gap: 12px; align-items: flex-start; color: rgba(255,255,255,0.9); }
    .remember-me { color: rgba(255,255,255,0.9) !important; }
    .site-footer { position: relative; left: 0; bottom: 0; width: 100%; text-align: center; padding: 16px; margin-top: auto; color: rgba(255,255,255,0.8) !important; }
    .site-footer a { color: rgba(255,255,255,0.8) !important; }
    .forgot-link { font-size: 14px; color: rgba(255,255,255,0.95) !important; }
    
    /* 手机端显示图片背景，隐藏视频背景 */
    .video-bg, .video-overlay { display: none; }
    .image-bg, .image-overlay { display: block; }
    .image-overlay { background: rgba(0, 0, 0, 0.15); backdrop-filter: none; }
    
    /* 登录图标背景 */
    .login-icon { background: rgba(255,255,255,0.2) !important; border: 1px solid rgba(255,255,255,0.3); }
}

@media (max-width: 480px) {
    body { padding: 8px; min-height: auto; }
    .login-card { padding: 24px 16px 20px; border-radius: 16px; }
    .login-title { font-size: 20px; }
    .login-icon { width: 60px; height: 60px; font-size: 26px; margin-bottom: 14px; }
    .form-group { margin-bottom: 16px; }
    .form-input { padding: 10px 12px 10px 38px; font-size: 14px; }
    .btn-login { min-height: 46px; }
    .site-footer { font-size: 12px; padding: 12px; }
}