/**
 * 移动端"我的"按钮下拉菜单样式
 * 专为移动端设计的下拉菜单样式
 */

/* 下拉菜单容器 */
.mobile-profile-dropdown {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    max-width: 280px;
    z-index: 2000;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.mobile-profile-dropdown.show {
    opacity: 1;
    transform: translateY(0);
}

/* 下拉菜单头部 */
.dropdown-header {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-brown), var(--secondary-brown));
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 0.2rem;
}

.user-avatar {
    flex-shrink: 0;
}

.user-avatar i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

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

.user-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-permission {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* 游客信息 */
.guest-info {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.guest-info i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.guest-info span {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* 分隔线 */
.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0;
}

/* 菜单项 */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background: var(--light-gray);
}

.dropdown-item:active {
    background: var(--border-color);
}

.dropdown-item i {
    width: 1rem;
    text-align: center;
    color: var(--primary-brown);
    font-size: 0.875rem;
}

.dropdown-item span {
    flex: 1;
}

/* 管理员链接特殊样式 */
.admin-link {
    color: var(--primary-brown);
    font-weight: 500;
}

.admin-link:hover {
    background: rgba(139, 69, 19, 0.1);
}

/* 登录注册链接 */
.login-link,
.register-link {
    color: var(--primary-brown);
    font-weight: 500;
}

.login-link:hover,
.register-link:hover {
    background: rgba(139, 69, 19, 0.1);
}

/* 退出登录按钮 */
.logout-btn {
    color: #ff4444;
    font-weight: 500;
}

.logout-btn:hover {
    background: rgba(255, 68, 68, 0.1);
}

.logout-btn i {
    color: #ff4444;
}

/* 响应式调整 */
@media (max-width: 320px) {
    .mobile-profile-dropdown {
        min-width: 180px;
        max-width: 240px;
    }
    
    .dropdown-item {
        padding: 0.75rem 0.875rem;
        font-size: 0.8125rem;
    }
}

/* 防止底部导航栏被下拉菜单遮挡 */
.mobile-tabbar {
    z-index: 1000;
}

.mobile-profile-dropdown {
    z-index: 2000;
}

/* 添加小三角指示器 */
.mobile-profile-dropdown::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}