/* 登录页面专用样式 */

/* 登录卡片容器 */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 登录卡片 */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    z-index: 5;
    animation: fadeInUp 0.8s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.login-card:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* 登录卡片头部 */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.login-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.login-header p {
    font-size: 0.95rem;
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

/* 错误消息样式 */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    animation: shake 0.5s ease-in-out;
    transition: all 0.3s ease;
}

.error-message:hover {
    background: rgba(239, 68, 68, 0.15);
}

.error-message i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* 登录表单样式 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #4a5568;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group label i {
    color: #667eea;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* 表单输入框样式 */
.form-control {
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    color: #2d3748;
    position: relative;
    z-index: 1;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #ffffff;
    transform: translateY(-1px);
}

.form-control:focus + .form-group label i {
    color: #667eea;
    transform: scale(1.1);
}

.form-control::placeholder {
    color: #a0aec0;
    transition: all 0.3s ease;
}

.form-control:focus::placeholder {
    color: #cbd5e0;
    opacity: 0.8;
}

/* 密码可见性切换按钮 */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 2;
    padding: 0.25rem;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* 登录按钮样式 */
.login-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-button .button-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-button i {
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
    line-height: 1;
}

/* 加载动画 */
.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
    flex-shrink: 0;
}

.login-button.loading {
    opacity: 0.8;
    cursor: not-allowed;
    transform: translateY(0);
}

.login-button.loading .button-text {
    display: none;
}

.login-button.loading .loading-spinner {
    display: block;
}

/* 辅助链接 */
.helper-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    color: #718096;
    transition: all 0.3s ease;
}

.remember-me:hover {
    color: #667eea;
}

.remember-me input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remember-me input[type="checkbox"]:hover {
    transform: scale(1.1);
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #764ba2;
    text-decoration: underline;
    transform: translateX(2px);
}

/* 返回首页链接 */
.back-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.back-link a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link a:hover {
    color: #764ba2;
    transform: translateX(-3px);
    text-decoration: underline;
}

.back-link i {
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.back-link a:hover i {
    transform: translateX(-2px);
}

/* 分隔线样式 */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
    border-radius: 1px;
}

.divider span {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 500;
    white-space: nowrap;
}

/* 社交媒体登录按钮 */
.social-login {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-button {
    flex: 1;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

.social-button:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-button i {
    font-size: 1.1rem;
}

.social-button.facebook {
    background: #1877f2;
    color: #ffffff;
    border-color: #1877f2;
}

.social-button.facebook:hover {
    background: #166fe5;
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.4);
}

.social-button.google {
    background: #ffffff;
    color: #4285f4;
    border-color: #e2e8f0;
}

.social-button.google:hover {
    background: #f8f9fa;
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.3);
}

/* 注册链接 */
.register-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #718096;
}

.register-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.register-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

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

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

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }

    .login-card {
        padding: 2rem 1.5rem;
        margin: 0;
        max-width: none;
    }

    .login-header .logo {
        font-size: 2rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .login-header p {
        font-size: 0.9rem;
    }

    .form-control {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }

    .login-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .social-login {
        flex-direction: column;
    }
}

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

    .login-header .logo {
        font-size: 1.8rem;
    }

    .login-header h2 {
        font-size: 1.3rem;
    }

    .login-form {
        gap: 1rem;
    }

    .form-group {
        gap: 0.375rem;
    }

    .form-control {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
        border-radius: 10px;
    }

    .login-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .helper-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .divider {
        margin: 1.25rem 0;
        gap: 0.75rem;
    }

    .social-login {
        gap: 0.75rem;
    }

    .social-button {
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 360px) {
    .login-card {
        padding: 1.25rem 0.875rem;
    }

    .login-header .logo {
        font-size: 1.6rem;
    }

    .login-header h2 {
        font-size: 1.2rem;
    }

    .login-header p {
        font-size: 0.85rem;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .login-card {
        background: rgba(17, 24, 39, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .login-header h2 {
        color: #ffffff;
    }

    .login-header p {
        color: #9ca3af;
    }

    .form-group label {
        color: #d1d5db;
    }

    .form-control {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(156, 163, 175, 0.3);
        color: #ffffff;
    }

    .form-control::placeholder {
        color: #6b7280;
    }

    .form-control:focus {
        background: rgba(31, 41, 55, 1);
    }

    .error-message {
        background: rgba(239, 68, 68, 0.2);
        border-color: rgba(239, 68, 68, 0.4);
        color: #fca5a5;
    }

    .login-button {
        background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    }

    .login-button:hover {
        box-shadow: 0 10px 20px rgba(129, 140, 248, 0.4);
    }

    .divider::before,
    .divider::after {
        background: rgba(156, 163, 175, 0.3);
    }

    .divider span {
        color: #9ca3af;
    }

    .social-button {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(156, 163, 175, 0.3);
        color: #d1d5db;
    }

    .social-button:hover {
        background: rgba(55, 65, 81, 0.95);
        border-color: rgba(156, 163, 175, 0.4);
    }

    .remember-me {
        color: #9ca3af;
    }

    .register-link {
        color: #9ca3af;
    }
}
