/* 认证页面专用样式 */

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #2d3748;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* 认证容器动画 */
.auth-container {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 表单输入框焦点效果 */
.form-group input:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* 错误状态样式 */
.form-group.error input {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group.success input {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* 密码强度指示器 */
.strength-bar.weak {
    background-color: #ef4444;
}

.strength-bar.medium {
    background-color: #f59e0b;
}

.strength-bar.strong {
    background-color: #10b981;
}

/* 按钮加载状态 */
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary.loading .btn-text {
    opacity: 0;
}

.btn-primary.loading #loginSpinner,
.btn-primary.loading #registerSpinner {
    display: inline-block !important;
}

/* 复选框自定义样式 */
input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #6b7280;
    border-radius: 3px;
    background-color: transparent;
    cursor: pointer;
    position: relative;
}

input[type="checkbox"]:checked {
    background-color: #f59e0b;
    border-color: #f59e0b;
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 1px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 认证相关通用样式 */

/* 消息提示样式 */
.toast-enter {
    animation: slideInRight 0.3s ease-out;
}

.toast-exit {
    animation: slideOutRight 0.3s ease-in;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 登录表单样式 */
.auth-form {
    @apply bg-white rounded-lg shadow-lg p-8 w-full max-w-md;
}

.auth-input {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200;
}

.auth-button {
    @apply w-full bg-blue-600 text-white py-3 px-4 rounded-lg hover:bg-blue-700 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all duration-200 font-medium;
}

.auth-button:disabled {
    @apply bg-gray-400 cursor-not-allowed;
}

.wechat-button {
    @apply w-full bg-green-600 text-white py-3 px-4 rounded-lg hover:bg-green-700 focus:ring-2 focus:ring-green-500 focus:ring-offset-2 transition-all duration-200 font-medium flex items-center justify-center gap-2;
}

/* 加载状态 */
.loading-spinner {
    @apply inline-block w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin;
}

/* 错误提示 */
.error-message {
    @apply text-red-600 text-sm mt-1;
}

/* 成功提示 */
.success-message {
    @apply text-green-600 text-sm mt-1;
}

/* 表单验证状态 */
.input-error {
    @apply border-red-500 focus:ring-red-500;
}

.input-success {
    @apply border-green-500 focus:ring-green-500;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .logo {
        width: 3rem;
        height: 3rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
}

/* 微信按钮特殊样式 */
.btn-wechat:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Logo 悬停效果 */
.logo {
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* 链接悬停效果 */
a {
    transition: color 0.2s ease;
}

/* 表单验证提示 */
.validation-tip {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.validation-tip.show {
    color: #f59e0b;
}