/* 用户模块样式 - 基于原始绿色主题设计 */

/* 未登录状态 - 绿色椭圆按钮 */
/*
 * 登录按钮（未登录态）
 * 让“Start For Free”更显眼：
 * - 使用更高对比度的渐变背景
 * - 提升字号/字重，并增加轻微文字阴影
 * - 稍强的外阴影让按钮更突出
 */
.user-sign-in-btn {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 14px;           /* 从 13px 提升，文字更醒目 */
    font-weight: 700;          /* 从 600 提升，加粗以增强可读性 */
    letter-spacing: 0.2px;     /* 略微加字间距，提升清晰度 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.35);
    outline: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.user-sign-in-btn:hover {
    background: linear-gradient(135deg, #5cb85c, #388e3c);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.45);
}

.user-sign-in-btn:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.35);
}

/* 移动端按钮同样增强可视性 */
.mobile-sign-in-btn {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 10px 26px;
    font-size: 14px;           /* 从 13px 提升 */
    font-weight: 700;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.35);
    outline: none;
    width: 100%;
}

.mobile-sign-in-btn:hover {
    background: linear-gradient(135deg, #5cb85c, #388e3c);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.45);
}

.mobile-sign-in-btn:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.35);
}

/* 登录态 - 用户头像容器 */
.user-profile-btn {
    position: relative;
    display: inline-block;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: none;
    overflow: hidden;
}

.user-avatar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.user-avatar:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

/* 用户头像图片 */
.user-avatar-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    color: #757575;
    font-size: 18px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    position: relative;
}

.user-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* 下拉菜单样式 */
.user-dropdown-menu {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 16px;
    padding: 0;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: none;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.user-dropdown-menu.visible {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
    animation: dropdownSlideIn 0.3s ease-out;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* 用户信息区域 */
.user-dropdown-header {
    padding: 16px 16px 12px 16px;
    background: #f8f9fa;
    border-bottom: none;
}

.user-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 3px;
    line-height: 1.2;
}

.user-dropdown-email {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
}

/* 菜单项样式 */
.user-dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: none;
}

.user-dropdown-item:hover {
    background-color: #f0f8f0;
    color: #2e7d32;
}

.user-dropdown-item.sign-out {
    color: #2e7d32;
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
}

.user-dropdown-item.sign-out:hover {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* 登录模态框样式 */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.login-modal.show {
    display: flex;
}

.login-modal-content {
    background: white;
    border-radius: 24px;            /* 整体更圆润一点 */
    padding: 48px;                  /* 放大一号 */
    max-width: 480px;               /* 放大整体弹窗宽度 */
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 模态框关闭按钮 */
.login-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.login-modal-close:hover {
    color: #666;
    background: #f5f5f5;
}

/* 模态框标题 */
.login-modal-title {
    font-size: 2rem;               /* 标题更大一号 */
    font-weight: 300;
    margin-bottom: 10px;
    color: #2e7d32;
}

.login-modal-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 15px;               /* 略微放大副标题 */
}

/* 登录模态框 - 福利徽章（参考截图复刻样式） */
.login-bonus-wrapper {
    display: flex;
    justify-content: center;
    margin: -2px 0 28px 0; /* 和下方按钮拉开距离 */
}

/* 胶囊形态、明亮绿色渐变、轻微发光，和截图一致的视觉感受 */
.login-bonus-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 9999px;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.2px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 55%, #10b981 100%);
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.35), 0 1px 0 rgba(255,255,255,0.12) inset;
    border: 1px solid rgba(255, 255, 255, 0.28);
    user-select: none;
    cursor: default;
}

.login-bonus-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.08), 0 1px 1px rgba(255,255,255,0.2);
}

.login-bonus-text {
    white-space: nowrap;
}

/* 社交登录区域 */
.social-login-providers {
    display: flex;
    flex-direction: column;
    gap: 14px;                     /* 按钮之间略微加大间距 */
}

/* 社交登录按钮 */
.social-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px 22px;           /* 放大按钮 */
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 15px;               /* 略大字号 */
    font-weight: 500;
    outline: none;
}

