* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary: #e50914;
    --primary-dark: #b20710;
    --primary-light: rgba(229, 9, 20, 0.15);
    --dark: #0f0f0f;
    --dark-light: #1a1a1a;
    --gray: #2d2d2d;
    --light-gray: #8c8c8c;
    --white: #ffffff;
    --card-bg: #1f1f1f;
    --text-light: #f0f0f0;
    --transition: all 0.3s ease;
    --ripple-color: rgba(229, 9, 20, 0.4);
    --error-bg: rgba(255, 107, 107, 0.15);
    --error-border: #ff6b6b;
    --error-text: #ff6b6b;
}

body {
    background-color: var(--dark);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 顶部导航 */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    max-width: 1000px;
    margin: 0 auto;
}

.mobile-header .logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-header .logo i {
    font-size: 24px;
}

.back-btn {
    color: var(--white);
    font-size: 18px;
    text-decoration: none;
}

/* 登录容器 */
.login-container {
    max-width: 450px;
    width: 90%;
    margin: 40px auto;
    padding: 30px 25px;
    background: rgba(26, 26, 26, 0.85);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gray);
    animation: fadeInUp 0.6s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ff6b6b, #e50914);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.login-header p {
    color: var(--light-gray);
    font-size: 16px;
}

/* 错误提示框 */
.alert-error {
    display: none;
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    animation: shake 0.5s ease-in-out;
}

.alert-error.show {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-error-content {
    flex: 1;
    padding-right: 20px;
}

.alert-error-close {
    background: none;
    border: none;
    color: var(--error-text);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.alert-error-close:hover {
    transform: scale(1.2);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--light-gray);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-gray);
    font-size: 18px;
}

.form-control {
    width: 100%;
    padding: 15px 15px 15px 50px;
    background: var(--dark);
    border: 2px solid var(--gray);
    border-radius: 10px;
    color: var(--white);
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-gray);
    cursor: pointer;
    font-size: 18px;
}

.password-toggle:hover {
    color: var(--primary);
}

/* 选项区域 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.remember-me label {
    color: var(--light-gray);
    font-size: 14px;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 按钮样式 */
.btn {
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    text-align: center;
    display: block;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.35);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(229, 9, 20, 0.4);
}

/* 其他登录方式 */
.other-login {
    margin: 25px 0;
    text-align: center;
    position: relative;
}

.other-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray);
    z-index: 1;
}

.other-login span {
    position: relative;
    display: inline-block;
    padding: 0 15px;
    background: rgba(26, 26, 26, 0.85);
    z-index: 2;
    color: var(--light-gray);
    font-size: 14px;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    color: var(--white);
    font-size: 20px;
    transition: var(--transition);
    border: 1px solid var(--gray);
}

.social-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-btn.wechat {
    background: linear-gradient(45deg, #09bb07, #2add1c);
    border-color: #09bb07;
}

.social-btn.qq {
    background: linear-gradient(45deg, #12b7f5, #2a8cff);
    border-color: #12b7f5;
}

.social-btn.weibo {
    background: linear-gradient(45deg, #e6162d, #ff2a3c);
    border-color: #e6162d;
}

/* 注册链接 */
.register-link {
    text-align: center;
    margin-top: 20px;
    color: var(--light-gray);
    font-size: 15px;
}

.register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    transition: var(--transition);
}

.register-link a:hover {
    text-decoration: underline;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.floating-logo {
    text-align: center;
    margin-bottom: 20px;
    animation: float 4s ease-in-out infinite;
}

.floating-logo i {
    font-size: 60px;
    color: var(--primary);
    background: rgba(26, 26, 26, 0.8);
    border-radius: 50%;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(229, 9, 20, 0.25);
}

/* 错误提示 */
.error-message {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.form-group.error .form-control {
    border-color: #ff6b6b;
}

.form-group.error .error-message {
    display: block;
}


/* PWA安装提示样式 */
.pwa-install-banner {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    padding: 12px 16px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
    z-index: 999;
    display: none;
    border-radius: 8px 8px 0 0;
    margin: 0 auto;
    width: 55%;
    max-width: 550px;
}
.pwa-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 550px;
    margin: 0 auto;
}
.pwa-banner-text {
    display: flex;
    align-items: center;
    flex: 1;
}
.pwa-banner-text i {
    margin-right: 10px;
    font-size: 1.2rem;
}
.pwa-banner-actions {
    display: flex;
    gap: 10px;
}
.pwa-install-btn, .pwa-close-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}
.pwa-install-btn {
    background-color: white;
    color: #6e8efb;
}
.pwa-close-btn {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.5);
}

/* 调整底部导航栏位置，为PWA提示留出空间 */
.mobile-nav {
    bottom: 0;
    z-index: 1000;
}

/* 调整回到顶部按钮位置 */
.back-to-top.visible {
    bottom: 80px;
}

@media (max-width: 768px) {
    .pwa-banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .pwa-banner-actions {
        align-self: flex-end;
    }
}

