* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #0f172a;
    color: #f8fafc;
    overflow-x: hidden;
    position: relative;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 背景光效球 */
.login-bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

.glow-1 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, #3b82f6 0%, #1d4ed8 70%);
    top: -80px;
    left: -80px;
    animation: floatGlow1 12s ease-in-out infinite alternate;
}

.glow-2 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, #6366f1 0%, #4338ca 70%);
    bottom: -100px;
    right: -100px;
    animation: floatGlow2 14s ease-in-out infinite alternate;
}

@keyframes floatGlow1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(60px, 40px) scale(1.15);
    }
}

@keyframes floatGlow2 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-50px, -30px) scale(1.1);
    }
}

.login-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 10;
}

.login-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 36px 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-card.shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-2px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(4px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-6px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(6px, 0, 0);
    }
}

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

.logo-icon {
    font-size: 42px;
    line-height: 1;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.1) rotate(10deg);
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 13px;
    color: #94a3b8;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 13px;
    font-weight: 500;
    color: #cbd5e1;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 14px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.password-input:focus {
    background: rgba(15, 23, 42, 0.9);
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.password-input::placeholder {
    color: #64748b;
    font-size: 14px;
}

.toggle-pwd-btn {
    position: absolute;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border-radius: 6px;
    transition: opacity 0.2s;
    user-select: none;
}

.toggle-pwd-btn:hover {
    opacity: 0.8;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #94a3b8;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.remember-label input[type="checkbox"] {
    accent-color: #3b82f6;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.error-msg {
    display: none;
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 10px;
    color: #fca5a5;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.error-msg.show {
    display: block;
}

.submit-btn {
    width: 100%;
    height: 46px;
    margin-top: 4px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(1px);
}

.submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
}

.submit-btn.loading .btn-text {
    visibility: hidden;
}

.submit-btn.loading .btn-spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
}

@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .login-title {
        font-size: 20px;
    }
}