.social-login-btn:hover {
    background: #e9ecef;
    border-color: #66bb6a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-login-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* 社交平台图标 */
.provider-icon.google {
    width: 20px;                   /* 图标跟随放大 */
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285f4' d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z'/%3E%3Cpath fill='%2334a853' d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z'/%3E%3Cpath fill='%23fbbc05' d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z'/%3E%3Cpath fill='%23ea4335' d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.provider-icon.github {
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23333' d='M12 0C5.374 0 0 5.373 0 12 0 17.302 3.438 21.8 8.207 23.387c.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0112 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* Google 按钮更醒目：更厚边框与柔和投影 */
.social-login-btn.google,
.social-login-btn.social-login-btn--google {
    background: #ffffff;
    border-color: #8fd39e;
    border-width: 2px;
    box-shadow: 0 8px 18px rgba(76, 175, 80, 0.12);
    font-weight: 600;             /* 文字更有分量 */
}
.social-login-btn.google:hover,
.social-login-btn.social-login-btn--google:hover {
    background: #f6fff8;
    border-color: #66bb6a;
}

.provider-icon.facebook {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 10c0-5.523-4.477-10-10-10S0 4.477 0 10c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V10h2.54V7.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V10h2.773l-.443 2.89h-2.33v6.988C16.343 19.128 20 14.991 20 10z' fill='%231877F2'/%3E%3C/svg%3E");
}

.provider-icon.twitter {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.29 18.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0 0 20 3.92a8.19 8.19 0 0 1-2.357.646 4.118 4.118 0 0 0 1.804-2.27 8.224 8.224 0 0 1-2.605.996 4.107 4.107 0 0 0-6.993 3.743 11.65 11.65 0 0 1-8.457-4.287 4.106 4.106 0 0 0 1.27 5.477A4.073 4.073 0 0 1 .8 7.713v.052a4.105 4.105 0 0 0 3.292 4.022 4.095 4.095 0 0 1-1.853.07 4.108 4.108 0 0 0 3.834 2.85A8.233 8.233 0 0 1 0 16.407a11.616 11.616 0 0 0 6.29 1.84' fill='%231DA1F2'/%3E%3C/svg%3E");
}

.provider-icon.microsoft {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h9.5v9.5H0V0Z' fill='%23F25022'/%3E%3Cpath d='M10.5 0H20v9.5h-9.5V0Z' fill='%2300A4EF'/%3E%3Cpath d='M0 10.5h9.5V20H0v-9.5Z' fill='%2300BCF2'/%3E%3Cpath d='M10.5 10.5H20V20h-9.5v-9.5Z' fill='%23FFB900'/%3E%3C/svg%3E");
}

/* 移动端用户信息卡片 */
.mobile-user-card {
    background: white;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.mobile-user-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0 6px 0;
}

.mobile-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #757575;
    font-weight: 500;
    font-size: 18px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.mobile-user-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.mobile-user-info {
    flex: 1;
    min-width: 0;
}

.mobile-user-name {
    font-weight: 600;
    color: #2e7d32;
    font-size: 13px;
    margin: 0 0 2px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.mobile-user-email {
    font-size: 11px;
    color: #333;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 移动端菜单项 */
.mobile-user-menu {
    display: flex;
    flex-direction: column;
    padding: 12px 0 16px 0;
}

.mobile-user-menu-item {
    display: block;
    padding: 10px 0 10px 40px;
    margin: 0;
    border-radius: 0;
    background: transparent;
    color: #1b5e20;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mobile-user-menu-item:hover {
    background: transparent;
    color: #2e7d32;
}

.mobile-user-menu-divider {
    display: none;
}

.mobile-user-menu-item.sign-out {
    color: #2e7d32;
    margin-top: 0;
    padding-top: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-dropdown-menu {
        min-width: 200px;
        left: auto;
        right: 0;
        transform: none;
    }

    .login-modal-content {
        padding: 30px 25px;
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    .login-modal-title {
        font-size: 1.5rem;
    }

    /* 移动端让徽章更易读：占满行并居中 */
    .login-bonus-wrapper {
        margin-top: 2px;
        margin-bottom: 16px;
    }
    .login-bonus-badge {
        width: 100%;
        justify-content: center;
        padding: 12px 14px;
        font-size: 15px;
    }
    .login-bonus-icon {
        width: 30px;
        height: 30px;
    }

    .user-sign-in-btn {
        padding: 10px 24px;
        font-size: 14px;  /* 保持提升后的字号 */
        font-weight: 700;
    }

    .user-avatar {
        width: 38px;
        height: 38px;
    }

    .user-avatar-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .mobile-user-avatar {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .mobile-user-avatar-img {
        width: 38px;
        height: 38px;
    }
}
