/* 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-x: hidden;
    overflow-y: auto;
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* 确保容器可以滚动 */
    overflow-y: auto;
}

/* 注册卡片 - 参考主页的白色卡片样式，但拉长以容纳表单 */
.register-card {
    background: var(--card-background, rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 60px 80px;
    text-align: center;
    box-shadow: 
        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 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: 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;
}

/* 输入容器样式 */
.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* 输入框样式 */
.form-input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    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;
}

.form-input:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* 密码切换按钮样式 */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.password-toggle:active {
    background-color: rgba(0, 0, 0, 0.1);
}

.eye-icon {
    font-size: 18px;
    user-select: none;
}

.form-input:hover {
    border-color: #007AFF;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 8px;
    font-size: 12px;
    display: none;
}

.password-strength.show {
    display: block;
}

.strength-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak { background: #ff3b30; width: 25%; }
.strength-fill.medium { background: #ff9500; width: 50%; }
.strength-fill.strong { background: #34c759; width: 100%; }

/* 按钮样式 - 与主页保持一致 */
.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);
}

/* 次要按钮 - 登录链接 */
.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) {
    .container {
        align-items: flex-start;
        padding: 10px;
        padding-top: 20px;
    }
    
    .register-card {
        padding: 30px 40px;
        margin: 10px;
        max-width: 100%;
        width: 100%;
        /* 确保卡片在小屏幕上可以滚动 */
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }

    .page-title {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .form-input {
        padding: 12px 16px;
        font-size: 15px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
        padding-top: 15px;
    }
    
    .register-card {
        padding: 20px 30px;
        margin: 5px;
        max-width: 100%;
        width: 100%;
        /* 确保卡片在手机上可以滚动 */
        max-height: calc(100vh - 10px);
        overflow-y: auto;
    }

    .page-title {
        font-size: 20px;
    }

    .page-subtitle {
        font-size: 13px;
    }

    .form-input {
        padding: 10px 14px;
        font-size: 14px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 滚动条样式 */
.register-card::-webkit-scrollbar {
    width: 6px;
}

.register-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.register-card::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.register-card::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* 背景动画效果 - 与主页保持一致 */
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);
    }
}

/* 通知消息样式 */
.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;
}