/* AI客服系统 - 登录页面样式 - 与主页保持一致 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 登录页面组件样式 - 基础布局，不涉及主题变化 */

body {
    font-family: var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    background: var(--background) !important;
    min-height: 100vh;
    color: var(--text-color);
    overflow: hidden;
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 登录卡片 - 参考主页的白色卡片样式，但拉长以容纳表单 */
.login-card {
    background: var(--card-background, rgba(255, 255, 255, 0.95));
    backdrop-filter: var(--backdrop-filter, blur(20px));
    border-radius: var(--border-radius-xl, 24px);
    padding: 60px 80px;
    text-align: center;
    box-shadow: var(--shadow-card, 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.2));
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: cardFadeIn 0.8s ease-out;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 页面标题 */
.page-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-color, #1a1a1a);
    margin-bottom: 8px;
    letter-spacing: -1px;
    text-shadow: var(--shadow-sm, 0 2px 4px rgba(0, 0, 0, 0.05));
}

/* 页面副标题 */
.page-subtitle {
    font-size: 16px;
    color: var(--text-color-secondary, #666);
    margin-bottom: 40px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* 表单容器 */
.form-container {
    text-align: left;
}

/* 表单组 */
.form-group {
    margin-bottom: 24px;
}

/* 标签样式 */
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #333);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

/* 密码输入框容器 */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* 输入框样式 */
.form-input {
    width: 100%;
    padding: 14px 20px;
    padding-right: 50px; /* 为切换按钮留出空间 */
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-md, 12px);
    background: var(--input-background, white);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color, #1a1a1a);
    transition: all 0.2s ease;
    outline: none;
}

/* 密码切换按钮 */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.eye-icon {
    font-size: 18px;
    user-select: none;
}

.form-input:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-input:hover {
    border-color: #007AFF;
}

/* 按钮样式 - 与主页保持一致 */
.btn {
    padding: 14px 28px;
    border-radius: var(--border-radius-md, 12px);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 120px;
    position: relative;
    border: none;
    cursor: pointer;
    /* macOS风格阴影 */
    box-shadow: var(--shadow-button, 0 4px 12px rgba(0, 0, 0, 0.1)),
        0 2px 4px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 主要按钮 - 登录按钮 */
.btn-primary {
    background: var(--button-primary-bg, #007AFF);
    color: var(--button-primary-color, white);
    width: 100%;
    margin-bottom: 16px;
}

.btn-primary:hover {
    background: #0056CC;
    transform: translateY(-1px);
    box-shadow: 
        0 6px 16px rgba(0, 122, 255, 0.3),
        0 3px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(0, 122, 255, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 按钮加载状态 */
.button-text {
    transition: opacity 0.2s ease;
}

.button-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s ease;
}

.button-loading.show {
    display: flex;
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 通知组件样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--input-background, white);
    border-radius: var(--border-radius-md, 12px);
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color-input, rgba(0, 0, 0, 0.1));
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-left: 4px solid #10B981;
}

.notification.error {
    border-left: 4px solid #EF4444;
}

.notification.info {
    border-left: 4px solid #3B82F6;
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notification-message {
    font-weight: 500;
    color: var(--text-color, #1a1a1a);
    flex: 1;
}

/* 次要按钮 - 注册链接 */
.btn-secondary {
    background: var(--input-background, white);
    color: var(--text-color, #1a1a1a);
    border: 1px solid var(--border-color-input, rgba(0, 0, 0, 0.1));
    width: 100%;
}

.btn-secondary:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.15),
        0 3px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 返回链接 */
.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--text-color-secondary, #666);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #007AFF;
}

/* 错误信息 */
.error-message {
    color: #ff3b30;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

.error-message.show {
    display: block;
}

/* 成功信息 */
.success-message {
    color: #34c759;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

.success-message.show {
    display: block;
}

/* 卡片进入动画 */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 按钮悬停动画 */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    border-radius: var(--border-radius-md, 12px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn:hover::before {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-card {
        padding: 40px 50px;
        margin: 20px;
        max-width: 400px;
    }

    .page-title {
        font-size: 28px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .form-input {
        padding: 12px 16px;
        font-size: 15px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 40px;
        margin: 15px;
        max-width: 350px;
    }

    .page-title {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 13px;
    }

    .form-input {
        padding: 10px 14px;
        font-size: 14px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 背景动画效果 - 与主页保持一致 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background);
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.05) rotate(1deg);
    }
}