/* Apple-style Login Page */
.auth-container {
    min-height: 100vh;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    padding: 2rem;
}

.auth-title {
    font-size: 27px;
    font-weight: 600;
    color: #1d1d1f;
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-input-group {
    position: relative;
}

.auth-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 17px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.auth-input:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.auth-input::placeholder {
    color: #86868b;
}

.auth-submit-btn {
    background-color: #0071e3;
    color: #ffffff;
    font-size: 17px;
    font-weight: 500;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-submit-btn:hover {
    background-color: #0077ed;
}

.auth-submit-btn:active {
    background-color: #006edb;
    transform: scale(0.98);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #86868b;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #d2d2d7;
}

.auth-divider span {
    padding: 0 1rem;
    font-size: 14px;
}

.auth-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    background-color: #ffffff;
    font-size: 17px;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-social-btn:hover {
    background-color: #f5f5f7;
}

.auth-social-btn i {
    font-size: 20px;
}

.auth-social-btn.google i {
    color: #ea4335;
}

.auth-social-btn.facebook i {
    color: #1877f2;
}

.auth-social-btn.reddit i {
    color: #FF4500;
}

.auth-remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.auth-remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid #d2d2d7;
    cursor: pointer;
}

.auth-remember-me label {
    font-size: 14px;
    color: #86868b;
    cursor: pointer;
}

.auth-forgot-password {
    display: flex;
    align-items: center;
}

.auth-forgot-password .auth-link {
    font-size: 14px;
    color: #007aff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-forgot-password .auth-link:hover {
    color: #0056cc;
    text-decoration: underline;
}

.auth-input-group {
    position: relative;
}

.auth-password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #86868b;
    transition: color 0.2s ease;
}

.auth-password-toggle:hover {
    color: #1d1d1f;
}

.auth-password-toggle i {
    font-size: 18px;
}

/* 确保密码输入框右侧有足够空间放置图标 */
.auth-input[type="password"] {
    padding-right: 48px;
}

/* Add error message styling */
.auth-error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

/* Add loading state for buttons */
.auth-submit-btn.loading,
.auth-social-btn.loading {
    position: relative;
    color: transparent !important;
}

.auth-submit-btn.loading::after,
.auth-social-btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: button-loading-spinner 0.75s linear infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* 在现有的社交按钮样式后添加 TikTok 样式 */
.auth-social-btn.tiktok i {
    color: #000000; /* TikTok 图标颜色 */
}

/* 可选：添加 TikTok 特殊样式 */
.auth-social-btn.tiktok {
    background-color: #ffffff;
    border: 1px solid #d2d2d7;
}

.auth-social-btn.tiktok:hover {
    background-color: #f5f5f7;
}

/* 添加成功消息样式 */
.auth-success-message {
    color: #28a745;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
    font-size: 14px;
}

/* 添加输入框错误样式 */
.auth-input-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1) !important;
    animation: shake 0.5s linear;
}

/* 为字段级别的错误消息添加样式 */
.field-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 4px;
    padding-left: 4px;
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 添加抖动动画 */
@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

/* 确保错误消息显示在表单下方 */
#errorMessage {
    margin-top: 1rem;
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    width: 90%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    z-index: 100;
}

/* 为forgot_password和reset_password页面的消息容器添加样式 */
.auth-message-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 400px;
    min-width: 300px;
    padding: 20px 24px;
    border-radius: 12px;
    font-size: 16px;
    text-align: center;
    transition: all 0.3s ease;
    display: none;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    font-weight: 500;
    line-height: 1.4;
}

.auth-message-info {
    color: #0c5460;
    background-color: rgba(209, 236, 241, 0.95);
    border: 1px solid #bee5eb;
}

.auth-message-success {
    color: #155724;
    background-color: rgba(212, 237, 218, 0.95);
    border: 1px solid #c3e6cb;
}

.auth-message-error {
    color: #721c24;
    background-color: rgba(248, 215, 218, 0.95);
    border: 1px solid #f5c6cb;
}

/* 添加消息显示动画 */
.auth-message-container.show {
    display: block !important;
    animation: messageSlideIn 0.3s ease-out;
}

.auth-message-container.hide {
    animation: messageSlideOut 0.3s ease-in;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes messageSlideOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

/* 为auth页面添加描述文本样式 */
.auth-description {
    font-size: 16px;
    color: #6c757d;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* 为auth页面的链接添加样式 */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links .auth-link {
    color: #007aff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.auth-links .auth-link:hover {
    color: #0056cc;
    text-decoration: underline;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .auth-message-container {
        max-width: 90vw;
        min-width: 280px;
        padding: 16px 20px;
        font-size: 15px;
        margin: 0 16px;
    }
} 