* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: url('login-suvan.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* 背景切换按钮 */
.bg-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.bg-switch:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

/* 登录容器 */
.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
}

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

/* 错误提示 */
.error-message {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 14px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 登录表单 */
.login-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    background: rgba(255, 255, 255, 1);
}

/* 滑块验证 */
.slider-container {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    height: 50px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 20px;
}

.slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #e9ecef 0%, #dee2e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
    transition: all 0.3s ease;
}

.slider-handle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 46px;
    height: 46px;
    background: #007bff;
    border-radius: 10px;
    cursor: grab;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.slider-handle:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.slider-handle.dragging {
    cursor: grabbing;
}

.slider-success {
    background: #28a745;
}

.slider-success .slider-bg {
    background: #d4edda;
    color: #155724;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 15px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.login-btn:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.login-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 记住密码和忘记密码 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.forgot-password {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 底部信息 */
.footer {
    text-align: center;
    color: #666;
    font-size: 12px;
    line-height: 1.6;
}

.footer a {
    color: #007bff;
    text-decoration: none;
}

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

.footer strong {
    color: #007bff;
    font-weight: 600;
}

/* 响应式设计 - 平板 */
@media (max-width: 768px) {
    .login-container {
        margin: 20px;
        padding: 35px 30px;
        max-width: 500px;
    }

    .logo {
        font-size: 26px;
    }

    .subtitle {
        font-size: 15px;
    }

    .form-group input {
        padding: 14px 18px;
        font-size: 16px;
    }

    .slider-container {
        height: 48px;
    }

    .slider-handle {
        width: 44px;
        height: 44px;
    }

    .bg-switch {
        top: 15px;
        right: 15px;
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* 响应式设计 - 手机 */
@media (max-width: 480px) {
    .login-container {
        margin: 15px;
        padding: 30px 25px;
        border-radius: 16px;
        max-width: 100%;
    }

    .logo {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 14px;
        line-height: 1.4;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .form-group input {
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 10px;
    }

    .slider-container {
        height: 45px;
        border-radius: 10px;
        margin-bottom: 18px;
    }

    .slider-handle {
        width: 41px;
        height: 41px;
        border-radius: 8px;
        font-size: 16px;
    }

    .slider-bg {
        font-size: 13px;
        padding: 0 10px;
        text-align: center;
    }

    .login-btn {
        padding: 14px;
        font-size: 16px;
        border-radius: 10px;
        margin-bottom: 18px;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        margin-bottom: 18px;
    }

    .checkbox-group {
        gap: 6px;
    }

    .checkbox-group label {
        font-size: 13px;
    }

    .forgot-password {
        font-size: 13px;
        align-self: flex-end;
    }

    .footer {
        font-size: 11px;
        line-height: 1.5;
    }

    .footer p {
        margin-bottom: 8px;
    }

    .bg-switch {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 20px;
    }

    /* 手机端触摸优化 */
    .form-group input:focus {
        transform: scale(1.02);
    }

    .login-btn:active {
        transform: scale(0.98);
    }

    .slider-handle:active {
        transform: scale(0.95);
    }
}

/* 超小屏幕手机 */
@media (max-width: 360px) {
    .login-container {
        margin: 10px;
        padding: 25px 20px;
    }

    .logo {
        font-size: 22px;
    }

    .subtitle {
        font-size: 13px;
    }

    .form-group input {
        padding: 10px 14px;
        font-size: 15px;
    }

    .slider-container {
        height: 42px;
    }

    .slider-handle {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .slider-bg {
        font-size: 12px;
    }

    .login-btn {
        padding: 12px;
        font-size: 15px;
    }

    .footer {
        font-size: 10px;
    }
}

/* 横屏手机优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .login-container {
        margin: 10px;
        padding: 25px 30px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .header {
        margin-bottom: 20px;
    }

    .logo {
        font-size: 22px;
        margin-bottom: 5px;
    }

    .subtitle {
        font-size: 13px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group input {
        padding: 10px 16px;
    }

    .slider-container {
        height: 40px;
        margin-bottom: 15px;
    }

    .slider-handle {
        width: 36px;
        height: 36px;
    }

    .login-btn {
        padding: 12px;
        margin-bottom: 15px;
    }

    .form-options {
        margin-bottom: 15px;
    }

    .footer {
        font-size: 11px;
    }
}

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

.login-container {
    animation: fadeInUp 0.6s ease-out;
}

/* 手机端触摸反馈 */
@media (hover: none) and (pointer: coarse) {
    .login-btn:active {
        background: #0056b3;
        transform: scale(0.98);
    }

    .form-group input:focus {
        border-color: #007bff;
        transform: scale(1.01);
    }

    .slider-handle:active {
        background: #0056b3;
        transform: scale(0.95);
    }
}
